io.etcd.jetcd.api

## Class Compare.Builder

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

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

Enclosing class:
  Compare

    public static final class Compare.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Compare.Builder>
    implements CompareOrBuilder

Protobuf type `etcdserverpb.Compare`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`Compare.Builder` `addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)`
`Compare` `build()`
`Compare` `buildPartial()`
`Compare.Builder` `clear()`
`Compare.Builder` `clearCreateRevision()` create_revision is the creation revision of the given key
`Compare.Builder` `clearField(com.google.protobuf.Descriptors.FieldDescriptor field)`
`Compare.Builder` `clearKey()` key is the subject key for the comparison operation.
`Compare.Builder` `clearModRevision()` mod_revision is the last modified revision of the given key.
`Compare.Builder` `clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)`
`Compare.Builder` `clearRangeEnd()` range_end compares the given target to all keys in the range [key, range_end).
`Compare.Builder` `clearResult()` result is logical comparison operation for this comparison.
`Compare.Builder` `clearTarget()` target is the key-value field to inspect for the comparison.
`Compare.Builder` `clearTargetUnion()`
`Compare.Builder` `clearValue()` value is the value of the given key, in bytes.
`Compare.Builder` `clearVersion()` version is the version of the given key
`Compare.Builder` `clone()`
`long` `getCreateRevision()` create_revision is the creation revision of the given key
`Compare` `getDefaultInstanceForType()`
`static com.google.protobuf.Descriptors.Descriptor` `getDescriptor()`
`com.google.protobuf.Descriptors.Descriptor` `getDescriptorForType()`
`com.google.protobuf.ByteString` `getKey()` key is the subject key for the comparison operation.
`long` `getModRevision()` mod_revision is the last modified revision of the given key.
`com.google.protobuf.ByteString` `getRangeEnd()` range_end compares the given target to all keys in the range [key, range_end).
`Compare.CompareResult` `getResult()` result is logical comparison operation for this comparison.
`int` `getResultValue()` result is logical comparison operation for this comparison.
`Compare.CompareTarget` `getTarget()` target is the key-value field to inspect for the comparison.
`Compare.TargetUnionCase` `getTargetUnionCase()`
`int` `getTargetValue()` target is the key-value field to inspect for the comparison.
`com.google.protobuf.ByteString` `getValue()` value is the value of the given key, in bytes.
`long` `getVersion()` version is the version of the given key
`protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable` `internalGetFieldAccessorTable()`
`boolean` `isInitialized()`
`Compare.Builder` `mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)`
`Compare.Builder` `mergeFrom(Compare other)`
`Compare.Builder` `mergeFrom(com.google.protobuf.Message other)`
`Compare.Builder` `mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)`
`Compare.Builder` `setCreateRevision(long value)` create_revision is the creation revision of the given key
`Compare.Builder` `setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)`
`Compare.Builder` `setKey(com.google.protobuf.ByteString value)` key is the subject key for the comparison operation.
`Compare.Builder` `setModRevision(long value)` mod_revision is the last modified revision of the given key.
`Compare.Builder` `setRangeEnd(com.google.protobuf.ByteString value)` range_end compares the given target to all keys in the range [key, range_end).
`Compare.Builder` `setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)`
`Compare.Builder` `setResult(Compare.CompareResult value)` result is logical comparison operation for this comparison.
`Compare.Builder` `setResultValue(int value)` result is logical comparison operation for this comparison.
`Compare.Builder` `setTarget(Compare.CompareTarget value)` target is the key-value field to inspect for the comparison.
`Compare.Builder` `setTargetValue(int value)` target is the key-value field to inspect for the comparison.
`Compare.Builder` `setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)`
`Compare.Builder` `setValue(com.google.protobuf.ByteString value)` value is the value of the given key, in bytes.
`Compare.Builder` `setVersion(long value)` version is the version of the given 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<Compare.Builder>`

#### clear

    public Compare.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<Compare.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<Compare.Builder>`

#### getDefaultInstanceForType

    public Compare getDefaultInstanceForType()

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

#### build

    public Compare build()

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

#### buildPartial

    public Compare buildPartial()

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

#### clone

    public Compare.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<Compare.Builder>`

#### setField

    public Compare.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<Compare.Builder>`

#### clearField

    public Compare.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<Compare.Builder>`

#### clearOneof

    public Compare.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<Compare.Builder>`

#### setRepeatedField

    public Compare.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<Compare.Builder>`

#### addRepeatedField

    public Compare.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<Compare.Builder>`

#### mergeFrom

    public Compare.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<Compare.Builder>`

#### mergeFrom

    public Compare.Builder mergeFrom(Compare other)

#### isInitialized

    public final boolean isInitialized()

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

#### mergeFrom

    public Compare.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<Compare.Builder>`
Throws:
  `IOException`

#### getTargetUnionCase

    public Compare.TargetUnionCase getTargetUnionCase()

Specified by:
  `getTargetUnionCase` in interface `CompareOrBuilder`

#### clearTargetUnion

    public Compare.Builder clearTargetUnion()

#### getResultValue

    public int getResultValue()

     result is logical comparison operation for this comparison.

`.etcdserverpb.Compare.CompareResult result = 1;`

Specified by:
  `getResultValue` in interface `CompareOrBuilder`
Returns:
  The enum numeric value on the wire for result.

