Class PartitionId.Builder

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

public static final class PartitionId.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<PartitionId.Builder> implements PartitionIdOrBuilder
 A partition ID identifies a grouping of entities. The grouping is always
 by project and namespace, however the namespace ID may be empty.

 A partition ID contains several dimensions:
 project ID and namespace ID.

 Partition dimensions:

 - May be `""`.
 - Must be valid UTF-8 bytes.
 - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}`
 If the value of any dimension matches regex `__.*__`, the partition is
 reserved/read-only.
 A reserved/read-only partition ID is forbidden in certain documented
 contexts.

 Foreign partition IDs (in which the project ID does
 not match the context project ID ) are discouraged.
 Reads and writes of foreign partition IDs may fail if the project is not in
 an active state.
 
Protobuf type google.datastore.v1.PartitionId
  • 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<PartitionId.Builder>
    • clear

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

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

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

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

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

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

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

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

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

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

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

      public PartitionId.Builder mergeFrom(PartitionId other)
    • isInitialized

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

      public PartitionId.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<PartitionId.Builder>
      Throws:
      IOException
    • getProjectId

      public String getProjectId()
       The ID of the project to which the entities belong.
       
      string project_id = 2;
      Specified by:
      getProjectId in interface PartitionIdOrBuilder
      Returns:
      The projectId.
    • getProjectIdBytes

      public com.google.protobuf.ByteString getProjectIdBytes()
       The ID of the project to which the entities belong.
       
      string project_id = 2;
      Specified by:
      getProjectIdBytes in interface PartitionIdOrBuilder
      Returns:
      The bytes for projectId.
    • setProjectId

      public PartitionId.Builder setProjectId(String value)
       The ID of the project to which the entities belong.
       
      string project_id = 2;
      Parameters:
      value - The projectId to set.
      Returns:
      This builder for chaining.
    • clearProjectId

      public PartitionId.Builder clearProjectId()
       The ID of the project to which the entities belong.
       
      string project_id = 2;
      Returns:
      This builder for chaining.
    • setProjectIdBytes

      public PartitionId.Builder setProjectIdBytes(com.google.protobuf.ByteString value)
       The ID of the project to which the entities belong.
       
      string project_id = 2;
      Parameters:
      value - The bytes for projectId to set.
      Returns:
      This builder for chaining.
    • getDatabaseId

      public String getDatabaseId()
       If not empty, the ID of the database to which the entities
       belong.
       
      string database_id = 3;
      Specified by:
      getDatabaseId in interface PartitionIdOrBuilder
      Returns:
      The databaseId.
    • getDatabaseIdBytes

      public com.google.protobuf.ByteString getDatabaseIdBytes()
       If not empty, the ID of the database to which the entities
       belong.
       
      string database_id = 3;
      Specified by:
      getDatabaseIdBytes in interface PartitionIdOrBuilder
      Returns:
      The bytes for databaseId.
    • setDatabaseId

      public PartitionId.Builder setDatabaseId(String value)
       If not empty, the ID of the database to which the entities
       belong.
       
      string database_id = 3;
      Parameters:
      value - The databaseId to set.
      Returns:
      This builder for chaining.
    • clearDatabaseId

      public PartitionId.Builder clearDatabaseId()
       If not empty, the ID of the database to which the entities
       belong.
       
      string database_id = 3;
      Returns:
      This builder for chaining.
    • setDatabaseIdBytes

      public PartitionId.Builder setDatabaseIdBytes(com.google.protobuf.ByteString value)
       If not empty, the ID of the database to which the entities
       belong.
       
      string database_id = 3;
      Parameters:
      value - The bytes for databaseId to set.
      Returns:
      This builder for chaining.
    • getNamespaceId

      public String getNamespaceId()
       If not empty, the ID of the namespace to which the entities belong.
       
      string namespace_id = 4;
      Specified by:
      getNamespaceId in interface PartitionIdOrBuilder
      Returns:
      The namespaceId.
    • getNamespaceIdBytes

      public com.google.protobuf.ByteString getNamespaceIdBytes()
       If not empty, the ID of the namespace to which the entities belong.
       
      string namespace_id = 4;
      Specified by:
      getNamespaceIdBytes in interface PartitionIdOrBuilder
      Returns:
      The bytes for namespaceId.
    • setNamespaceId

      public PartitionId.Builder setNamespaceId(String value)
       If not empty, the ID of the namespace to which the entities belong.
       
      string namespace_id = 4;
      Parameters:
      value - The namespaceId to set.
      Returns:
      This builder for chaining.
    • clearNamespaceId

      public PartitionId.Builder clearNamespaceId()
       If not empty, the ID of the namespace to which the entities belong.
       
      string namespace_id = 4;
      Returns:
      This builder for chaining.
    • setNamespaceIdBytes

      public PartitionId.Builder setNamespaceIdBytes(com.google.protobuf.ByteString value)
       If not empty, the ID of the namespace to which the entities belong.
       
      string namespace_id = 4;
      Parameters:
      value - The bytes for namespaceId to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

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

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