Class ReadOptions.Builder

  • All Implemented Interfaces:
    ReadOptionsOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    ReadOptions

    public static final class ReadOptions.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<ReadOptions.Builder>
    implements ReadOptionsOrBuilder
     The options shared by read requests.
     
    Protobuf type google.datastore.v1.ReadOptions
    • 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<ReadOptions.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

        public ReadOptions.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<ReadOptions.Builder>
      • isInitialized

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

        public ReadOptions.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<ReadOptions.Builder>
        Throws:
        IOException
      • hasReadConsistency

        public boolean hasReadConsistency()
         The non-transactional read consistency to use.
         
        .google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;
        Specified by:
        hasReadConsistency in interface ReadOptionsOrBuilder
        Returns:
        Whether the readConsistency field is set.
      • getReadConsistencyValue

        public int getReadConsistencyValue()
         The non-transactional read consistency to use.
         
        .google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;
        Specified by:
        getReadConsistencyValue in interface ReadOptionsOrBuilder
        Returns:
        The enum numeric value on the wire for readConsistency.
      • setReadConsistencyValue

        public ReadOptions.Builder setReadConsistencyValue​(int value)
         The non-transactional read consistency to use.
         
        .google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;
        Parameters:
        value - The enum numeric value on the wire for readConsistency to set.
        Returns:
        This builder for chaining.
      • setReadConsistency

        public ReadOptions.Builder setReadConsistency​(ReadOptions.ReadConsistency value)
         The non-transactional read consistency to use.
         
        .google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;
        Parameters:
        value - The readConsistency to set.
        Returns:
        This builder for chaining.
      • clearReadConsistency

        public ReadOptions.Builder clearReadConsistency()
         The non-transactional read consistency to use.
         
        .google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;
        Returns:
        This builder for chaining.
      • hasTransaction

        public boolean hasTransaction()
         The identifier of the transaction in which to read. A
         transaction identifier is returned by a call to
         [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
         
        bytes transaction = 2;
        Specified by:
        hasTransaction in interface ReadOptionsOrBuilder
        Returns:
        Whether the transaction field is set.
      • getTransaction

        public com.google.protobuf.ByteString getTransaction()
         The identifier of the transaction in which to read. A
         transaction identifier is returned by a call to
         [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
         
        bytes transaction = 2;
        Specified by:
        getTransaction in interface ReadOptionsOrBuilder
        Returns:
        The transaction.
      • setTransaction

        public ReadOptions.Builder setTransaction​(com.google.protobuf.ByteString value)
         The identifier of the transaction in which to read. A
         transaction identifier is returned by a call to
         [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
         
        bytes transaction = 2;
        Parameters:
        value - The transaction to set.
        Returns:
        This builder for chaining.
      • clearTransaction

        public ReadOptions.Builder clearTransaction()
         The identifier of the transaction in which to read. A
         transaction identifier is returned by a call to
         [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
         
        bytes transaction = 2;
        Returns:
        This builder for chaining.
      • hasNewTransaction

        public boolean hasNewTransaction()
         Options for beginning a new transaction for this request.
        
         The new transaction identifier will be returned in the corresponding
         response as either
         [LookupResponse.transaction][google.datastore.v1.LookupResponse.transaction]
         or
         [RunQueryResponse.transaction][google.datastore.v1.RunQueryResponse.transaction].
         
        .google.datastore.v1.TransactionOptions new_transaction = 3;
        Specified by:
        hasNewTransaction in interface ReadOptionsOrBuilder
        Returns:
        Whether the newTransaction field is set.
      • getNewTransaction

        public TransactionOptions getNewTransaction()
         Options for beginning a new transaction for this request.
        
         The new transaction identifier will be returned in the corresponding
         response as either
         [LookupResponse.transaction][google.datastore.v1.LookupResponse.transaction]
         or
         [RunQueryResponse.transaction][google.datastore.v1.RunQueryResponse.transaction].
         
        .google.datastore.v1.TransactionOptions new_transaction = 3;
        Specified by:
        getNewTransaction in interface ReadOptionsOrBuilder
        Returns:
        The newTransaction.
      • setNewTransaction

        public ReadOptions.Builder setNewTransaction​(TransactionOptions value)
         Options for beginning a new transaction for this request.
        
         The new transaction identifier will be returned in the corresponding
         response as either
         [LookupResponse.transaction][google.datastore.v1.LookupResponse.transaction]
         or
         [RunQueryResponse.transaction][google.datastore.v1.RunQueryResponse.transaction].
         
        .google.datastore.v1.TransactionOptions new_transaction = 3;
      • setNewTransaction

        public ReadOptions.Builder setNewTransaction​(TransactionOptions.Builder builderForValue)
         Options for beginning a new transaction for this request.
        
         The new transaction identifier will be returned in the corresponding
         response as either
         [LookupResponse.transaction][google.datastore.v1.LookupResponse.transaction]
         or
         [RunQueryResponse.transaction][google.datastore.v1.RunQueryResponse.transaction].
         
        .google.datastore.v1.TransactionOptions new_transaction = 3;
      • mergeNewTransaction

        public ReadOptions.Builder mergeNewTransaction​(TransactionOptions value)
         Options for beginning a new transaction for this request.
        
         The new transaction identifier will be returned in the corresponding
         response as either
         [LookupResponse.transaction][google.datastore.v1.LookupResponse.transaction]
         or
         [RunQueryResponse.transaction][google.datastore.v1.RunQueryResponse.transaction].
         
        .google.datastore.v1.TransactionOptions new_transaction = 3;
      • clearNewTransaction

        public ReadOptions.Builder clearNewTransaction()
         Options for beginning a new transaction for this request.
        
         The new transaction identifier will be returned in the corresponding
         response as either
         [LookupResponse.transaction][google.datastore.v1.LookupResponse.transaction]
         or
         [RunQueryResponse.transaction][google.datastore.v1.RunQueryResponse.transaction].
         
        .google.datastore.v1.TransactionOptions new_transaction = 3;
      • getNewTransactionBuilder

        public TransactionOptions.Builder getNewTransactionBuilder()
         Options for beginning a new transaction for this request.
        
         The new transaction identifier will be returned in the corresponding
         response as either
         [LookupResponse.transaction][google.datastore.v1.LookupResponse.transaction]
         or
         [RunQueryResponse.transaction][google.datastore.v1.RunQueryResponse.transaction].
         
        .google.datastore.v1.TransactionOptions new_transaction = 3;
      • getNewTransactionOrBuilder

        public TransactionOptionsOrBuilder getNewTransactionOrBuilder()
         Options for beginning a new transaction for this request.
        
         The new transaction identifier will be returned in the corresponding
         response as either
         [LookupResponse.transaction][google.datastore.v1.LookupResponse.transaction]
         or
         [RunQueryResponse.transaction][google.datastore.v1.RunQueryResponse.transaction].
         
        .google.datastore.v1.TransactionOptions new_transaction = 3;
        Specified by:
        getNewTransactionOrBuilder in interface ReadOptionsOrBuilder
      • hasReadTime

        public boolean hasReadTime()
         Reads entities as they were at the given time. This value is only
         supported for Cloud Firestore in Datastore mode.
        
         This must be a microsecond precision timestamp within the past one hour,
         or if Point-in-Time Recovery is enabled, can additionally be a whole
         minute timestamp within the past 7 days.
         
        .google.protobuf.Timestamp read_time = 4;
        Specified by:
        hasReadTime in interface ReadOptionsOrBuilder
        Returns:
        Whether the readTime field is set.
      • getReadTime

        public com.google.protobuf.Timestamp getReadTime()
         Reads entities as they were at the given time. This value is only
         supported for Cloud Firestore in Datastore mode.
        
         This must be a microsecond precision timestamp within the past one hour,
         or if Point-in-Time Recovery is enabled, can additionally be a whole
         minute timestamp within the past 7 days.
         
        .google.protobuf.Timestamp read_time = 4;
        Specified by:
        getReadTime in interface ReadOptionsOrBuilder
        Returns:
        The readTime.
      • setReadTime

        public ReadOptions.Builder setReadTime​(com.google.protobuf.Timestamp value)
         Reads entities as they were at the given time. This value is only
         supported for Cloud Firestore in Datastore mode.
        
         This must be a microsecond precision timestamp within the past one hour,
         or if Point-in-Time Recovery is enabled, can additionally be a whole
         minute timestamp within the past 7 days.
         
        .google.protobuf.Timestamp read_time = 4;
      • setReadTime

        public ReadOptions.Builder setReadTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Reads entities as they were at the given time. This value is only
         supported for Cloud Firestore in Datastore mode.
        
         This must be a microsecond precision timestamp within the past one hour,
         or if Point-in-Time Recovery is enabled, can additionally be a whole
         minute timestamp within the past 7 days.
         
        .google.protobuf.Timestamp read_time = 4;
      • mergeReadTime

        public ReadOptions.Builder mergeReadTime​(com.google.protobuf.Timestamp value)
         Reads entities as they were at the given time. This value is only
         supported for Cloud Firestore in Datastore mode.
        
         This must be a microsecond precision timestamp within the past one hour,
         or if Point-in-Time Recovery is enabled, can additionally be a whole
         minute timestamp within the past 7 days.
         
        .google.protobuf.Timestamp read_time = 4;
      • clearReadTime

        public ReadOptions.Builder clearReadTime()
         Reads entities as they were at the given time. This value is only
         supported for Cloud Firestore in Datastore mode.
        
         This must be a microsecond precision timestamp within the past one hour,
         or if Point-in-Time Recovery is enabled, can additionally be a whole
         minute timestamp within the past 7 days.
         
        .google.protobuf.Timestamp read_time = 4;
      • getReadTimeBuilder

        public com.google.protobuf.Timestamp.Builder getReadTimeBuilder()
         Reads entities as they were at the given time. This value is only
         supported for Cloud Firestore in Datastore mode.
        
         This must be a microsecond precision timestamp within the past one hour,
         or if Point-in-Time Recovery is enabled, can additionally be a whole
         minute timestamp within the past 7 days.
         
        .google.protobuf.Timestamp read_time = 4;
      • getReadTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder()
         Reads entities as they were at the given time. This value is only
         supported for Cloud Firestore in Datastore mode.
        
         This must be a microsecond precision timestamp within the past one hour,
         or if Point-in-Time Recovery is enabled, can additionally be a whole
         minute timestamp within the past 7 days.
         
        .google.protobuf.Timestamp read_time = 4;
        Specified by:
        getReadTimeOrBuilder in interface ReadOptionsOrBuilder
      • setUnknownFields

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

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