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.

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

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

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
Builder

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public InstancePartition.Builder mergeCreateTime(Timestamp value)

Output only. The time at which the instance partition was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
InstancePartition.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public InstancePartition.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstancePartition.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public InstancePartition.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
InstancePartition.Builder
Overrides

mergeFrom(InstancePartition other)

public InstancePartition.Builder mergeFrom(InstancePartition other)
Parameter
Name Description
other InstancePartition
Returns
Type Description
InstancePartition.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final InstancePartition.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
InstancePartition.Builder
Overrides

mergeUpdateTime(Timestamp value)

public InstancePartition.Builder mergeUpdateTime(Timestamp value)

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

Parameter
Name Description
value Timestamp
Returns
Type Description
InstancePartition.Builder

setConfig(String value)

public InstancePartition.Builder setConfig(String value)

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) = { ... }

Parameter
Name Description
value String

The config to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setConfigBytes(ByteString value)

public InstancePartition.Builder setConfigBytes(ByteString value)

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) = { ... }

Parameter
Name Description
value ByteString

The bytes for config to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public InstancePartition.Builder setCreateTime(Timestamp value)

Output only. The time at which the instance partition was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
InstancePartition.Builder

setCreateTime(Timestamp.Builder builderForValue)

public InstancePartition.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time at which the instance partition was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
InstancePartition.Builder

setDisplayName(String value)

public InstancePartition.Builder setDisplayName(String value)

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

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public InstancePartition.Builder setDisplayNameBytes(ByteString value)

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

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setEtag(String value)

public InstancePartition.Builder setEtag(String value)

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;

Parameter
Name Description
value String

The etag to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setEtagBytes(ByteString value)

public InstancePartition.Builder setEtagBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for etag to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public InstancePartition.Builder setName(String value)

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setNameBytes(ByteString value)

public InstancePartition.Builder setNameBytes(ByteString value)

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setNodeCount(int value)

public InstancePartition.Builder setNodeCount(int value)

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;

Parameter
Name Description
value int

The nodeCount to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setProcessingUnits(int value)

public InstancePartition.Builder setProcessingUnits(int value)

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;

Parameter
Name Description
value int

The processingUnits to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setReferencingBackups(int index, String value)

public InstancePartition.Builder setReferencingBackups(int index, 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];

Parameters
Name Description
index int

The index to set the value at.

value String

The referencingBackups to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setReferencingDatabases(int index, String value)

public InstancePartition.Builder setReferencingDatabases(int index, 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];

Parameters
Name Description
index int

The index to set the value at.

value String

The referencingDatabases to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

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

setState(InstancePartition.State value)

public InstancePartition.Builder setState(InstancePartition.State value)

Output only. The current instance partition state.

.google.spanner.admin.instance.v1.InstancePartition.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value InstancePartition.State

The state to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setStateValue(int value)

public InstancePartition.Builder setStateValue(int value)

Output only. The current instance partition state.

.google.spanner.admin.instance.v1.InstancePartition.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for state to set.

Returns
Type Description
InstancePartition.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final InstancePartition.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
InstancePartition.Builder
Overrides

setUpdateTime(Timestamp value)

public InstancePartition.Builder setUpdateTime(Timestamp value)

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

Parameter
Name Description
value Timestamp
Returns
Type Description
InstancePartition.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public InstancePartition.Builder setUpdateTime(Timestamp.Builder builderForValue)

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
InstancePartition.Builder