Class InstanceConfig.Builder (6.25.0)

public static final class InstanceConfig.Builder extends GeneratedMessageV3.Builder<InstanceConfig.Builder> implements InstanceConfigOrBuilder

A possible configuration for a Cloud Spanner instance. Configurations define the geographic placement of nodes and their replication.

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllLeaderOptions(Iterable<String> values)

public InstanceConfig.Builder addAllLeaderOptions(Iterable<String> values)

Allowed values of the \u201cdefault_leader\u201d schema option for databases in instances that use this instance configuration.

repeated string leader_options = 4;

Parameter
NameDescription
valuesIterable<String>

The leaderOptions to add.

Returns
TypeDescription
InstanceConfig.Builder

This builder for chaining.

addAllReplicas(Iterable<? extends ReplicaInfo> values)

public InstanceConfig.Builder addAllReplicas(Iterable<? extends ReplicaInfo> values)

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Parameter
NameDescription
valuesIterable<? extends com.google.spanner.admin.instance.v1.ReplicaInfo>
Returns
TypeDescription
InstanceConfig.Builder

addLeaderOptions(String value)

public InstanceConfig.Builder addLeaderOptions(String value)

Allowed values of the \u201cdefault_leader\u201d schema option for databases in instances that use this instance configuration.

repeated string leader_options = 4;

Parameter
NameDescription
valueString

The leaderOptions to add.

Returns
TypeDescription
InstanceConfig.Builder

This builder for chaining.

addLeaderOptionsBytes(ByteString value)

public InstanceConfig.Builder addLeaderOptionsBytes(ByteString value)

Allowed values of the \u201cdefault_leader\u201d schema option for databases in instances that use this instance configuration.

repeated string leader_options = 4;

Parameter
NameDescription
valueByteString

The bytes of the leaderOptions to add.

Returns
TypeDescription
InstanceConfig.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public InstanceConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
InstanceConfig.Builder
Overrides

addReplicas(ReplicaInfo value)

public InstanceConfig.Builder addReplicas(ReplicaInfo value)

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Parameter
NameDescription
valueReplicaInfo
Returns
TypeDescription
InstanceConfig.Builder

addReplicas(ReplicaInfo.Builder builderForValue)

public InstanceConfig.Builder addReplicas(ReplicaInfo.Builder builderForValue)

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Parameter
NameDescription
builderForValueReplicaInfo.Builder
Returns
TypeDescription
InstanceConfig.Builder

addReplicas(int index, ReplicaInfo value)

public InstanceConfig.Builder addReplicas(int index, ReplicaInfo value)

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Parameters
NameDescription
indexint
valueReplicaInfo
Returns
TypeDescription
InstanceConfig.Builder

addReplicas(int index, ReplicaInfo.Builder builderForValue)

public InstanceConfig.Builder addReplicas(int index, ReplicaInfo.Builder builderForValue)

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Parameters
NameDescription
indexint
builderForValueReplicaInfo.Builder
Returns
TypeDescription
InstanceConfig.Builder

addReplicasBuilder()

public ReplicaInfo.Builder addReplicasBuilder()

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Returns
TypeDescription
ReplicaInfo.Builder

addReplicasBuilder(int index)

public ReplicaInfo.Builder addReplicasBuilder(int index)

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
ReplicaInfo.Builder

build()

public InstanceConfig build()
Returns
TypeDescription
InstanceConfig

buildPartial()

public InstanceConfig buildPartial()
Returns
TypeDescription
InstanceConfig

clear()

public InstanceConfig.Builder clear()
Returns
TypeDescription
InstanceConfig.Builder
Overrides

clearDisplayName()

public InstanceConfig.Builder clearDisplayName()

The name of this instance configuration as it appears in UIs.

string display_name = 2;

Returns
TypeDescription
InstanceConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public InstanceConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
InstanceConfig.Builder
Overrides

clearLeaderOptions()

public InstanceConfig.Builder clearLeaderOptions()

Allowed values of the \u201cdefault_leader\u201d schema option for databases in instances that use this instance configuration.

repeated string leader_options = 4;

Returns
TypeDescription
InstanceConfig.Builder

This builder for chaining.

clearName()

public InstanceConfig.Builder clearName()

A unique identifier for the instance configuration. Values are of the form projects/<project>/instanceConfigs/a-z*

string name = 1;

Returns
TypeDescription
InstanceConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public InstanceConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
InstanceConfig.Builder
Overrides

clearReplicas()

public InstanceConfig.Builder clearReplicas()

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Returns
TypeDescription
InstanceConfig.Builder

clone()

public InstanceConfig.Builder clone()
Returns
TypeDescription
InstanceConfig.Builder
Overrides

getDefaultInstanceForType()

public InstanceConfig getDefaultInstanceForType()
Returns
TypeDescription
InstanceConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

The name of this instance configuration as it appears in UIs.

string display_name = 2;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

The name of this instance configuration as it appears in UIs.

