Package 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,java.lang.Cloneable
- Enclosing class:
- KeyValue
public static final class KeyValue.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder> implements KeyValueOrBuilder
Protobuf typemvccpb.KeyValue
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyValue.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)KeyValuebuild()KeyValuebuildPartial()KeyValue.Builderclear()KeyValue.BuilderclearCreateRevision()create_revision is the revision of last creation on this key.KeyValue.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)KeyValue.BuilderclearKey()key is the key in bytes.KeyValue.BuilderclearLease()lease is the ID of the lease that attached to key.KeyValue.BuilderclearModRevision()mod_revision is the revision of last modification on this key.KeyValue.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)KeyValue.BuilderclearValue()value is the value held by the key, in bytes.KeyValue.BuilderclearVersion()version is the version of the key.KeyValue.Builderclone()longgetCreateRevision()create_revision is the revision of last creation on this key.KeyValuegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()com.google.protobuf.ByteStringgetKey()key is the key in bytes.longgetLease()lease is the ID of the lease that attached to key.longgetModRevision()mod_revision is the revision of last modification on this key.com.google.protobuf.ByteStringgetValue()value is the value held by the key, in bytes.longgetVersion()version is the version of the key.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()KeyValue.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)KeyValue.BuildermergeFrom(com.google.protobuf.Message other)KeyValue.BuildermergeFrom(KeyValue other)KeyValue.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)KeyValue.BuildersetCreateRevision(long value)create_revision is the revision of last creation on this key.KeyValue.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)KeyValue.BuildersetKey(com.google.protobuf.ByteString value)key is the key in bytes.KeyValue.BuildersetLease(long value)lease is the ID of the lease that attached to key.KeyValue.BuildersetModRevision(long value)mod_revision is the revision of last modification on this key.KeyValue.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)KeyValue.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)KeyValue.BuildersetValue(com.google.protobuf.ByteString value)value is the value held by the key, in bytes.KeyValue.BuildersetVersion(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
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
-
clear
public KeyValue.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
-
getDefaultInstanceForType
public KeyValue getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public KeyValue build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public KeyValue buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public KeyValue.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
-
setField
public KeyValue.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
-
clearField
public KeyValue.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
-
clearOneof
public KeyValue.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
-
setRepeatedField
public KeyValue.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
-
addRepeatedField
public KeyValue.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
-
mergeFrom
public KeyValue.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<KeyValue.Builder>
-
mergeFrom
public KeyValue.Builder mergeFrom(KeyValue other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
-
mergeFrom
public KeyValue.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<KeyValue.Builder>- Throws:
java.io.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:
getKeyin interfaceKeyValueOrBuilder- 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:
getCreateRevisionin interfaceKeyValueOrBuilder- 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:
getModRevisionin interfaceKeyValueOrBuilder- 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:
getVersionin interfaceKeyValueOrBuilder- 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:
getValuein interfaceKeyValueOrBuilder- 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:
getLeasein interfaceKeyValueOrBuilder- 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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
-
mergeUnknownFields
public final KeyValue.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<KeyValue.Builder>
-
-