io.etcd.jetcd.api

## Class KeyValue.Builder

- java.lang.Object
- - com.google.protobuf.AbstractMessageLite.Builder
  - - com.google.protobuf.AbstractMessage.Builder<BuilderType>
    - - com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
      - - io.etcd.jetcd.api.KeyValue.Builder

All Implemented Interfaces:
  com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, KeyValueOrBuilder, Cloneable

Enclosing class:
  KeyValue

    public static final class KeyValue.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
    implements KeyValueOrBuilder

Protobuf type `mvccpb.KeyValue`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`KeyValue.Builder` `addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)`
`KeyValue` `build()`
`KeyValue` `buildPartial()`
`KeyValue.Builder` `clear()`
`KeyValue.Builder` `clearCreateRevision()` create_revision is the revision of last creation on this key.
`KeyValue.Builder` `clearField(com.google.protobuf.Descriptors.FieldDescriptor field)`
`KeyValue.Builder` `clearKey()` key is the key in bytes.
`KeyValue.Builder` `clearLease()` lease is the ID of the lease that attached to key.
`KeyValue.Builder` `clearModRevision()` mod_revision is the revision of last modification on this key.
`KeyValue.Builder` `clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)`
`KeyValue.Builder` `clearValue()` value is the value held by the key, in bytes.
`KeyValue.Builder` `clearVersion()` version is the version of the key.
`KeyValue.Builder` `clone()`
`long` `getCreateRevision()` create_revision is the revision of last creation on this key.
`KeyValue` `getDefaultInstanceForType()`
`static com.google.protobuf.Descriptors.Descriptor` `getDescriptor()`
`com.google.protobuf.Descriptors.Descriptor` `getDescriptorForType()`
`com.google.protobuf.ByteString` `getKey()` key is the key in bytes.
`long` `getLease()` lease is the ID of the lease that attached to key.
`long` `getModRevision()` mod_revision is the revision of last modification on this key.
`com.google.protobuf.ByteString` `getValue()` value is the value held by the key, in bytes.
`long` `getVersion()` version is the version of the key.
`protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable` `internalGetFieldAccessorTable()`
`boolean` `isInitialized()`
`KeyValue.Builder` `mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)`
`KeyValue.Builder` `mergeFrom(KeyValue other)`
`KeyValue.Builder` `mergeFrom(com.google.protobuf.Message other)`
`KeyValue.Builder` `mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)`
`KeyValue.Builder` `setCreateRevision(long value)` create_revision is the revision of last creation on this key.
`KeyValue.Builder` `setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)`
`KeyValue.Builder` `setKey(com.google.protobuf.ByteString value)` key is the key in bytes.
`KeyValue.Builder` `setLease(long value)` lease is the ID of the lease that attached to key.
`KeyValue.Builder` `setModRevision(long value)` mod_revision is the revision of last modification on this key.
`KeyValue.Builder` `setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)`
`KeyValue.Builder` `setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)`
`KeyValue.Builder` `setValue(com.google.protobuf.ByteString value)` value is the value held by the key, in bytes.
`KeyValue.Builder` `setVersion(long value)` version is the version of the key.

### Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder

`getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3`

### Methods inherited from class com.google.protobuf.AbstractMessage.Builder

`findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString`

### Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

`addAll, addAll, mergeFrom, newUninitializedMessageException`

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

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

### Methods inherited from interface com.google.protobuf.MessageOrBuilder

`findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof`

### Methods inherited from interface com.google.protobuf.MessageLite.Builder

`mergeFrom`

### Method Detail

#### getDescriptor

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()

#### internalGetFieldAccessorTable

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()

Specified by:
  `internalGetFieldAccessorTable` in class `com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>`

#### clear

    public KeyValue.Builder clear()

Specified by:
  `clear` in interface `com.google.protobuf.Message.Builder`
Specified by:
  `clear` in interface `com.google.protobuf.MessageLite.Builder`
Overrides:
  `clear` in class `com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>`

#### getDescriptorForType

    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()

Specified by:
  `getDescriptorForType` in interface `com.google.protobuf.Message.Builder`
Specified by:
  `getDescriptorForType` in interface `com.google.protobuf.MessageOrBuilder`
Overrides:
  `getDescriptorForType` in class `com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>`

#### getDefaultInstanceForType

    public KeyValue getDefaultInstanceForType()

Specified by:
  `getDefaultInstanceForType` in interface `com.google.protobuf.MessageLiteOrBuilder`
Specified by:
  `getDefaultInstanceForType` in interface `com.google.protobuf.MessageOrBuilder`

#### build

    public KeyValue build()

Specified by:
  `build` in interface `com.google.protobuf.Message.Builder`
Specified by:
  `build` in interface `com.google.protobuf.MessageLite.Builder`

#### buildPartial

    public KeyValue buildPartial()

Specified by:
  `buildPartial` in interface `com.google.protobuf.Message.Builder`
Specified by:
  `buildPartial` in interface `com.google.protobuf.MessageLite.Builder`

#### clone

    public KeyValue.Builder clone()

Specified by:
  `clone` in interface `com.google.protobuf.Message.Builder`
Specified by:
  `clone` in interface `com.google.protobuf.MessageLite.Builder`
Overrides:
  `clone` in class `com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>`

#### setField

    public KeyValue.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field,
                                     Object value)

Specified by:
  `setField` in interface `com.google.protobuf.Message.Builder`
Overrides:
  `setField` in class `com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>`

#### clearField

    public KeyValue.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)

Specified by:
  `clearField` in interface `com.google.protobuf.Message.Builder`
Overrides:
  `clearField` in class `com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>`

#### clearOneof

    public KeyValue.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)

Specified by:
  `clearOneof` in interface `com.google.protobuf.Message.Builder`
Overrides:
  `clearOneof` in class `com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>`

#### setRepeatedField

    public KeyValue.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             int index,
                                             Object value)

Specified by:
  `setRepeatedField` in interface `com.google.protobuf.Message.Builder`
Overrides:
  `setRepeatedField` in class `com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>`

#### addRepeatedField

    public KeyValue.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             Object value)

Specified by:
  `addRepeatedField` in interface `com.google.protobuf.Message.Builder`
Overrides:
  `addRepeatedField` in class `com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>`

#### mergeFrom

    public KeyValue.Builder mergeFrom(com.google.protobuf.Message other)

Specified by:
  `mergeFrom` in interface `com.google.protobuf.Message.Builder`
Overrides:
  `mergeFrom` in class `com.google.protobuf.AbstractMessage.Builder<KeyValue.Builder>`

#### mergeFrom

    public KeyValue.Builder mergeFrom(KeyValue other)

#### isInitialized

    public final boolean isInitialized()

Specified by:
  `isInitialized` in interface `com.google.protobuf.MessageLiteOrBuilder`
Overrides:
  `isInitialized` in class `com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>`

