Class InstancePartition (6.80.1)

public final class InstancePartition extends GeneratedMessageV3 implements InstancePartitionOrBuilder

An isolated set of Cloud Spanner resources that databases can define placements on.

Protobuf type google.spanner.admin.instance.v1.InstancePartition

Static Fields

CONFIG_FIELD_NUMBER

public static final int CONFIG_FIELD_NUMBER
Field Value
Type Description
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

NODE_COUNT_FIELD_NUMBER

public static final int NODE_COUNT_FIELD_NUMBER
Field Value
Type Description
int

PROCESSING_UNITS_FIELD_NUMBER

public static final int PROCESSING_UNITS_FIELD_NUMBER
Field Value
Type Description
int

REFERENCING_BACKUPS_FIELD_NUMBER

public static final int REFERENCING_BACKUPS_FIELD_NUMBER
Field Value
Type Description
int

REFERENCING_DATABASES_FIELD_NUMBER

public static final int REFERENCING_DATABASES_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static InstancePartition getDefaultInstance()
Returns
Type Description
InstancePartition

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static InstancePartition.Builder newBuilder()
Returns
Type Description
InstancePartition.Builder

newBuilder(InstancePartition prototype)

public static InstancePartition.Builder newBuilder(InstancePartition prototype)
Parameter
Name Description
prototype InstancePartition
Returns
Type Description
InstancePartition.Builder

parseDelimitedFrom(InputStream input)

public static InstancePartition parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
InstancePartition
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static InstancePartition parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstancePartition
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static InstancePartition parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
InstancePartition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static InstancePartition parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstancePartition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static InstancePartition parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
InstancePartition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static InstancePartition parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstancePartition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static InstancePartition parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
InstancePartition
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static InstancePartition parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstancePartition
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static InstancePartition parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
InstancePartition
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static InstancePartition parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstancePartition
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static InstancePartition parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
InstancePartition
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static InstancePartition parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstancePartition
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<InstancePartition> parser()
Returns
Type Description
Parser<InstancePartition>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getComputeCapacityCase()

public InstancePartition.ComputeCapacityCase getComputeCapacityCase()
Returns
Type Description
InstancePartition.ComputeCapacityCase

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 and ListInstanceConfigs.

string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The config.

getConfigBytes()

public ByteString getConfigBytes()

Required. The name of the instance partition's configuration. Values are of the form projects/<project>/instanceConfigs/<configuration>. See also InstanceConfig and ListInstanceConfigs.

string config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for config.

getCreateTime()

public 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];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public 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];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public InstancePartition getDefaultInstanceForType()
Returns
Type Description
InstancePartition

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];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public 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];

Returns
Type Description
ByteString

The bytes for displayName.

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;

Returns
Type Description
String

The etag.

getEtagBytes()

public 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;

Returns
Type Description
ByteString

The bytes for etag.

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]. 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];

Returns
Type Description
String

The name.

getNameBytes()

public 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]. 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];

Returns
Type Description
ByteString

The bytes for name.

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;

Returns
Type Description
int

The nodeCount.

getParserForType()

public Parser<InstancePartition> getParserForType()
Returns
Type Description
Parser<InstancePartition>
Overrides

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 may be zero in API responses for instance partitions that are not yet in state READY.

int32 processing_units = 6;

Returns
Type Description
int

The processingUnits.

getReferencingBackups(int index)

public String getReferencingBackups(int index)

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 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The referencingBackups at the given index.

getReferencingBackupsBytes(int index)

public ByteString getReferencingBackupsBytes(int index)

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 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the referencingBackups at the given index.

getReferencingBackupsCount()

public int getReferencingBackupsCount()

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 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The count of referencingBackups.

getReferencingBackupsList()

public ProtocolStringList getReferencingBackupsList()

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 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProtocolStringList

A list containing the referencingBackups.

getReferencingDatabases(int index)

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];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The referencingDatabases at the given index.

getReferencingDatabasesBytes(int index)

public 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];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the referencingDatabases at the given index.

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];

Returns
Type Description
int

The count of referencingDatabases.

getReferencingDatabasesList()

public 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];

Returns
Type Description
ProtocolStringList

A list containing the referencingDatabases.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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];

Returns
Type Description
InstancePartition.State

The state.

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];

Returns
Type Description
int

The enum numeric value on the wire for state.

getUpdateTime()

public 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];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public 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];

Returns
Type Description
TimestampOrBuilder

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];

Returns
Type Description
boolean

Whether the createTime field is set.

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;

Returns
Type Description
boolean

Whether the nodeCount field is set.

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 may be zero in API responses for instance partitions that are not yet in state READY.

int32 processing_units = 6;

Returns
Type Description
boolean

Whether the processingUnits field is set.

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];

Returns
Type Description
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public InstancePartition.Builder newBuilderForType()
Returns
Type Description
InstancePartition.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected InstancePartition.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
InstancePartition.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public InstancePartition.Builder toBuilder()
Returns
Type Description
InstancePartition.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException