Class ReadRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder>
com.google.spanner.v1.ReadRequest.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ReadRequestOrBuilder, Cloneable
Enclosing class:
ReadRequest

public static final class ReadRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ReadRequest.Builder> implements ReadRequestOrBuilder
 The request for [Read][google.spanner.v1.Spanner.Read] and
 [StreamingRead][google.spanner.v1.Spanner.StreamingRead].
 
Protobuf type google.spanner.v1.ReadRequest
  • 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<ReadRequest.Builder>
    • clear

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

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

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

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

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

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

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

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

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

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

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

      public ReadRequest.Builder mergeFrom(ReadRequest other)
    • isInitialized

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

      public ReadRequest.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<ReadRequest.Builder>
      Throws:
      IOException
    • getSession

      public String getSession()
       Required. The session in which the read should be performed.
       
      string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getSession in interface ReadRequestOrBuilder
      Returns:
      The session.
    • getSessionBytes

      public com.google.protobuf.ByteString getSessionBytes()
       Required. The session in which the read should be performed.
       
      string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getSessionBytes in interface ReadRequestOrBuilder
      Returns:
      The bytes for session.
    • setSession

      public ReadRequest.Builder setSession(String value)
       Required. The session in which the read should be performed.
       
      string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The session to set.
      Returns:
      This builder for chaining.
    • clearSession

      public ReadRequest.Builder clearSession()
       Required. The session in which the read should be performed.
       
      string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setSessionBytes

      public ReadRequest.Builder setSessionBytes(com.google.protobuf.ByteString value)
       Required. The session in which the read should be performed.
       
      string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for session to set.
      Returns:
      This builder for chaining.
    • hasTransaction

      public boolean hasTransaction()
       The transaction to use. If none is provided, the default is a
       temporary read-only transaction with strong concurrency.
       
      .google.spanner.v1.TransactionSelector transaction = 2;
      Specified by:
      hasTransaction in interface ReadRequestOrBuilder
      Returns:
      Whether the transaction field is set.
    • getTransaction

      public TransactionSelector getTransaction()
       The transaction to use. If none is provided, the default is a
       temporary read-only transaction with strong concurrency.
       
      .google.spanner.v1.TransactionSelector transaction = 2;
      Specified by:
      getTransaction in interface ReadRequestOrBuilder
      Returns:
      The transaction.
    • setTransaction

      public ReadRequest.Builder setTransaction(TransactionSelector value)
       The transaction to use. If none is provided, the default is a
       temporary read-only transaction with strong concurrency.
       
      .google.spanner.v1.TransactionSelector transaction = 2;
    • setTransaction

      public ReadRequest.Builder setTransaction(TransactionSelector.Builder builderForValue)
       The transaction to use. If none is provided, the default is a
       temporary read-only transaction with strong concurrency.
       
      .google.spanner.v1.TransactionSelector transaction = 2;
    • mergeTransaction

      public ReadRequest.Builder mergeTransaction(TransactionSelector value)
       The transaction to use. If none is provided, the default is a
       temporary read-only transaction with strong concurrency.
       
      .google.spanner.v1.TransactionSelector transaction = 2;
    • clearTransaction

      public ReadRequest.Builder clearTransaction()
       The transaction to use. If none is provided, the default is a
       temporary read-only transaction with strong concurrency.
       
      .google.spanner.v1.TransactionSelector transaction = 2;
    • getTransactionBuilder

      public TransactionSelector.Builder getTransactionBuilder()
       The transaction to use. If none is provided, the default is a
       temporary read-only transaction with strong concurrency.
       
      .google.spanner.v1.TransactionSelector transaction = 2;
    • getTransactionOrBuilder

      public TransactionSelectorOrBuilder getTransactionOrBuilder()
       The transaction to use. If none is provided, the default is a
       temporary read-only transaction with strong concurrency.
       
      .google.spanner.v1.TransactionSelector transaction = 2;
      Specified by:
      getTransactionOrBuilder in interface ReadRequestOrBuilder
    • getTable

      public String getTable()
       Required. The name of the table in the database to be read.
       
      string table = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTable in interface ReadRequestOrBuilder
      Returns:
      The table.
    • getTableBytes

      public com.google.protobuf.ByteString getTableBytes()
       Required. The name of the table in the database to be read.
       
      string table = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTableBytes in interface ReadRequestOrBuilder
      Returns:
      The bytes for table.
    • setTable

      public ReadRequest.Builder setTable(String value)
       Required. The name of the table in the database to be read.
       
      string table = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The table to set.
      Returns:
      This builder for chaining.
    • clearTable

      public ReadRequest.Builder clearTable()
       Required. The name of the table in the database to be read.
       
      string table = 3 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setTableBytes

      public ReadRequest.Builder setTableBytes(com.google.protobuf.ByteString value)
       Required. The name of the table in the database to be read.
       
      string table = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for table to set.
      Returns:
      This builder for chaining.
    • getIndex

      public String getIndex()
       If non-empty, the name of an index on
       [table][google.spanner.v1.ReadRequest.table]. This index is used instead of
       the table primary key when interpreting
       [key_set][google.spanner.v1.ReadRequest.key_set] and sorting result rows.
       See [key_set][google.spanner.v1.ReadRequest.key_set] for further
       information.
       
      string index = 4;
      Specified by:
      getIndex in interface ReadRequestOrBuilder
      Returns:
      The index.
    • getIndexBytes

      public com.google.protobuf.ByteString getIndexBytes()
       If non-empty, the name of an index on
       [table][google.spanner.v1.ReadRequest.table]. This index is used instead of
       the table primary key when interpreting
       [key_set][google.spanner.v1.ReadRequest.key_set] and sorting result rows.
       See [key_set][google.spanner.v1.ReadRequest.key_set] for further
       information.
       
      string index = 4;
      Specified by:
      getIndexBytes in interface ReadRequestOrBuilder
      Returns:
      The bytes for index.
    • setIndex

      public ReadRequest.Builder setIndex(String value)
       If non-empty, the name of an index on
       [table][google.spanner.v1.ReadRequest.table]. This index is used instead of
       the table primary key when interpreting
       [key_set][google.spanner.v1.ReadRequest.key_set] and sorting result rows.
       See [key_set][google.spanner.v1.ReadRequest.key_set] for further
       information.
       
      string index = 4;
      Parameters:
      value - The index to set.
      Returns:
      This builder for chaining.
    • clearIndex

      public ReadRequest.Builder clearIndex()
       If non-empty, the name of an index on
       [table][google.spanner.v1.ReadRequest.table]. This index is used instead of
       the table primary key when interpreting
       [key_set][google.spanner.v1.ReadRequest.key_set] and sorting result rows.
       See [key_set][google.spanner.v1.ReadRequest.key_set] for further
       information.
       
      string index = 4;
      Returns:
      This builder for chaining.
    • setIndexBytes

      public ReadRequest.Builder setIndexBytes(com.google.protobuf.ByteString value)
       If non-empty, the name of an index on
       [table][google.spanner.v1.ReadRequest.table]. This index is used instead of
       the table primary key when interpreting
       [key_set][google.spanner.v1.ReadRequest.key_set] and sorting result rows.
       See [key_set][google.spanner.v1.ReadRequest.key_set] for further
       information.
       
      string index = 4;
      Parameters:
      value - The bytes for index to set.
      Returns:
      This builder for chaining.
    • getColumnsList

      public com.google.protobuf.ProtocolStringList getColumnsList()
       Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be
       returned for each row matching this request.
       
      repeated string columns = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getColumnsList in interface ReadRequestOrBuilder
      Returns:
      A list containing the columns.
    • getColumnsCount

      public int getColumnsCount()
       Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be
       returned for each row matching this request.
       
      repeated string columns = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getColumnsCount in interface ReadRequestOrBuilder
      Returns:
      The count of columns.
    • getColumns

      public String getColumns(int index)
       Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be
       returned for each row matching this request.
       
      repeated string columns = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getColumns in interface ReadRequestOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The columns at the given index.
    • getColumnsBytes

      public com.google.protobuf.ByteString getColumnsBytes(int index)
       Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be
       returned for each row matching this request.
       
      repeated string columns = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getColumnsBytes in interface ReadRequestOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the columns at the given index.
    • setColumns

      public ReadRequest.Builder setColumns(int index, String value)
       Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be
       returned for each row matching this request.
       
      repeated string columns = 5 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      index - The index to set the value at.
      value - The columns to set.
      Returns:
      This builder for chaining.
    • addColumns

      public ReadRequest.Builder addColumns(String value)
       Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be
       returned for each row matching this request.
       
      repeated string columns = 5 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The columns to add.
      Returns:
      This builder for chaining.
    • addAllColumns

      public ReadRequest.Builder addAllColumns(Iterable<String> values)
       Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be
       returned for each row matching this request.
       
      repeated string columns = 5 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      values - The columns to add.
      Returns:
      This builder for chaining.
    • clearColumns

      public ReadRequest.Builder clearColumns()
       Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be
       returned for each row matching this request.
       
      repeated string columns = 5 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • addColumnsBytes

      public ReadRequest.Builder addColumnsBytes(com.google.protobuf.ByteString value)
       Required. The columns of [table][google.spanner.v1.ReadRequest.table] to be
       returned for each row matching this request.
       
      repeated string columns = 5 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes of the columns to add.
      Returns:
      This builder for chaining.
    • hasKeySet

      public boolean hasKeySet()
       Required. `key_set` identifies the rows to be yielded. `key_set` names the
       primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to
       be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present.
       If [index][google.spanner.v1.ReadRequest.index] is present, then
       [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys
       in [index][google.spanner.v1.ReadRequest.index].
      
       If the [partition_token][google.spanner.v1.ReadRequest.partition_token]
       field is empty, rows are yielded in table primary key order (if
       [index][google.spanner.v1.ReadRequest.index] is empty) or index key order
       (if [index][google.spanner.v1.ReadRequest.index] is non-empty).  If the
       [partition_token][google.spanner.v1.ReadRequest.partition_token] field is
       not empty, rows will be yielded in an unspecified order.
      
       It is not an error for the `key_set` to name rows that do not
       exist in the database. Read yields nothing for nonexistent rows.
       
      .google.spanner.v1.KeySet key_set = 6 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasKeySet in interface ReadRequestOrBuilder
      Returns:
      Whether the keySet field is set.
    • getKeySet

      public KeySet getKeySet()
       Required. `key_set` identifies the rows to be yielded. `key_set` names the
       primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to
       be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present.
       If [index][google.spanner.v1.ReadRequest.index] is present, then
       [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys
       in [index][google.spanner.v1.ReadRequest.index].
      
       If the [partition_token][google.spanner.v1.ReadRequest.partition_token]
       field is empty, rows are yielded in table primary key order (if
       [index][google.spanner.v1.ReadRequest.index] is empty) or index key order
       (if [index][google.spanner.v1.ReadRequest.index] is non-empty).  If the
       [partition_token][google.spanner.v1.ReadRequest.partition_token] field is
       not empty, rows will be yielded in an unspecified order.
      
       It is not an error for the `key_set` to name rows that do not
       exist in the database. Read yields nothing for nonexistent rows.
       
      .google.spanner.v1.KeySet key_set = 6 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getKeySet in interface ReadRequestOrBuilder
      Returns:
      The keySet.
    • setKeySet

      public ReadRequest.Builder setKeySet(KeySet value)
       Required. `key_set` identifies the rows to be yielded. `key_set` names the
       primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to
       be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present.
       If [index][google.spanner.v1.ReadRequest.index] is present, then
       [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys
       in [index][google.spanner.v1.ReadRequest.index].
      
       If the [partition_token][google.spanner.v1.ReadRequest.partition_token]
       field is empty, rows are yielded in table primary key order (if
       [index][google.spanner.v1.ReadRequest.index] is empty) or index key order
       (if [index][google.spanner.v1.ReadRequest.index] is non-empty).  If the
       [partition_token][google.spanner.v1.ReadRequest.partition_token] field is
       not empty, rows will be yielded in an unspecified order.
      
       It is not an error for the `key_set` to name rows that do not
       exist in the database. Read yields nothing for nonexistent rows.
       
      .google.spanner.v1.KeySet key_set = 6 [(.google.api.field_behavior) = REQUIRED];
    • setKeySet

      public ReadRequest.Builder setKeySet(KeySet.Builder builderForValue)
       Required. `key_set` identifies the rows to be yielded. `key_set` names the
       primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to
       be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present.
       If [index][google.spanner.v1.ReadRequest.index] is present, then
       [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys
       in [index][google.spanner.v1.ReadRequest.index].
      
       If the [partition_token][google.spanner.v1.ReadRequest.partition_token]
       field is empty, rows are yielded in table primary key order (if
       [index][google.spanner.v1.ReadRequest.index] is empty) or index key order
       (if [index][google.spanner.v1.ReadRequest.index] is non-empty).  If the
       [partition_token][google.spanner.v1.ReadRequest.partition_token] field is
       not empty, rows will be yielded in an unspecified order.
      
       It is not an error for the `key_set` to name rows that do not
       exist in the database. Read yields nothing for nonexistent rows.
       
      .google.spanner.v1.KeySet key_set = 6 [(.google.api.field_behavior) = REQUIRED];
    • mergeKeySet

      public ReadRequest.Builder mergeKeySet(KeySet value)
       Required. `key_set` identifies the rows to be yielded. `key_set` names the
       primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to
       be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present.
       If [index][google.spanner.v1.ReadRequest.index] is present, then
       [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys
       in [index][google.spanner.v1.ReadRequest.index].
      
       If the [partition_token][google.spanner.v1.ReadRequest.partition_token]
       field is empty, rows are yielded in table primary key order (if
       [index][google.spanner.v1.ReadRequest.index] is empty) or index key order
       (if [index][google.spanner.v1.ReadRequest.index] is non-empty).  If the
       [partition_token][google.spanner.v1.ReadRequest.partition_token] field is
       not empty, rows will be yielded in an unspecified order.
      
       It is not an error for the `key_set` to name rows that do not
       exist in the database. Read yields nothing for nonexistent rows.
       
      .google.spanner.v1.KeySet key_set = 6 [(.google.api.field_behavior) = REQUIRED];
    • clearKeySet

      public ReadRequest.Builder clearKeySet()
       Required. `key_set` identifies the rows to be yielded. `key_set` names the
       primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to
       be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present.
       If [index][google.spanner.v1.ReadRequest.index] is present, then
       [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys
       in [index][google.spanner.v1.ReadRequest.index].
      
       If the [partition_token][google.spanner.v1.ReadRequest.partition_token]
       field is empty, rows are yielded in table primary key order (if
       [index][google.spanner.v1.ReadRequest.index] is empty) or index key order
       (if [index][google.spanner.v1.ReadRequest.index] is non-empty).  If the
       [partition_token][google.spanner.v1.ReadRequest.partition_token] field is
       not empty, rows will be yielded in an unspecified order.
      
       It is not an error for the `key_set` to name rows that do not
       exist in the database. Read yields nothing for nonexistent rows.
       
      .google.spanner.v1.KeySet key_set = 6 [(.google.api.field_behavior) = REQUIRED];
    • getKeySetBuilder

      public KeySet.Builder getKeySetBuilder()
       Required. `key_set` identifies the rows to be yielded. `key_set` names the
       primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to
       be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present.
       If [index][google.spanner.v1.ReadRequest.index] is present, then
       [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys
       in [index][google.spanner.v1.ReadRequest.index].
      
       If the [partition_token][google.spanner.v1.ReadRequest.partition_token]
       field is empty, rows are yielded in table primary key order (if
       [index][google.spanner.v1.ReadRequest.index] is empty) or index key order
       (if [index][google.spanner.v1.ReadRequest.index] is non-empty).  If the
       [partition_token][google.spanner.v1.ReadRequest.partition_token] field is
       not empty, rows will be yielded in an unspecified order.
      
       It is not an error for the `key_set` to name rows that do not
       exist in the database. Read yields nothing for nonexistent rows.
       
      .google.spanner.v1.KeySet key_set = 6 [(.google.api.field_behavior) = REQUIRED];
    • getKeySetOrBuilder

      public KeySetOrBuilder getKeySetOrBuilder()
       Required. `key_set` identifies the rows to be yielded. `key_set` names the
       primary keys of the rows in [table][google.spanner.v1.ReadRequest.table] to
       be yielded, unless [index][google.spanner.v1.ReadRequest.index] is present.
       If [index][google.spanner.v1.ReadRequest.index] is present, then
       [key_set][google.spanner.v1.ReadRequest.key_set] instead names index keys
       in [index][google.spanner.v1.ReadRequest.index].
      
       If the [partition_token][google.spanner.v1.ReadRequest.partition_token]
       field is empty, rows are yielded in table primary key order (if
       [index][google.spanner.v1.ReadRequest.index] is empty) or index key order
       (if [index][google.spanner.v1.ReadRequest.index] is non-empty).  If the
       [partition_token][google.spanner.v1.ReadRequest.partition_token] field is
       not empty, rows will be yielded in an unspecified order.
      
       It is not an error for the `key_set` to name rows that do not
       exist in the database. Read yields nothing for nonexistent rows.
       
      .google.spanner.v1.KeySet key_set = 6 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getKeySetOrBuilder in interface ReadRequestOrBuilder
    • getLimit

      public long getLimit()
       If greater than zero, only the first `limit` rows are yielded. If `limit`
       is zero, the default is no limit. A limit cannot be specified if
       `partition_token` is set.
       
      int64 limit = 8;
      Specified by:
      getLimit in interface ReadRequestOrBuilder
      Returns:
      The limit.
    • setLimit

      public ReadRequest.Builder setLimit(long value)
       If greater than zero, only the first `limit` rows are yielded. If `limit`
       is zero, the default is no limit. A limit cannot be specified if
       `partition_token` is set.
       
      int64 limit = 8;
      Parameters:
      value - The limit to set.
      Returns:
      This builder for chaining.
    • clearLimit

      public ReadRequest.Builder clearLimit()
       If greater than zero, only the first `limit` rows are yielded. If `limit`
       is zero, the default is no limit. A limit cannot be specified if
       `partition_token` is set.
       
      int64 limit = 8;
      Returns:
      This builder for chaining.
    • getResumeToken

      public com.google.protobuf.ByteString getResumeToken()
       If this request is resuming a previously interrupted read,
       `resume_token` should be copied from the last
       [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the
       interruption. Doing this enables the new read to resume where the last read
       left off. The rest of the request parameters must exactly match the request
       that yielded this token.
       
      bytes resume_token = 9;
      Specified by:
      getResumeToken in interface ReadRequestOrBuilder
      Returns:
      The resumeToken.
    • setResumeToken

      public ReadRequest.Builder setResumeToken(com.google.protobuf.ByteString value)
       If this request is resuming a previously interrupted read,
       `resume_token` should be copied from the last
       [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the
       interruption. Doing this enables the new read to resume where the last read
       left off. The rest of the request parameters must exactly match the request
       that yielded this token.
       
      bytes resume_token = 9;
      Parameters:
      value - The resumeToken to set.
      Returns:
      This builder for chaining.
    • clearResumeToken

      public ReadRequest.Builder clearResumeToken()
       If this request is resuming a previously interrupted read,
       `resume_token` should be copied from the last
       [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the
       interruption. Doing this enables the new read to resume where the last read
       left off. The rest of the request parameters must exactly match the request
       that yielded this token.
       
      bytes resume_token = 9;
      Returns:
      This builder for chaining.
    • getPartitionToken

      public com.google.protobuf.ByteString getPartitionToken()
       If present, results will be restricted to the specified partition
       previously created using PartitionRead().    There must be an exact
       match for the values of fields common to this message and the
       PartitionReadRequest message used to create this partition_token.
       
      bytes partition_token = 10;
      Specified by:
      getPartitionToken in interface ReadRequestOrBuilder
      Returns:
      The partitionToken.
    • setPartitionToken

      public ReadRequest.Builder setPartitionToken(com.google.protobuf.ByteString value)
       If present, results will be restricted to the specified partition
       previously created using PartitionRead().    There must be an exact
       match for the values of fields common to this message and the
       PartitionReadRequest message used to create this partition_token.
       
      bytes partition_token = 10;
      Parameters:
      value - The partitionToken to set.
      Returns:
      This builder for chaining.
    • clearPartitionToken

      public ReadRequest.Builder clearPartitionToken()
       If present, results will be restricted to the specified partition
       previously created using PartitionRead().    There must be an exact
       match for the values of fields common to this message and the
       PartitionReadRequest message used to create this partition_token.
       
      bytes partition_token = 10;
      Returns:
      This builder for chaining.
    • hasRequestOptions

      public boolean hasRequestOptions()
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 11;
      Specified by:
      hasRequestOptions in interface ReadRequestOrBuilder
      Returns:
      Whether the requestOptions field is set.
    • getRequestOptions

      public RequestOptions getRequestOptions()
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 11;
      Specified by:
      getRequestOptions in interface ReadRequestOrBuilder
      Returns:
      The requestOptions.
    • setRequestOptions

      public ReadRequest.Builder setRequestOptions(RequestOptions value)
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 11;
    • setRequestOptions

      public ReadRequest.Builder setRequestOptions(RequestOptions.Builder builderForValue)
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 11;
    • mergeRequestOptions

      public ReadRequest.Builder mergeRequestOptions(RequestOptions value)
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 11;
    • clearRequestOptions

      public ReadRequest.Builder clearRequestOptions()
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 11;
    • getRequestOptionsBuilder

      public RequestOptions.Builder getRequestOptionsBuilder()
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 11;
    • getRequestOptionsOrBuilder

      public RequestOptionsOrBuilder getRequestOptionsOrBuilder()
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 11;
      Specified by:
      getRequestOptionsOrBuilder in interface ReadRequestOrBuilder
    • hasDirectedReadOptions

      public boolean hasDirectedReadOptions()
       Directed read options for this request.
       
      .google.spanner.v1.DirectedReadOptions directed_read_options = 14;
      Specified by:
      hasDirectedReadOptions in interface ReadRequestOrBuilder
      Returns:
      Whether the directedReadOptions field is set.
    • getDirectedReadOptions

      public DirectedReadOptions getDirectedReadOptions()
       Directed read options for this request.
       
      .google.spanner.v1.DirectedReadOptions directed_read_options = 14;
      Specified by:
      getDirectedReadOptions in interface ReadRequestOrBuilder
      Returns:
      The directedReadOptions.
    • setDirectedReadOptions

      public ReadRequest.Builder setDirectedReadOptions(DirectedReadOptions value)
       Directed read options for this request.
       
      .google.spanner.v1.DirectedReadOptions directed_read_options = 14;
    • setDirectedReadOptions

      public ReadRequest.Builder setDirectedReadOptions(DirectedReadOptions.Builder builderForValue)
       Directed read options for this request.
       
      .google.spanner.v1.DirectedReadOptions directed_read_options = 14;
    • mergeDirectedReadOptions

      public ReadRequest.Builder mergeDirectedReadOptions(DirectedReadOptions value)
       Directed read options for this request.
       
      .google.spanner.v1.DirectedReadOptions directed_read_options = 14;
    • clearDirectedReadOptions

      public ReadRequest.Builder clearDirectedReadOptions()
       Directed read options for this request.
       
      .google.spanner.v1.DirectedReadOptions directed_read_options = 14;
    • getDirectedReadOptionsBuilder

      public DirectedReadOptions.Builder getDirectedReadOptionsBuilder()
       Directed read options for this request.
       
      .google.spanner.v1.DirectedReadOptions directed_read_options = 14;
    • getDirectedReadOptionsOrBuilder

      public DirectedReadOptionsOrBuilder getDirectedReadOptionsOrBuilder()
       Directed read options for this request.
       
      .google.spanner.v1.DirectedReadOptions directed_read_options = 14;
      Specified by:
      getDirectedReadOptionsOrBuilder in interface ReadRequestOrBuilder
    • getDataBoostEnabled

      public boolean getDataBoostEnabled()
       If this is for a partitioned read and this field is set to `true`, the
       request is executed with Spanner Data Boost independent compute resources.
      
       If the field is set to `true` but the request does not set
       `partition_token`, the API returns an `INVALID_ARGUMENT` error.
       
      bool data_boost_enabled = 15;
      Specified by:
      getDataBoostEnabled in interface ReadRequestOrBuilder
      Returns:
      The dataBoostEnabled.
    • setDataBoostEnabled

      public ReadRequest.Builder setDataBoostEnabled(boolean value)
       If this is for a partitioned read and this field is set to `true`, the
       request is executed with Spanner Data Boost independent compute resources.
      
       If the field is set to `true` but the request does not set
       `partition_token`, the API returns an `INVALID_ARGUMENT` error.
       
      bool data_boost_enabled = 15;
      Parameters:
      value - The dataBoostEnabled to set.
      Returns:
      This builder for chaining.
    • clearDataBoostEnabled

      public ReadRequest.Builder clearDataBoostEnabled()
       If this is for a partitioned read and this field is set to `true`, the
       request is executed with Spanner Data Boost independent compute resources.
      
       If the field is set to `true` but the request does not set
       `partition_token`, the API returns an `INVALID_ARGUMENT` error.
       
      bool data_boost_enabled = 15;
      Returns:
      This builder for chaining.
    • getOrderByValue

      public int getOrderByValue()
       Optional. Order for the returned rows.
      
       By default, Spanner will return result rows in primary key order except for
       PartitionRead requests. For applications that do not require rows to be
       returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting
       `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval,
       resulting in lower latencies in certain cases (e.g. bulk point lookups).
       
      .google.spanner.v1.ReadRequest.OrderBy order_by = 16 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOrderByValue in interface ReadRequestOrBuilder
      Returns:
      The enum numeric value on the wire for orderBy.
    • setOrderByValue

      public ReadRequest.Builder setOrderByValue(int value)
       Optional. Order for the returned rows.
      
       By default, Spanner will return result rows in primary key order except for
       PartitionRead requests. For applications that do not require rows to be
       returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting
       `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval,
       resulting in lower latencies in certain cases (e.g. bulk point lookups).
       
      .google.spanner.v1.ReadRequest.OrderBy order_by = 16 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for orderBy to set.
      Returns:
      This builder for chaining.
    • getOrderBy

      public ReadRequest.OrderBy getOrderBy()
       Optional. Order for the returned rows.
      
       By default, Spanner will return result rows in primary key order except for
       PartitionRead requests. For applications that do not require rows to be
       returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting
       `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval,
       resulting in lower latencies in certain cases (e.g. bulk point lookups).
       
      .google.spanner.v1.ReadRequest.OrderBy order_by = 16 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getOrderBy in interface ReadRequestOrBuilder
      Returns:
      The orderBy.
    • setOrderBy

      public ReadRequest.Builder setOrderBy(ReadRequest.OrderBy value)
       Optional. Order for the returned rows.
      
       By default, Spanner will return result rows in primary key order except for
       PartitionRead requests. For applications that do not require rows to be
       returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting
       `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval,
       resulting in lower latencies in certain cases (e.g. bulk point lookups).
       
      .google.spanner.v1.ReadRequest.OrderBy order_by = 16 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The orderBy to set.
      Returns:
      This builder for chaining.
    • clearOrderBy

      public ReadRequest.Builder clearOrderBy()
       Optional. Order for the returned rows.
      
       By default, Spanner will return result rows in primary key order except for
       PartitionRead requests. For applications that do not require rows to be
       returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting
       `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval,
       resulting in lower latencies in certain cases (e.g. bulk point lookups).
       
      .google.spanner.v1.ReadRequest.OrderBy order_by = 16 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getLockHintValue

      public int getLockHintValue()
       Optional. Lock Hint for the request, it can only be used with read-write
       transactions.
       
      .google.spanner.v1.ReadRequest.LockHint lock_hint = 17 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLockHintValue in interface ReadRequestOrBuilder
      Returns:
      The enum numeric value on the wire for lockHint.
    • setLockHintValue

      public ReadRequest.Builder setLockHintValue(int value)
       Optional. Lock Hint for the request, it can only be used with read-write
       transactions.
       
      .google.spanner.v1.ReadRequest.LockHint lock_hint = 17 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for lockHint to set.
      Returns:
      This builder for chaining.
    • getLockHint

      public ReadRequest.LockHint getLockHint()
       Optional. Lock Hint for the request, it can only be used with read-write
       transactions.
       
      .google.spanner.v1.ReadRequest.LockHint lock_hint = 17 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLockHint in interface ReadRequestOrBuilder
      Returns:
      The lockHint.
    • setLockHint

      public ReadRequest.Builder setLockHint(ReadRequest.LockHint value)
       Optional. Lock Hint for the request, it can only be used with read-write
       transactions.
       
      .google.spanner.v1.ReadRequest.LockHint lock_hint = 17 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The lockHint to set.
      Returns:
      This builder for chaining.
    • clearLockHint

      public ReadRequest.Builder clearLockHint()
       Optional. Lock Hint for the request, it can only be used with read-write
       transactions.
       
      .google.spanner.v1.ReadRequest.LockHint lock_hint = 17 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setUnknownFields

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

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