Class PutRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<PutRequest.Builder>
io.streamnative.oxia.proto.PutRequest.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, PutRequestOrBuilder, Cloneable
Enclosing class:
PutRequest

public static final class PutRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<PutRequest.Builder> implements PutRequestOrBuilder

 A put request. Persists the specified key and value
 
Protobuf type io.streamnative.oxia.proto.PutRequest
  • Method Details

    • 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<PutRequest.Builder>
    • clear

      public PutRequest.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<PutRequest.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<PutRequest.Builder>
    • getDefaultInstanceForType

      public PutRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public PutRequest build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public PutRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public PutRequest.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<PutRequest.Builder>
    • setField

      public PutRequest.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<PutRequest.Builder>
    • clearField

      public PutRequest.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<PutRequest.Builder>
    • clearOneof

      public PutRequest.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<PutRequest.Builder>
    • setRepeatedField

      public PutRequest.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<PutRequest.Builder>
    • addRepeatedField

      public PutRequest.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<PutRequest.Builder>
    • mergeFrom

      public PutRequest.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<PutRequest.Builder>
    • mergeFrom

      public PutRequest.Builder mergeFrom(PutRequest other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<PutRequest.Builder>
    • mergeFrom

      public PutRequest.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<PutRequest.Builder>
      Throws:
      IOException
    • getKey

      public String getKey()
       The key
       
      string key = 1;
      Specified by:
      getKey in interface PutRequestOrBuilder
      Returns:
      The key.
    • getKeyBytes

      public com.google.protobuf.ByteString getKeyBytes()
       The key
       
      string key = 1;
      Specified by:
      getKeyBytes in interface PutRequestOrBuilder
      Returns:
      The bytes for key.
    • setKey

      public PutRequest.Builder setKey(String value)
       The key
       
      string key = 1;
      Parameters:
      value - The key to set.
      Returns:
      This builder for chaining.
    • clearKey

      public PutRequest.Builder clearKey()
       The key
       
      string key = 1;
      Returns:
      This builder for chaining.
    • setKeyBytes

      public PutRequest.Builder setKeyBytes(com.google.protobuf.ByteString value)
       The key
       
      string key = 1;
      Parameters:
      value - The bytes for key to set.
      Returns:
      This builder for chaining.
    • getValue

      public com.google.protobuf.ByteString getValue()
       The value
       
      bytes value = 2;
      Specified by:
      getValue in interface PutRequestOrBuilder
      Returns:
      The value.
    • setValue

      public PutRequest.Builder setValue(com.google.protobuf.ByteString value)
       The value
       
      bytes value = 2;
      Parameters:
      value - The value to set.
      Returns:
      This builder for chaining.
    • clearValue

      public PutRequest.Builder clearValue()
       The value
       
      bytes value = 2;
      Returns:
      This builder for chaining.
    • hasExpectedVersionId

      public boolean hasExpectedVersionId()
       An optional expected version_id. The put will fail if the server's current version_id
       does not match
       
      optional int64 expected_version_id = 3;
      Specified by:
      hasExpectedVersionId in interface PutRequestOrBuilder
      Returns:
      Whether the expectedVersionId field is set.
    • getExpectedVersionId

      public long getExpectedVersionId()
       An optional expected version_id. The put will fail if the server's current version_id
       does not match
       
      optional int64 expected_version_id = 3;
      Specified by:
      getExpectedVersionId in interface PutRequestOrBuilder
      Returns:
      The expectedVersionId.
    • setExpectedVersionId

      public PutRequest.Builder setExpectedVersionId(long value)
       An optional expected version_id. The put will fail if the server's current version_id
       does not match
       
      optional int64 expected_version_id = 3;
      Parameters:
      value - The expectedVersionId to set.
      Returns:
      This builder for chaining.
    • clearExpectedVersionId

      public PutRequest.Builder clearExpectedVersionId()
       An optional expected version_id. The put will fail if the server's current version_id
       does not match
       
      optional int64 expected_version_id = 3;
      Returns:
      This builder for chaining.
    • hasSessionId

      public boolean hasSessionId()
       Optional. Associate the new record with the session (i.e. ephemeral record).
       When the session expires or is explicitly closed, the record will be automatically
       removed
       
      optional int64 session_id = 4;
      Specified by:
      hasSessionId in interface PutRequestOrBuilder
      Returns:
      Whether the sessionId field is set.
    • getSessionId

      public long getSessionId()
       Optional. Associate the new record with the session (i.e. ephemeral record).
       When the session expires or is explicitly closed, the record will be automatically
       removed
       
      optional int64 session_id = 4;
      Specified by:
      getSessionId in interface PutRequestOrBuilder
      Returns:
      The sessionId.
    • setSessionId

      public PutRequest.Builder setSessionId(long value)
       Optional. Associate the new record with the session (i.e. ephemeral record).
       When the session expires or is explicitly closed, the record will be automatically
       removed
       
      optional int64 session_id = 4;
      Parameters:
      value - The sessionId to set.
      Returns:
      This builder for chaining.
    • clearSessionId

      public PutRequest.Builder clearSessionId()
       Optional. Associate the new record with the session (i.e. ephemeral record).
       When the session expires or is explicitly closed, the record will be automatically
       removed
       
      optional int64 session_id = 4;
      Returns:
      This builder for chaining.
    • hasClientIdentity

      public boolean hasClientIdentity()
       Client identifier used to track the client that last modified an
       ephemeral record.
       
      optional string client_identity = 5;
      Specified by:
      hasClientIdentity in interface PutRequestOrBuilder
      Returns:
      Whether the clientIdentity field is set.
    • getClientIdentity

      public String getClientIdentity()
       Client identifier used to track the client that last modified an
       ephemeral record.
       
      optional string client_identity = 5;
      Specified by:
      getClientIdentity in interface PutRequestOrBuilder
      Returns:
      The clientIdentity.
    • getClientIdentityBytes

      public com.google.protobuf.ByteString getClientIdentityBytes()
       Client identifier used to track the client that last modified an
       ephemeral record.
       
      optional string client_identity = 5;
      Specified by:
      getClientIdentityBytes in interface PutRequestOrBuilder
      Returns:
      The bytes for clientIdentity.
    • setClientIdentity

      public PutRequest.Builder setClientIdentity(String value)
       Client identifier used to track the client that last modified an
       ephemeral record.
       
      optional string client_identity = 5;
      Parameters:
      value - The clientIdentity to set.
      Returns:
      This builder for chaining.
    • clearClientIdentity

      public PutRequest.Builder clearClientIdentity()
       Client identifier used to track the client that last modified an
       ephemeral record.
       
      optional string client_identity = 5;
      Returns:
      This builder for chaining.
    • setClientIdentityBytes

      public PutRequest.Builder setClientIdentityBytes(com.google.protobuf.ByteString value)
       Client identifier used to track the client that last modified an
       ephemeral record.
       
      optional string client_identity = 5;
      Parameters:
      value - The bytes for clientIdentity to set.
      Returns:
      This builder for chaining.
    • hasPartitionKey

      public boolean hasPartitionKey()
       If a partition key is present, it supersedes the regular record key in determining the routing of
       a record to a particular shard. It is passed to the server because it needs to be persisted as
       part of the record. We would need the partition_key if we're going to do a split of the shards.
       
      optional string partition_key = 6;
      Specified by:
      hasPartitionKey in interface PutRequestOrBuilder
      Returns:
      Whether the partitionKey field is set.
    • getPartitionKey

      public String getPartitionKey()
       If a partition key is present, it supersedes the regular record key in determining the routing of
       a record to a particular shard. It is passed to the server because it needs to be persisted as
       part of the record. We would need the partition_key if we're going to do a split of the shards.
       
      optional string partition_key = 6;
      Specified by:
      getPartitionKey in interface PutRequestOrBuilder
      Returns:
      The partitionKey.
    • getPartitionKeyBytes

      public com.google.protobuf.ByteString getPartitionKeyBytes()
       If a partition key is present, it supersedes the regular record key in determining the routing of
       a record to a particular shard. It is passed to the server because it needs to be persisted as
       part of the record. We would need the partition_key if we're going to do a split of the shards.
       
      optional string partition_key = 6;
      Specified by:
      getPartitionKeyBytes in interface PutRequestOrBuilder
      Returns:
      The bytes for partitionKey.
    • setPartitionKey

      public PutRequest.Builder setPartitionKey(String value)
       If a partition key is present, it supersedes the regular record key in determining the routing of
       a record to a particular shard. It is passed to the server because it needs to be persisted as
       part of the record. We would need the partition_key if we're going to do a split of the shards.
       
      optional string partition_key = 6;
      Parameters:
      value - The partitionKey to set.
      Returns:
      This builder for chaining.
    • clearPartitionKey

      public PutRequest.Builder clearPartitionKey()
       If a partition key is present, it supersedes the regular record key in determining the routing of
       a record to a particular shard. It is passed to the server because it needs to be persisted as
       part of the record. We would need the partition_key if we're going to do a split of the shards.
       
      optional string partition_key = 6;
      Returns:
      This builder for chaining.
    • setPartitionKeyBytes

      public PutRequest.Builder setPartitionKeyBytes(com.google.protobuf.ByteString value)
       If a partition key is present, it supersedes the regular record key in determining the routing of
       a record to a particular shard. It is passed to the server because it needs to be persisted as
       part of the record. We would need the partition_key if we're going to do a split of the shards.
       
      optional string partition_key = 6;
      Parameters:
      value - The bytes for partitionKey to set.
      Returns:
      This builder for chaining.
    • getSequenceKeyDeltaList

      public List<Long> getSequenceKeyDeltaList()
       If one or more sequence key are specified. The key will get added suffixes
       based on adding the delta to the current highest key with the same prefix
       
      repeated uint64 sequence_key_delta = 7;
      Specified by:
      getSequenceKeyDeltaList in interface PutRequestOrBuilder
      Returns:
      A list containing the sequenceKeyDelta.
    • getSequenceKeyDeltaCount

      public int getSequenceKeyDeltaCount()
       If one or more sequence key are specified. The key will get added suffixes
       based on adding the delta to the current highest key with the same prefix
       
      repeated uint64 sequence_key_delta = 7;
      Specified by:
      getSequenceKeyDeltaCount in interface PutRequestOrBuilder
      Returns:
      The count of sequenceKeyDelta.
    • getSequenceKeyDelta

      public long getSequenceKeyDelta(int index)
       If one or more sequence key are specified. The key will get added suffixes
       based on adding the delta to the current highest key with the same prefix
       
      repeated uint64 sequence_key_delta = 7;
      Specified by:
      getSequenceKeyDelta in interface PutRequestOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The sequenceKeyDelta at the given index.
    • setSequenceKeyDelta

      public PutRequest.Builder setSequenceKeyDelta(int index, long value)
       If one or more sequence key are specified. The key will get added suffixes
       based on adding the delta to the current highest key with the same prefix
       
      repeated uint64 sequence_key_delta = 7;
      Parameters:
      index - The index to set the value at.
      value - The sequenceKeyDelta to set.
      Returns:
      This builder for chaining.
    • addSequenceKeyDelta

      public PutRequest.Builder addSequenceKeyDelta(long value)
       If one or more sequence key are specified. The key will get added suffixes
       based on adding the delta to the current highest key with the same prefix
       
      repeated uint64 sequence_key_delta = 7;
      Parameters:
      value - The sequenceKeyDelta to add.
      Returns:
      This builder for chaining.
    • addAllSequenceKeyDelta

      public PutRequest.Builder addAllSequenceKeyDelta(Iterable<? extends Long> values)
       If one or more sequence key are specified. The key will get added suffixes
       based on adding the delta to the current highest key with the same prefix
       
      repeated uint64 sequence_key_delta = 7;
      Parameters:
      values - The sequenceKeyDelta to add.
      Returns:
      This builder for chaining.
    • clearSequenceKeyDelta

      public PutRequest.Builder clearSequenceKeyDelta()
       If one or more sequence key are specified. The key will get added suffixes
       based on adding the delta to the current highest key with the same prefix
       
      repeated uint64 sequence_key_delta = 7;
      Returns:
      This builder for chaining.
    • getSecondaryIndexesList

      public List<SecondaryIndex> getSecondaryIndexesList()
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
      Specified by:
      getSecondaryIndexesList in interface PutRequestOrBuilder
    • getSecondaryIndexesCount

      public int getSecondaryIndexesCount()
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
      Specified by:
      getSecondaryIndexesCount in interface PutRequestOrBuilder
    • getSecondaryIndexes

      public SecondaryIndex getSecondaryIndexes(int index)
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
      Specified by:
      getSecondaryIndexes in interface PutRequestOrBuilder
    • setSecondaryIndexes

      public PutRequest.Builder setSecondaryIndexes(int index, SecondaryIndex value)
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
    • setSecondaryIndexes

      public PutRequest.Builder setSecondaryIndexes(int index, SecondaryIndex.Builder builderForValue)
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
    • addSecondaryIndexes

      public PutRequest.Builder addSecondaryIndexes(SecondaryIndex value)
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
    • addSecondaryIndexes

      public PutRequest.Builder addSecondaryIndexes(int index, SecondaryIndex value)
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
    • addSecondaryIndexes

      public PutRequest.Builder addSecondaryIndexes(SecondaryIndex.Builder builderForValue)
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
    • addSecondaryIndexes

      public PutRequest.Builder addSecondaryIndexes(int index, SecondaryIndex.Builder builderForValue)
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
    • addAllSecondaryIndexes

      public PutRequest.Builder addAllSecondaryIndexes(Iterable<? extends SecondaryIndex> values)
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
    • clearSecondaryIndexes

      public PutRequest.Builder clearSecondaryIndexes()
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
    • removeSecondaryIndexes

      public PutRequest.Builder removeSecondaryIndexes(int index)
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
    • getSecondaryIndexesBuilder

      public SecondaryIndex.Builder getSecondaryIndexesBuilder(int index)
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
    • getSecondaryIndexesOrBuilder

      public SecondaryIndexOrBuilder getSecondaryIndexesOrBuilder(int index)
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
      Specified by:
      getSecondaryIndexesOrBuilder in interface PutRequestOrBuilder
    • getSecondaryIndexesOrBuilderList

      public List<? extends SecondaryIndexOrBuilder> getSecondaryIndexesOrBuilderList()
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
      Specified by:
      getSecondaryIndexesOrBuilderList in interface PutRequestOrBuilder
    • addSecondaryIndexesBuilder

      public SecondaryIndex.Builder addSecondaryIndexesBuilder()
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
    • addSecondaryIndexesBuilder

      public SecondaryIndex.Builder addSecondaryIndexesBuilder(int index)
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
    • getSecondaryIndexesBuilderList

      public List<SecondaryIndex.Builder> getSecondaryIndexesBuilderList()
      repeated .io.streamnative.oxia.proto.SecondaryIndex secondary_indexes = 8;
    • setUnknownFields

      public final PutRequest.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<PutRequest.Builder>
    • mergeUnknownFields

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