string display_name = 2;

Returns
TypeDescription
ByteString

The bytes for displayName.

getLeaderOptions(int index)

public String getLeaderOptions(int index)

Allowed values of the \u201cdefault_leader\u201d schema option for databases in instances that use this instance configuration.

repeated string leader_options = 4;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The leaderOptions at the given index.

getLeaderOptionsBytes(int index)

public ByteString getLeaderOptionsBytes(int index)

Allowed values of the \u201cdefault_leader\u201d schema option for databases in instances that use this instance configuration.

repeated string leader_options = 4;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the leaderOptions at the given index.

getLeaderOptionsCount()

public int getLeaderOptionsCount()

Allowed values of the \u201cdefault_leader\u201d schema option for databases in instances that use this instance configuration.

repeated string leader_options = 4;

Returns
TypeDescription
int

The count of leaderOptions.

getLeaderOptionsList()

public ProtocolStringList getLeaderOptionsList()

Allowed values of the \u201cdefault_leader\u201d schema option for databases in instances that use this instance configuration.

repeated string leader_options = 4;

Returns
TypeDescription
ProtocolStringList

A list containing the leaderOptions.

getName()

public String getName()

A unique identifier for the instance configuration. Values are of the form projects/<project>/instanceConfigs/a-z*

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

A unique identifier for the instance configuration. Values are of the form projects/<project>/instanceConfigs/a-z*

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getReplicas(int index)

public ReplicaInfo getReplicas(int index)

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
ReplicaInfo

getReplicasBuilder(int index)

public ReplicaInfo.Builder getReplicasBuilder(int index)

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
ReplicaInfo.Builder

getReplicasBuilderList()

public List<ReplicaInfo.Builder> getReplicasBuilderList()

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Returns
TypeDescription
List<Builder>

getReplicasCount()

public int getReplicasCount()

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Returns
TypeDescription
int

getReplicasList()

public List<ReplicaInfo> getReplicasList()

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Returns
TypeDescription
List<ReplicaInfo>

getReplicasOrBuilder(int index)

public ReplicaInfoOrBuilder getReplicasOrBuilder(int index)

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
ReplicaInfoOrBuilder

getReplicasOrBuilderList()

public List<? extends ReplicaInfoOrBuilder> getReplicasOrBuilderList()

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Returns
TypeDescription
List<? extends com.google.spanner.admin.instance.v1.ReplicaInfoOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public InstanceConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
InstanceConfig.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public InstanceConfig.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
InstanceConfig.Builder
Overrides

mergeFrom(InstanceConfig other)

public InstanceConfig.Builder mergeFrom(InstanceConfig other)
Parameter
NameDescription
otherInstanceConfig
Returns
TypeDescription
InstanceConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final InstanceConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
InstanceConfig.Builder
Overrides

removeReplicas(int index)

public InstanceConfig.Builder removeReplicas(int index)

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
InstanceConfig.Builder

setDisplayName(String value)

public InstanceConfig.Builder setDisplayName(String value)

The name of this instance configuration as it appears in UIs.

string display_name = 2;

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
InstanceConfig.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public InstanceConfig.Builder setDisplayNameBytes(ByteString value)

The name of this instance configuration as it appears in UIs.

string display_name = 2;

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
InstanceConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public InstanceConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
InstanceConfig.Builder
Overrides

setLeaderOptions(int index, String value)

public InstanceConfig.Builder setLeaderOptions(int index, String value)

Allowed values of the \u201cdefault_leader\u201d schema option for databases in instances that use this instance configuration.

repeated string leader_options = 4;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The leaderOptions to set.

Returns
TypeDescription
InstanceConfig.Builder

This builder for chaining.

setName(String value)

public InstanceConfig.Builder setName(String value)

A unique identifier for the instance configuration. Values are of the form projects/<project>/instanceConfigs/a-z*

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
InstanceConfig.Builder

This builder for chaining.

setNameBytes(ByteString value)

public InstanceConfig.Builder setNameBytes(ByteString value)

A unique identifier for the instance configuration. Values are of the form projects/<project>/instanceConfigs/a-z*

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
InstanceConfig.Builder

This builder for chaining.

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

public InstanceConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
InstanceConfig.Builder
Overrides

setReplicas(int index, ReplicaInfo value)

public InstanceConfig.Builder setReplicas(int index, ReplicaInfo value)

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Parameters
NameDescription
indexint
valueReplicaInfo
Returns
TypeDescription
InstanceConfig.Builder

setReplicas(int index, ReplicaInfo.Builder builderForValue)

public InstanceConfig.Builder setReplicas(int index, ReplicaInfo.Builder builderForValue)

The geographic placement of nodes in this instance configuration and their replication properties.

repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;

Parameters
NameDescription
indexint
builderForValueReplicaInfo.Builder
Returns
TypeDescription
InstanceConfig.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final InstanceConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
InstanceConfig.Builder
Overrides