io.etcd.jetcd.options

## Class PutOption.Builder

- java.lang.Object
- - io.etcd.jetcd.options.PutOption.Builder

Enclosing class:
  PutOption

    public static class PutOption.Builder
    extends Object

Builder to construct a put option.

### Method Summary

All Methods Instance Methods Concrete Methods
`PutOption` `build()` build the put option.
`PutOption.Builder` `withLeaseId(long leaseId)` Assign a leaseId for a put operation.
`PutOption.Builder` `withPrevKV()` When withPrevKV is set, put response contains previous key-value pair.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### withLeaseId

    public PutOption.Builder withLeaseId(long leaseId)

Assign a leaseId for a put operation. Zero means no lease.

Parameters:
  `leaseId` - lease id to apply to a put operation
Returns:
  builder
Throws:
  `IllegalArgumentException` - if lease is less than zero.

#### withPrevKV

    public PutOption.Builder withPrevKV()

When withPrevKV is set, put response contains previous key-value pair.

Returns:
  builder

#### build

    public PutOption build()

build the put option.

Returns:
  the put option