Class KeyRecipe.Builder

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

public static final class KeyRecipe.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<KeyRecipe.Builder> implements KeyRecipeOrBuilder
 A `KeyRecipe` provides the metadata required to translate reads, mutations,
 and queries into a byte array in "sortable string format" (ssformat)that can
 be used with `Range`s to route requests. Note that the client *must* tolerate
 `KeyRecipe`s that appear to be invalid, since the `KeyRecipe` format may
 change over time. Requests with invalid `KeyRecipe`s should be routed to a
 default server.
 
Protobuf type google.spanner.v1.KeyRecipe
  • 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<KeyRecipe.Builder>
    • clear

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

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

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

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

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

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

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

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

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

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

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

      public KeyRecipe.Builder mergeFrom(KeyRecipe other)
    • isInitialized

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

      public KeyRecipe.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<KeyRecipe.Builder>
      Throws:
      IOException
    • getTargetCase

      public KeyRecipe.TargetCase getTargetCase()
      Specified by:
      getTargetCase in interface KeyRecipeOrBuilder
    • clearTarget

      public KeyRecipe.Builder clearTarget()
    • hasTableName

      public boolean hasTableName()
       A table name, matching the name from the database schema.
       
      string table_name = 1;
      Specified by:
      hasTableName in interface KeyRecipeOrBuilder
      Returns:
      Whether the tableName field is set.
    • getTableName

      public String getTableName()
       A table name, matching the name from the database schema.
       
      string table_name = 1;
      Specified by:
      getTableName in interface KeyRecipeOrBuilder
      Returns:
      The tableName.
    • getTableNameBytes

      public com.google.protobuf.ByteString getTableNameBytes()
       A table name, matching the name from the database schema.
       
      string table_name = 1;
      Specified by:
      getTableNameBytes in interface KeyRecipeOrBuilder
      Returns:
      The bytes for tableName.
    • setTableName

      public KeyRecipe.Builder setTableName(String value)
       A table name, matching the name from the database schema.
       
      string table_name = 1;
      Parameters:
      value - The tableName to set.
      Returns:
      This builder for chaining.
    • clearTableName

      public KeyRecipe.Builder clearTableName()
       A table name, matching the name from the database schema.
       
      string table_name = 1;
      Returns:
      This builder for chaining.
    • setTableNameBytes

      public KeyRecipe.Builder setTableNameBytes(com.google.protobuf.ByteString value)
       A table name, matching the name from the database schema.
       
      string table_name = 1;
      Parameters:
      value - The bytes for tableName to set.
      Returns:
      This builder for chaining.
    • hasIndexName

      public boolean hasIndexName()
       An index name, matching the name from the database schema.
       
      string index_name = 2;
      Specified by:
      hasIndexName in interface KeyRecipeOrBuilder
      Returns:
      Whether the indexName field is set.
    • getIndexName

      public String getIndexName()
       An index name, matching the name from the database schema.
       
      string index_name = 2;
      Specified by:
      getIndexName in interface KeyRecipeOrBuilder
      Returns:
      The indexName.
    • getIndexNameBytes

      public com.google.protobuf.ByteString getIndexNameBytes()
       An index name, matching the name from the database schema.
       
      string index_name = 2;
      Specified by:
      getIndexNameBytes in interface KeyRecipeOrBuilder
      Returns:
      The bytes for indexName.
    • setIndexName

      public KeyRecipe.Builder setIndexName(String value)
       An index name, matching the name from the database schema.
       
      string index_name = 2;
      Parameters:
      value - The indexName to set.
      Returns:
      This builder for chaining.
    • clearIndexName

      public KeyRecipe.Builder clearIndexName()
       An index name, matching the name from the database schema.
       
      string index_name = 2;
      Returns:
      This builder for chaining.
    • setIndexNameBytes

      public KeyRecipe.Builder setIndexNameBytes(com.google.protobuf.ByteString value)
       An index name, matching the name from the database schema.
       
      string index_name = 2;
      Parameters:
      value - The bytes for indexName to set.
      Returns:
      This builder for chaining.
    • hasOperationUid

      public boolean hasOperationUid()
       The UID of a query, matching the UID from `RoutingHint`.
       
      uint64 operation_uid = 3;
      Specified by:
      hasOperationUid in interface KeyRecipeOrBuilder
      Returns:
      Whether the operationUid field is set.
    • getOperationUid

      public long getOperationUid()
       The UID of a query, matching the UID from `RoutingHint`.
       
      uint64 operation_uid = 3;
      Specified by:
      getOperationUid in interface KeyRecipeOrBuilder
      Returns:
      The operationUid.
    • setOperationUid

      public KeyRecipe.Builder setOperationUid(long value)
       The UID of a query, matching the UID from `RoutingHint`.
       
      uint64 operation_uid = 3;
      Parameters:
      value - The operationUid to set.
      Returns:
      This builder for chaining.
    • clearOperationUid

      public KeyRecipe.Builder clearOperationUid()
       The UID of a query, matching the UID from `RoutingHint`.
       
      uint64 operation_uid = 3;
      Returns:
      This builder for chaining.
    • getPartList

      public List<KeyRecipe.Part> getPartList()
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
      Specified by:
      getPartList in interface KeyRecipeOrBuilder
    • getPartCount

      public int getPartCount()
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
      Specified by:
      getPartCount in interface KeyRecipeOrBuilder
    • getPart

      public KeyRecipe.Part getPart(int index)
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
      Specified by:
      getPart in interface KeyRecipeOrBuilder
    • setPart

      public KeyRecipe.Builder setPart(int index, KeyRecipe.Part value)
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
    • setPart

      public KeyRecipe.Builder setPart(int index, KeyRecipe.Part.Builder builderForValue)
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
    • addPart

      public KeyRecipe.Builder addPart(KeyRecipe.Part value)
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
    • addPart

      public KeyRecipe.Builder addPart(int index, KeyRecipe.Part value)
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
    • addPart

      public KeyRecipe.Builder addPart(KeyRecipe.Part.Builder builderForValue)
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
    • addPart

      public KeyRecipe.Builder addPart(int index, KeyRecipe.Part.Builder builderForValue)
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
    • addAllPart

      public KeyRecipe.Builder addAllPart(Iterable<? extends KeyRecipe.Part> values)
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
    • clearPart

      public KeyRecipe.Builder clearPart()
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
    • removePart

      public KeyRecipe.Builder removePart(int index)
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
    • getPartBuilder

      public KeyRecipe.Part.Builder getPartBuilder(int index)
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
    • getPartOrBuilder

      public KeyRecipe.PartOrBuilder getPartOrBuilder(int index)
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
      Specified by:
      getPartOrBuilder in interface KeyRecipeOrBuilder
    • getPartOrBuilderList

      public List<? extends KeyRecipe.PartOrBuilder> getPartOrBuilderList()
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
      Specified by:
      getPartOrBuilderList in interface KeyRecipeOrBuilder
    • addPartBuilder

      public KeyRecipe.Part.Builder addPartBuilder()
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
    • addPartBuilder

      public KeyRecipe.Part.Builder addPartBuilder(int index)
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
    • getPartBuilderList

      public List<KeyRecipe.Part.Builder> getPartBuilderList()
       Parts are in the order they should appear in the encoded key.
       
      repeated .google.spanner.v1.KeyRecipe.Part part = 4;
    • setUnknownFields

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

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