Class InstancePartition

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.spanner.admin.instance.v1.InstancePartition
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, InstancePartitionOrBuilder, Serializable

public final class InstancePartition extends com.google.protobuf.GeneratedMessageV3 implements InstancePartitionOrBuilder
 An isolated set of Cloud Spanner resources that databases can define
 placements on.
 
Protobuf type google.spanner.admin.instance.v1.InstancePartition
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • CONFIG_FIELD_NUMBER

      public static final int CONFIG_FIELD_NUMBER
      See Also:
    • DISPLAY_NAME_FIELD_NUMBER

      public static final int DISPLAY_NAME_FIELD_NUMBER
      See Also:
    • NODE_COUNT_FIELD_NUMBER

      public static final int NODE_COUNT_FIELD_NUMBER
      See Also:
    • PROCESSING_UNITS_FIELD_NUMBER

      public static final int PROCESSING_UNITS_FIELD_NUMBER
      See Also:
    • STATE_FIELD_NUMBER

      public static final int STATE_FIELD_NUMBER
      See Also:
    • CREATE_TIME_FIELD_NUMBER

      public static final int CREATE_TIME_FIELD_NUMBER
      See Also:
    • UPDATE_TIME_FIELD_NUMBER

      public static final int UPDATE_TIME_FIELD_NUMBER
      See Also:
    • REFERENCING_DATABASES_FIELD_NUMBER

      public static final int REFERENCING_DATABASES_FIELD_NUMBER
      See Also:
    • REFERENCING_BACKUPS_FIELD_NUMBER

      public static final int REFERENCING_BACKUPS_FIELD_NUMBER
      See Also:
    • ETAG_FIELD_NUMBER

      public static final int ETAG_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • 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
    • getComputeCapacityCase

      public InstancePartition.ComputeCapacityCase getComputeCapacityCase()
      Specified by:
      getComputeCapacityCase in interface InstancePartitionOrBuilder
    • getName

      public String getName()
       Required. A unique identifier for the instance partition. Values are of the
       form
       `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
       The final segment of the name must be between 2 and 64 characters in
       length. An instance partition's name cannot be changed after the instance
       partition is created.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getName in interface InstancePartitionOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Required. A unique identifier for the instance partition. Values are of the
       form
       `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
       The final segment of the name must be between 2 and 64 characters in
       length. An instance partition's name cannot be changed after the instance
       partition is created.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getNameBytes in interface InstancePartitionOrBuilder
      Returns:
      The bytes for name.
    • getConfig

      public String getConfig()
       Required. The name of the instance partition's configuration. Values are of
       the form `projects/<project>/instanceConfigs/<configuration>`. See also
       [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
       [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
       
      string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getConfig in interface InstancePartitionOrBuilder
      Returns:
      The config.
    • getConfigBytes

      public com.google.protobuf.ByteString getConfigBytes()
       Required. The name of the instance partition's configuration. Values are of
       the form `projects/<project>/instanceConfigs/<configuration>`. See also
       [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
       [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
       
      string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getConfigBytes in interface InstancePartitionOrBuilder
      Returns:
      The bytes for config.
    • getDisplayName

      public String getDisplayName()
       Required. The descriptive name for this instance partition as it appears in
       UIs. Must be unique per project and between 4 and 30 characters in length.
       
      string display_name = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayName in interface InstancePartitionOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Required. The descriptive name for this instance partition as it appears in
       UIs. Must be unique per project and between 4 and 30 characters in length.
       
      string display_name = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayNameBytes in interface InstancePartitionOrBuilder
      Returns:
      The bytes for displayName.
    • hasNodeCount

      public boolean hasNodeCount()
       The number of nodes allocated to this instance partition.
      
       Users can set the `node_count` field to specify the target number of
       nodes allocated to the instance partition.
      
       This may be zero in API responses for instance partitions that are not
       yet in state `READY`.
       
      int32 node_count = 5;
      Specified by:
      hasNodeCount in interface InstancePartitionOrBuilder
      Returns:
      Whether the nodeCount field is set.
    • getNodeCount

      public int getNodeCount()
       The number of nodes allocated to this instance partition.
      
       Users can set the `node_count` field to specify the target number of
       nodes allocated to the instance partition.
      
       This may be zero in API responses for instance partitions that are not
       yet in state `READY`.
       
      int32 node_count = 5;
      Specified by:
      getNodeCount in interface InstancePartitionOrBuilder
      Returns:
      The nodeCount.
    • hasProcessingUnits

      public boolean hasProcessingUnits()
       The number of processing units allocated to this instance partition.
      
       Users can set the `processing_units` field to specify the target number
       of processing units allocated to the instance partition.
      
       This might be zero in API responses for instance partitions that are not
       yet in the `READY` state.
       
      int32 processing_units = 6;
      Specified by:
      hasProcessingUnits in interface InstancePartitionOrBuilder
      Returns:
      Whether the processingUnits field is set.
    • getProcessingUnits

      public int getProcessingUnits()
       The number of processing units allocated to this instance partition.
      
       Users can set the `processing_units` field to specify the target number
       of processing units allocated to the instance partition.
      
       This might be zero in API responses for instance partitions that are not
       yet in the `READY` state.
       
      int32 processing_units = 6;
      Specified by:
      getProcessingUnits in interface InstancePartitionOrBuilder
      Returns:
      The processingUnits.
    • getStateValue

      public int getStateValue()
       Output only. The current instance partition state.
       
      .google.spanner.admin.instance.v1.InstancePartition.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStateValue in interface InstancePartitionOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • getState

      public InstancePartition.State getState()
       Output only. The current instance partition state.
       
      .google.spanner.admin.instance.v1.InstancePartition.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getState in interface InstancePartitionOrBuilder
      Returns:
      The state.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. The time at which the instance partition was created.
       
      .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface InstancePartitionOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The time at which the instance partition was created.
       
      .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface InstancePartitionOrBuilder
      Returns:
      The createTime.
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The time at which the instance partition was created.
       
      .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface InstancePartitionOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. The time at which the instance partition was most recently
       updated.
       
      .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface InstancePartitionOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. The time at which the instance partition was most recently
       updated.
       
      .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface InstancePartitionOrBuilder
      Returns:
      The updateTime.
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. The time at which the instance partition was most recently
       updated.
       
      .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface InstancePartitionOrBuilder
    • getReferencingDatabasesList

      public com.google.protobuf.ProtocolStringList getReferencingDatabasesList()
       Output only. The names of the databases that reference this
       instance partition. Referencing databases should share the parent instance.
       The existence of any referencing database prevents the instance partition
       from being deleted.
       
      repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getReferencingDatabasesList in interface InstancePartitionOrBuilder
      Returns:
      A list containing the referencingDatabases.
    • getReferencingDatabasesCount

      public int getReferencingDatabasesCount()
       Output only. The names of the databases that reference this
       instance partition. Referencing databases should share the parent instance.
       The existence of any referencing database prevents the instance partition
       from being deleted.
       
      repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getReferencingDatabasesCount in interface InstancePartitionOrBuilder
      Returns:
      The count of referencingDatabases.
    • getReferencingDatabases

      public String getReferencingDatabases(int index)
       Output only. The names of the databases that reference this
       instance partition. Referencing databases should share the parent instance.
       The existence of any referencing database prevents the instance partition
       from being deleted.
       
      repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getReferencingDatabases in interface InstancePartitionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The referencingDatabases at the given index.
    • getReferencingDatabasesBytes

      public com.google.protobuf.ByteString getReferencingDatabasesBytes(int index)
       Output only. The names of the databases that reference this
       instance partition. Referencing databases should share the parent instance.
       The existence of any referencing database prevents the instance partition
       from being deleted.
       
      repeated string referencing_databases = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getReferencingDatabasesBytes in interface InstancePartitionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the referencingDatabases at the given index.
    • getReferencingBackupsList

      @Deprecated public com.google.protobuf.ProtocolStringList getReferencingBackupsList()
      Deprecated.
      google.spanner.admin.instance.v1.InstancePartition.referencing_backups is deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781
       Output only. Deprecated: This field is not populated.
       Output only. The names of the backups that reference this instance
       partition. Referencing backups should share the parent instance. The
       existence of any referencing backup prevents the instance partition from
       being deleted.
       
      repeated string referencing_backups = 11 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getReferencingBackupsList in interface InstancePartitionOrBuilder
      Returns:
      A list containing the referencingBackups.
    • getReferencingBackupsCount

      @Deprecated public int getReferencingBackupsCount()
      Deprecated.
      google.spanner.admin.instance.v1.InstancePartition.referencing_backups is deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781
       Output only. Deprecated: This field is not populated.
       Output only. The names of the backups that reference this instance
       partition. Referencing backups should share the parent instance. The
       existence of any referencing backup prevents the instance partition from
       being deleted.
       
      repeated string referencing_backups = 11 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getReferencingBackupsCount in interface InstancePartitionOrBuilder
      Returns:
      The count of referencingBackups.
    • getReferencingBackups

      @Deprecated public String getReferencingBackups(int index)
      Deprecated.
      google.spanner.admin.instance.v1.InstancePartition.referencing_backups is deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781
       Output only. Deprecated: This field is not populated.
       Output only. The names of the backups that reference this instance
       partition. Referencing backups should share the parent instance. The
       existence of any referencing backup prevents the instance partition from
       being deleted.
       
      repeated string referencing_backups = 11 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getReferencingBackups in interface InstancePartitionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The referencingBackups at the given index.
    • getReferencingBackupsBytes

      @Deprecated public com.google.protobuf.ByteString getReferencingBackupsBytes(int index)
      Deprecated.
      google.spanner.admin.instance.v1.InstancePartition.referencing_backups is deprecated. See google/spanner/admin/instance/v1/spanner_instance_admin.proto;l=1781
       Output only. Deprecated: This field is not populated.
       Output only. The names of the backups that reference this instance
       partition. Referencing backups should share the parent instance. The
       existence of any referencing backup prevents the instance partition from
       being deleted.
       
      repeated string referencing_backups = 11 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getReferencingBackupsBytes in interface InstancePartitionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the referencingBackups at the given index.
    • getEtag

      public String getEtag()
       Used for optimistic concurrency control as a way
       to help prevent simultaneous updates of a instance partition from
       overwriting each other. It is strongly suggested that systems make use of
       the etag in the read-modify-write cycle to perform instance partition
       updates in order to avoid race conditions: An etag is returned in the
       response which contains instance partitions, and systems are expected to
       put that etag in the request to update instance partitions to ensure that
       their change will be applied to the same version of the instance partition.
       If no etag is provided in the call to update instance partition, then the
       existing instance partition is overwritten blindly.
       
      string etag = 12;
      Specified by:
      getEtag in interface InstancePartitionOrBuilder
      Returns:
      The etag.
    • getEtagBytes

      public com.google.protobuf.ByteString getEtagBytes()
       Used for optimistic concurrency control as a way
       to help prevent simultaneous updates of a instance partition from
       overwriting each other. It is strongly suggested that systems make use of
       the etag in the read-modify-write cycle to perform instance partition
       updates in order to avoid race conditions: An etag is returned in the
       response which contains instance partitions, and systems are expected to
       put that etag in the request to update instance partitions to ensure that
       their change will be applied to the same version of the instance partition.
       If no etag is provided in the call to update instance partition, then the
       existing instance partition is overwritten blindly.
       
      string etag = 12;
      Specified by:
      getEtagBytes in interface InstancePartitionOrBuilder
      Returns:
      The bytes for etag.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static InstancePartition parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static InstancePartition parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static InstancePartition parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static InstancePartition parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static InstancePartition parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static InstancePartition parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static InstancePartition parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static InstancePartition parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static InstancePartition parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static InstancePartition parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static InstancePartition parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static InstancePartition parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public InstancePartition.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static InstancePartition.Builder newBuilder()
    • newBuilder

      public static InstancePartition.Builder newBuilder(InstancePartition prototype)
    • toBuilder

      public InstancePartition.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected InstancePartition.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static InstancePartition getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<InstancePartition> parser()
    • getParserForType

      public com.google.protobuf.Parser<InstancePartition> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public InstancePartition getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder