Class InstancePartition.Builder (6.69.0)

public static final class InstancePartition.Builder extends GeneratedMessageV3.Builder<InstancePartition.Builder> implements InstancePartitionOrBuilder

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

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

Static Methods

getDescriptor()

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

Methods

addAllReferencingBackups(Iterable<String> values)

public InstancePartition.Builder addAllReferencingBackups(Iterable<String> values)

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
values Iterable<String>

The referencingBackups to add.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

addAllReferencingDatabases(Iterable<String> values)

public InstancePartition.Builder addAllReferencingDatabases(Iterable<String> values)

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
values Iterable<String>

The referencingDatabases to add.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

addReferencingBackups(String value)

public InstancePartition.Builder addReferencingBackups(String value)

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
value String

The referencingBackups to add.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

addReferencingBackupsBytes(ByteString value)

public InstancePartition.Builder addReferencingBackupsBytes(ByteString value)

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
value ByteString

The bytes of the referencingBackups to add.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

addReferencingDatabases(String value)

public InstancePartition.Builder addReferencingDatabases(String value)

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
value String

The referencingDatabases to add.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

addReferencingDatabasesBytes(ByteString value)

public InstancePartition.Builder addReferencingDatabasesBytes(ByteString value)

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
value ByteString

The bytes of the referencingDatabases to add.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public InstancePartition.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
InstancePartition.Builder
Overrides

build()

public InstancePartition build()
Returns
Type Description
InstancePartition

buildPartial()

public InstancePartition buildPartial()
Returns
Type Description
InstancePartition

clear()

public InstancePartition.Builder clear()
Returns
Type Description
InstancePartition.Builder
Overrides

clearComputeCapacity()

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

clearConfig()

public InstancePartition.Builder clearConfig()

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
InstancePartition.Builder

This builder for chaining.

clearCreateTime()

public InstancePartition.Builder clearCreateTime()

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
InstancePartition.Builder

clearDisplayName()

public InstancePartition.Builder clearDisplayName()

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
InstancePartition.Builder

This builder for chaining.

clearEtag()

public InstancePartition.Builder clearEtag()

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
InstancePartition.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public InstancePartition.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
InstancePartition.Builder
Overrides

clearName()

public InstancePartition.Builder clearName()

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
InstancePartition.Builder

This builder for chaining.

clearNodeCount()

public InstancePartition.Builder clearNodeCount()

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
InstancePartition.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public InstancePartition.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
InstancePartition.Builder
Overrides

clearProcessingUnits()

public InstancePartition.Builder clearProcessingUnits()

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
InstancePartition.Builder

This builder for chaining.

clearReferencingBackups()

public InstancePartition.Builder clearReferencingBackups()

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
InstancePartition.Builder

This builder for chaining.

clearReferencingDatabases()

public InstancePartition.Builder clearReferencingDatabases()

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
InstancePartition.Builder

This builder for chaining.

clearState()

public InstancePartition.Builder clearState()

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.Builder

This builder for chaining.

clearUpdateTime()

public InstancePartition.Builder clearUpdateTime()

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
InstancePartition.Builder

clone()

public InstancePartition.Builder clone()
Returns
Type Description
InstancePartition.Builder
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.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

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
Builder

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

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.

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.