#### setResultValue

    public Compare.Builder setResultValue(int value)

     result is logical comparison operation for this comparison.

`.etcdserverpb.Compare.CompareResult result = 1;`

Parameters:
  `value` - The enum numeric value on the wire for result to set.
Returns:
  This builder for chaining.

#### getResult

    public Compare.CompareResult getResult()

     result is logical comparison operation for this comparison.

`.etcdserverpb.Compare.CompareResult result = 1;`

Specified by:
  `getResult` in interface `CompareOrBuilder`
Returns:
  The result.

#### setResult

    public Compare.Builder setResult(Compare.CompareResult value)

     result is logical comparison operation for this comparison.

`.etcdserverpb.Compare.CompareResult result = 1;`

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

#### clearResult

    public Compare.Builder clearResult()

     result is logical comparison operation for this comparison.

`.etcdserverpb.Compare.CompareResult result = 1;`

Returns:
  This builder for chaining.

#### getTargetValue

    public int getTargetValue()

     target is the key-value field to inspect for the comparison.

`.etcdserverpb.Compare.CompareTarget target = 2;`

Specified by:
  `getTargetValue` in interface `CompareOrBuilder`
Returns:
  The enum numeric value on the wire for target.

#### setTargetValue

    public Compare.Builder setTargetValue(int value)

     target is the key-value field to inspect for the comparison.

`.etcdserverpb.Compare.CompareTarget target = 2;`

Parameters:
  `value` - The enum numeric value on the wire for target to set.
Returns:
  This builder for chaining.

#### getTarget

    public Compare.CompareTarget getTarget()

     target is the key-value field to inspect for the comparison.

`.etcdserverpb.Compare.CompareTarget target = 2;`

Specified by:
  `getTarget` in interface `CompareOrBuilder`
Returns:
  The target.

#### setTarget

    public Compare.Builder setTarget(Compare.CompareTarget value)

     target is the key-value field to inspect for the comparison.

`.etcdserverpb.Compare.CompareTarget target = 2;`

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

#### clearTarget

    public Compare.Builder clearTarget()

     target is the key-value field to inspect for the comparison.

`.etcdserverpb.Compare.CompareTarget target = 2;`

Returns:
  This builder for chaining.

#### getKey

    public com.google.protobuf.ByteString getKey()

     key is the subject key for the comparison operation.

`bytes key = 3;`

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

#### setKey

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

     key is the subject key for the comparison operation.

`bytes key = 3;`

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

#### clearKey

    public Compare.Builder clearKey()

     key is the subject key for the comparison operation.

`bytes key = 3;`

Returns:
  This builder for chaining.

#### getVersion

    public long getVersion()

     version is the version of the given key

`int64 version = 4;`

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

#### setVersion

    public Compare.Builder setVersion(long value)

     version is the version of the given key

`int64 version = 4;`

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

#### clearVersion

    public Compare.Builder clearVersion()

     version is the version of the given key

`int64 version = 4;`

Returns:
  This builder for chaining.

#### getCreateRevision

    public long getCreateRevision()

     create_revision is the creation revision of the given key

`int64 create_revision = 5;`

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

#### setCreateRevision

    public Compare.Builder setCreateRevision(long value)

     create_revision is the creation revision of the given key

`int64 create_revision = 5;`

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

#### clearCreateRevision

    public Compare.Builder clearCreateRevision()

     create_revision is the creation revision of the given key

`int64 create_revision = 5;`

Returns:
  This builder for chaining.

#### getModRevision

    public long getModRevision()

     mod_revision is the last modified revision of the given key.

`int64 mod_revision = 6;`

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

#### setModRevision

    public Compare.Builder setModRevision(long value)

     mod_revision is the last modified revision of the given key.

`int64 mod_revision = 6;`

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

#### clearModRevision

    public Compare.Builder clearModRevision()

     mod_revision is the last modified revision of the given key.

`int64 mod_revision = 6;`

Returns:
  This builder for chaining.

#### getValue

    public com.google.protobuf.ByteString getValue()

     value is the value of the given key, in bytes.

`bytes value = 7;`

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

#### setValue

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

     value is the value of the given key, in bytes.

`bytes value = 7;`

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

#### clearValue

    public Compare.Builder clearValue()

     value is the value of the given key, in bytes.

`bytes value = 7;`

Returns:
  This builder for chaining.

#### getRangeEnd

    public com.google.protobuf.ByteString getRangeEnd()

     range_end compares the given target to all keys in the range [key, range_end).
     See RangeRequest for more details on key ranges.

`bytes range_end = 8;`

Specified by:
  `getRangeEnd` in interface `CompareOrBuilder`
Returns:
  The rangeEnd.

#### setRangeEnd

    public Compare.Builder setRangeEnd(com.google.protobuf.ByteString value)

     range_end compares the given target to all keys in the range [key, range_end).
     See RangeRequest for more details on key ranges.

`bytes range_end = 8;`

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

#### clearRangeEnd

    public Compare.Builder clearRangeEnd()

     range_end compares the given target to all keys in the range [key, range_end).
     See RangeRequest for more details on key ranges.

`bytes range_end = 8;`

Returns:
  This builder for chaining.

#### setUnknownFields

    public final Compare.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<Compare.Builder>`

#### mergeUnknownFields

    public final Compare.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<Compare.Builder>`