Class CloudSqlInstance.Builder (0.19.0)

public static final class CloudSqlInstance.Builder extends GeneratedMessageV3.Builder<CloudSqlInstance.Builder> implements CloudSqlInstanceOrBuilder

Represents a set of Cloud SQL instances. Each one will be available under /cloudsql/[instance]. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.

Protobuf type google.cloud.run.v2.CloudSqlInstance

Static Methods

getDescriptor()

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

Methods

addAllInstances(Iterable<String> values)

public CloudSqlInstance.Builder addAllInstances(Iterable<String> values)

The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}

repeated string instances = 1;

Parameter
NameDescription
valuesIterable<String>

The instances to add.

Returns
TypeDescription
CloudSqlInstance.Builder

This builder for chaining.

addInstances(String value)

public CloudSqlInstance.Builder addInstances(String value)

The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}

repeated string instances = 1;

Parameter
NameDescription
valueString

The instances to add.

Returns
TypeDescription
CloudSqlInstance.Builder

This builder for chaining.

addInstancesBytes(ByteString value)

public CloudSqlInstance.Builder addInstancesBytes(ByteString value)

The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}

repeated string instances = 1;

Parameter
NameDescription
valueByteString

The bytes of the instances to add.

Returns
TypeDescription
CloudSqlInstance.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CloudSqlInstance build()
Returns
TypeDescription
CloudSqlInstance

buildPartial()

public CloudSqlInstance buildPartial()
Returns
TypeDescription
CloudSqlInstance

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearInstances()

public CloudSqlInstance.Builder clearInstances()

The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}

repeated string instances = 1;

Returns
TypeDescription
CloudSqlInstance.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getDefaultInstanceForType()

public CloudSqlInstance getDefaultInstanceForType()
Returns
TypeDescription
CloudSqlInstance

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getInstances(int index)

public String getInstances(int index)

The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}

repeated string instances = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The instances at the given index.

getInstancesBytes(int index)

public ByteString getInstancesBytes(int index)

The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}

repeated string instances = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the instances at the given index.

getInstancesCount()

public int getInstancesCount()

The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}

repeated string instances = 1;

Returns
TypeDescription
int

The count of instances.

getInstancesList()

public ProtocolStringList getInstancesList()

The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}

repeated string instances = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the instances.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CloudSqlInstance other)

public CloudSqlInstance.Builder mergeFrom(CloudSqlInstance other)
Parameter
NameDescription
otherCloudSqlInstance
Returns
TypeDescription
CloudSqlInstance.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setInstances(int index, String value)

public CloudSqlInstance.Builder setInstances(int index, String value)

The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}

repeated string instances = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The instances to set.

Returns
TypeDescription
CloudSqlInstance.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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