Class PartitionId.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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 Summary

    Modifier and Type
    Method
    Description
     
     
     
    If not empty, the ID of the database to which the entities belong.
    If not empty, the ID of the namespace to which the entities belong.
    The ID of the project to which the entities belong.
    If not empty, the ID of the database to which the entities belong.
    com.google.protobuf.ByteString
    If not empty, the ID of the database to which the entities belong.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    If not empty, the ID of the namespace to which the entities belong.
    com.google.protobuf.ByteString
    If not empty, the ID of the namespace to which the entities belong.
    The ID of the project to which the entities belong.
    com.google.protobuf.ByteString
    The ID of the project to which the entities belong.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    If not empty, the ID of the database to which the entities belong.
    setDatabaseIdBytes(com.google.protobuf.ByteString value)
    If not empty, the ID of the database to which the entities belong.
    If not empty, the ID of the namespace to which the entities belong.
    setNamespaceIdBytes(com.google.protobuf.ByteString value)
    If not empty, the ID of the namespace to which the entities belong.
    The ID of the project to which the entities belong.
    setProjectIdBytes(com.google.protobuf.ByteString value)
    The ID of the project to which the entities belong.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.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
    • 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.GeneratedMessage.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.