Class RequestOptions.Builder

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

    public static final class RequestOptions.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<RequestOptions.Builder>
    implements RequestOptionsOrBuilder
     Common request options for various APIs.
     
    Protobuf type google.spanner.v1.RequestOptions
    • 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<RequestOptions.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

        public RequestOptions.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<RequestOptions.Builder>
        Throws:
        IOException
      • getPriorityValue

        public int getPriorityValue()
         Priority for the request.
         
        .google.spanner.v1.RequestOptions.Priority priority = 1;
        Specified by:
        getPriorityValue in interface RequestOptionsOrBuilder
        Returns:
        The enum numeric value on the wire for priority.
      • setPriorityValue

        public RequestOptions.Builder setPriorityValue​(int value)
         Priority for the request.
         
        .google.spanner.v1.RequestOptions.Priority priority = 1;
        Parameters:
        value - The enum numeric value on the wire for priority to set.
        Returns:
        This builder for chaining.
      • setPriority

        public RequestOptions.Builder setPriority​(RequestOptions.Priority value)
         Priority for the request.
         
        .google.spanner.v1.RequestOptions.Priority priority = 1;
        Parameters:
        value - The priority to set.
        Returns:
        This builder for chaining.
      • clearPriority

        public RequestOptions.Builder clearPriority()
         Priority for the request.
         
        .google.spanner.v1.RequestOptions.Priority priority = 1;
        Returns:
        This builder for chaining.
      • getRequestTag

        public String getRequestTag()
         A per-request tag which can be applied to queries or reads, used for
         statistics collection.
         Both request_tag and transaction_tag can be specified for a read or query
         that belongs to a transaction.
         This field is ignored for requests where it's not applicable (e.g.
         CommitRequest).
         Legal characters for `request_tag` values are all printable characters
         (ASCII 32 - 126) and the length of a request_tag is limited to 50
         characters. Values that exceed this limit are truncated.
         Any leading underscore (_) characters will be removed from the string.
         
        string request_tag = 2;
        Specified by:
        getRequestTag in interface RequestOptionsOrBuilder
        Returns:
        The requestTag.
      • getRequestTagBytes

        public com.google.protobuf.ByteString getRequestTagBytes()
         A per-request tag which can be applied to queries or reads, used for
         statistics collection.
         Both request_tag and transaction_tag can be specified for a read or query
         that belongs to a transaction.
         This field is ignored for requests where it's not applicable (e.g.
         CommitRequest).
         Legal characters for `request_tag` values are all printable characters
         (ASCII 32 - 126) and the length of a request_tag is limited to 50
         characters. Values that exceed this limit are truncated.
         Any leading underscore (_) characters will be removed from the string.
         
        string request_tag = 2;
        Specified by:
        getRequestTagBytes in interface RequestOptionsOrBuilder
        Returns:
        The bytes for requestTag.
      • setRequestTag

        public RequestOptions.Builder setRequestTag​(String value)
         A per-request tag which can be applied to queries or reads, used for
         statistics collection.
         Both request_tag and transaction_tag can be specified for a read or query
         that belongs to a transaction.
         This field is ignored for requests where it's not applicable (e.g.
         CommitRequest).
         Legal characters for `request_tag` values are all printable characters
         (ASCII 32 - 126) and the length of a request_tag is limited to 50
         characters. Values that exceed this limit are truncated.
         Any leading underscore (_) characters will be removed from the string.
         
        string request_tag = 2;
        Parameters:
        value - The requestTag to set.
        Returns:
        This builder for chaining.
      • clearRequestTag

        public RequestOptions.Builder clearRequestTag()
         A per-request tag which can be applied to queries or reads, used for
         statistics collection.
         Both request_tag and transaction_tag can be specified for a read or query
         that belongs to a transaction.
         This field is ignored for requests where it's not applicable (e.g.
         CommitRequest).
         Legal characters for `request_tag` values are all printable characters
         (ASCII 32 - 126) and the length of a request_tag is limited to 50
         characters. Values that exceed this limit are truncated.
         Any leading underscore (_) characters will be removed from the string.
         
        string request_tag = 2;
        Returns:
        This builder for chaining.
      • setRequestTagBytes

        public RequestOptions.Builder setRequestTagBytes​(com.google.protobuf.ByteString value)
         A per-request tag which can be applied to queries or reads, used for
         statistics collection.
         Both request_tag and transaction_tag can be specified for a read or query
         that belongs to a transaction.
         This field is ignored for requests where it's not applicable (e.g.
         CommitRequest).
         Legal characters for `request_tag` values are all printable characters
         (ASCII 32 - 126) and the length of a request_tag is limited to 50
         characters. Values that exceed this limit are truncated.
         Any leading underscore (_) characters will be removed from the string.
         
        string request_tag = 2;
        Parameters:
        value - The bytes for requestTag to set.
        Returns:
        This builder for chaining.
      • getTransactionTag

        public String getTransactionTag()
         A tag used for statistics collection about this transaction.
         Both request_tag and transaction_tag can be specified for a read or query
         that belongs to a transaction.
         The value of transaction_tag should be the same for all requests belonging
         to the same transaction.
         If this request doesn't belong to any transaction, transaction_tag will be
         ignored.
         Legal characters for `transaction_tag` values are all printable characters
         (ASCII 32 - 126) and the length of a transaction_tag is limited to 50
         characters. Values that exceed this limit are truncated.
         Any leading underscore (_) characters will be removed from the string.
         
        string transaction_tag = 3;
        Specified by:
        getTransactionTag in interface RequestOptionsOrBuilder
        Returns:
        The transactionTag.
      • getTransactionTagBytes

        public com.google.protobuf.ByteString getTransactionTagBytes()
         A tag used for statistics collection about this transaction.
         Both request_tag and transaction_tag can be specified for a read or query
         that belongs to a transaction.
         The value of transaction_tag should be the same for all requests belonging
         to the same transaction.
         If this request doesn't belong to any transaction, transaction_tag will be
         ignored.
         Legal characters for `transaction_tag` values are all printable characters
         (ASCII 32 - 126) and the length of a transaction_tag is limited to 50
         characters. Values that exceed this limit are truncated.
         Any leading underscore (_) characters will be removed from the string.
         
        string transaction_tag = 3;
        Specified by:
        getTransactionTagBytes in interface RequestOptionsOrBuilder
        Returns:
        The bytes for transactionTag.
      • setTransactionTag

        public RequestOptions.Builder setTransactionTag​(String value)
         A tag used for statistics collection about this transaction.
         Both request_tag and transaction_tag can be specified for a read or query
         that belongs to a transaction.
         The value of transaction_tag should be the same for all requests belonging
         to the same transaction.
         If this request doesn't belong to any transaction, transaction_tag will be
         ignored.
         Legal characters for `transaction_tag` values are all printable characters
         (ASCII 32 - 126) and the length of a transaction_tag is limited to 50
         characters. Values that exceed this limit are truncated.
         Any leading underscore (_) characters will be removed from the string.
         
        string transaction_tag = 3;
        Parameters:
        value - The transactionTag to set.
        Returns:
        This builder for chaining.
      • clearTransactionTag

        public RequestOptions.Builder clearTransactionTag()
         A tag used for statistics collection about this transaction.
         Both request_tag and transaction_tag can be specified for a read or query
         that belongs to a transaction.
         The value of transaction_tag should be the same for all requests belonging
         to the same transaction.
         If this request doesn't belong to any transaction, transaction_tag will be
         ignored.
         Legal characters for `transaction_tag` values are all printable characters
         (ASCII 32 - 126) and the length of a transaction_tag is limited to 50
         characters. Values that exceed this limit are truncated.
         Any leading underscore (_) characters will be removed from the string.
         
        string transaction_tag = 3;
        Returns:
        This builder for chaining.
      • setTransactionTagBytes

        public RequestOptions.Builder setTransactionTagBytes​(com.google.protobuf.ByteString value)
         A tag used for statistics collection about this transaction.
         Both request_tag and transaction_tag can be specified for a read or query
         that belongs to a transaction.
         The value of transaction_tag should be the same for all requests belonging
         to the same transaction.
         If this request doesn't belong to any transaction, transaction_tag will be
         ignored.
         Legal characters for `transaction_tag` values are all printable characters
         (ASCII 32 - 126) and the length of a transaction_tag is limited to 50
         characters. Values that exceed this limit are truncated.
         Any leading underscore (_) characters will be removed from the string.
         
        string transaction_tag = 3;
        Parameters:
        value - The bytes for transactionTag to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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