#### mergeFrom

    public KeyValue.Builder mergeFrom(com.google.protobuf.CodedInputStream input,
                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                               throws IOException

Specified by:
  `mergeFrom` in interface `com.google.protobuf.Message.Builder`
Specified by:
  `mergeFrom` in interface `com.google.protobuf.MessageLite.Builder`
Overrides:
  `mergeFrom` in class `com.google.protobuf.AbstractMessage.Builder<KeyValue.Builder>`
Throws:
  `IOException`

#### getKey

    public com.google.protobuf.ByteString getKey()

     key is the key in bytes. An empty key is not allowed.

`bytes key = 1;`

Specified by:
  `getKey` in interface `KeyValueOrBuilder`
Returns:
  The key.

#### setKey

    public KeyValue.Builder setKey(com.google.protobuf.ByteString value)

     key is the key in bytes. An empty key is not allowed.

`bytes key = 1;`

Parameters:
  `value` - The key to set.
Returns:
  This builder for chaining.

#### clearKey

    public KeyValue.Builder clearKey()

     key is the key in bytes. An empty key is not allowed.

`bytes key = 1;`

Returns:
  This builder for chaining.

#### getCreateRevision

    public long getCreateRevision()

     create_revision is the revision of last creation on this key.

`int64 create_revision = 2;`

Specified by:
  `getCreateRevision` in interface `KeyValueOrBuilder`
Returns:
  The createRevision.

#### setCreateRevision

    public KeyValue.Builder setCreateRevision(long value)

     create_revision is the revision of last creation on this key.

`int64 create_revision = 2;`

Parameters:
  `value` - The createRevision to set.
Returns:
  This builder for chaining.

#### clearCreateRevision

    public KeyValue.Builder clearCreateRevision()

     create_revision is the revision of last creation on this key.

`int64 create_revision = 2;`

Returns:
  This builder for chaining.

#### getModRevision

    public long getModRevision()

     mod_revision is the revision of last modification on this key.

`int64 mod_revision = 3;`

Specified by:
  `getModRevision` in interface `KeyValueOrBuilder`
Returns:
  The modRevision.

#### setModRevision

    public KeyValue.Builder setModRevision(long value)

     mod_revision is the revision of last modification on this key.

`int64 mod_revision = 3;`

Parameters:
  `value` - The modRevision to set.
Returns:
  This builder for chaining.

#### clearModRevision

    public KeyValue.Builder clearModRevision()

     mod_revision is the revision of last modification on this key.

`int64 mod_revision = 3;`

Returns:
  This builder for chaining.

#### getVersion

    public long getVersion()

     version is the version of the key. A deletion resets
     the version to zero and any modification of the key
     increases its version.

`int64 version = 4;`

Specified by:
  `getVersion` in interface `KeyValueOrBuilder`
Returns:
  The version.

#### setVersion

    public KeyValue.Builder setVersion(long value)

     version is the version of the key. A deletion resets
     the version to zero and any modification of the key
     increases its version.

`int64 version = 4;`

Parameters:
  `value` - The version to set.
Returns:
  This builder for chaining.

#### clearVersion

    public KeyValue.Builder clearVersion()

     version is the version of the key. A deletion resets
     the version to zero and any modification of the key
     increases its version.

`int64 version = 4;`

Returns:
  This builder for chaining.

#### getValue

    public com.google.protobuf.ByteString getValue()

     value is the value held by the key, in bytes.

`bytes value = 5;`

Specified by:
  `getValue` in interface `KeyValueOrBuilder`
Returns:
  The value.

#### setValue

    public KeyValue.Builder setValue(com.google.protobuf.ByteString value)

     value is the value held by the key, in bytes.

`bytes value = 5;`

Parameters:
  `value` - The value to set.
Returns:
  This builder for chaining.

#### clearValue

    public KeyValue.Builder clearValue()

     value is the value held by the key, in bytes.

`bytes value = 5;`

Returns:
  This builder for chaining.

#### getLease

    public long getLease()

     lease is the ID of the lease that attached to key.
     When the attached lease expires, the key will be deleted.
     If lease is 0, then no lease is attached to the key.

`int64 lease = 6;`

Specified by:
  `getLease` in interface `KeyValueOrBuilder`
Returns:
  The lease.

#### setLease

    public KeyValue.Builder setLease(long value)

     lease is the ID of the lease that attached to key.
     When the attached lease expires, the key will be deleted.
     If lease is 0, then no lease is attached to the key.

`int64 lease = 6;`

Parameters:
  `value` - The lease to set.
Returns:
  This builder for chaining.

#### clearLease

    public KeyValue.Builder clearLease()

     lease is the ID of the lease that attached to key.
     When the attached lease expires, the key will be deleted.
     If lease is 0, then no lease is attached to the key.

`int64 lease = 6;`

Returns:
  This builder for chaining.

#### setUnknownFields

    public final KeyValue.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)

Specified by:
  `setUnknownFields` in interface `com.google.protobuf.Message.Builder`
Overrides:
  `setUnknownFields` in class `com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>`

#### mergeUnknownFields

    public final KeyValue.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)

Specified by:
  `mergeUnknownFields` in interface `com.google.protobuf.Message.Builder`
Overrides:
  `mergeUnknownFields` in class `com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>`