Class CloudSqlProperties.Builder (3.49.0)

public static final class CloudSqlProperties.Builder extends GeneratedMessageV3.Builder<CloudSqlProperties.Builder> implements CloudSqlPropertiesOrBuilder

Cloud SQL connection properties.

Protobuf type google.privacy.dlp.v2.CloudSqlProperties

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CloudSqlProperties build()
Returns
Type Description
CloudSqlProperties

buildPartial()

public CloudSqlProperties buildPartial()
Returns
Type Description
CloudSqlProperties

clear()

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

clearCloudSqlIam()

public CloudSqlProperties.Builder clearCloudSqlIam()

Built-in IAM authentication (must be configured in Cloud SQL).

.google.privacy.dlp.v2.CloudSqlIamCredential cloud_sql_iam = 3;

Returns
Type Description
CloudSqlProperties.Builder

clearConnectionName()

public CloudSqlProperties.Builder clearConnectionName()

Optional. Immutable. The Cloud SQL instance for which the connection is defined. Only one connection per instance is allowed. This can only be set at creation time, and cannot be updated.

It is an error to use a connection_name from different project or region than the one that holds the connection. For example, a Connection resource for Cloud SQL connection_name project-id:us-central1:sql-instance must be created under the parent projects/project-id/locations/us-central1

string connection_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CloudSqlProperties.Builder

This builder for chaining.

clearCredential()

public CloudSqlProperties.Builder clearCredential()
Returns
Type Description
CloudSqlProperties.Builder

clearDatabaseEngine()

public CloudSqlProperties.Builder clearDatabaseEngine()

Required. The database engine used by the Cloud SQL instance that this connection configures.

.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine database_engine = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CloudSqlProperties.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearMaxConnections()

public CloudSqlProperties.Builder clearMaxConnections()

Required. DLP will limit its connections to max_connections. Must be 2 or greater.

int32 max_connections = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CloudSqlProperties.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearUsernamePassword()

public CloudSqlProperties.Builder clearUsernamePassword()

A username and password stored in Secret Manager.

.google.privacy.dlp.v2.SecretManagerCredential username_password = 2;

Returns
Type Description
CloudSqlProperties.Builder

clone()

public CloudSqlProperties.Builder clone()
Returns
Type Description
CloudSqlProperties.Builder
Overrides

getCloudSqlIam()

public CloudSqlIamCredential getCloudSqlIam()

Built-in IAM authentication (must be configured in Cloud SQL).

.google.privacy.dlp.v2.CloudSqlIamCredential cloud_sql_iam = 3;

Returns
Type Description
CloudSqlIamCredential

The cloudSqlIam.

getCloudSqlIamBuilder()

public CloudSqlIamCredential.Builder getCloudSqlIamBuilder()

Built-in IAM authentication (must be configured in Cloud SQL).

.google.privacy.dlp.v2.CloudSqlIamCredential cloud_sql_iam = 3;

Returns
Type Description
CloudSqlIamCredential.Builder

getCloudSqlIamOrBuilder()

public CloudSqlIamCredentialOrBuilder getCloudSqlIamOrBuilder()

Built-in IAM authentication (must be configured in Cloud SQL).

.google.privacy.dlp.v2.CloudSqlIamCredential cloud_sql_iam = 3;

Returns
Type Description
CloudSqlIamCredentialOrBuilder

getConnectionName()

public String getConnectionName()

Optional. Immutable. The Cloud SQL instance for which the connection is defined. Only one connection per instance is allowed. This can only be set at creation time, and cannot be updated.

It is an error to use a connection_name from different project or region than the one that holds the connection. For example, a Connection resource for Cloud SQL connection_name project-id:us-central1:sql-instance must be created under the parent projects/project-id/locations/us-central1

string connection_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The connectionName.

getConnectionNameBytes()

public ByteString getConnectionNameBytes()

Optional. Immutable. The Cloud SQL instance for which the connection is defined. Only one connection per instance is allowed. This can only be set at creation time, and cannot be updated.

It is an error to use a connection_name from different project or region than the one that holds the connection. For example, a Connection resource for Cloud SQL connection_name project-id:us-central1:sql-instance must be created under the parent projects/project-id/locations/us-central1

string connection_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for connectionName.

getCredentialCase()

public CloudSqlProperties.CredentialCase getCredentialCase()
Returns
Type Description
CloudSqlProperties.CredentialCase

getDatabaseEngine()

public CloudSqlProperties.DatabaseEngine getDatabaseEngine()

Required. The database engine used by the Cloud SQL instance that this connection configures.

.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine database_engine = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CloudSqlProperties.DatabaseEngine

The databaseEngine.

getDatabaseEngineValue()

public int getDatabaseEngineValue()

Required. The database engine used by the Cloud SQL instance that this connection configures.

.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine database_engine = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for databaseEngine.

getDefaultInstanceForType()

public CloudSqlProperties getDefaultInstanceForType()
Returns
Type Description
CloudSqlProperties

getDescriptorForType()

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

getMaxConnections()

public int getMaxConnections()

Required. DLP will limit its connections to max_connections. Must be 2 or greater.

int32 max_connections = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The maxConnections.

getUsernamePassword()

public SecretManagerCredential getUsernamePassword()

A username and password stored in Secret Manager.

.google.privacy.dlp.v2.SecretManagerCredential username_password = 2;

Returns
Type Description
SecretManagerCredential

The usernamePassword.

getUsernamePasswordBuilder()

public SecretManagerCredential.Builder getUsernamePasswordBuilder()

A username and password stored in Secret Manager.

.google.privacy.dlp.v2.SecretManagerCredential username_password = 2;

Returns
Type Description
SecretManagerCredential.Builder

getUsernamePasswordOrBuilder()

public SecretManagerCredentialOrBuilder getUsernamePasswordOrBuilder()

A username and password stored in Secret Manager.

.google.privacy.dlp.v2.SecretManagerCredential username_password = 2;

Returns
Type Description
SecretManagerCredentialOrBuilder

hasCloudSqlIam()

public boolean hasCloudSqlIam()

Built-in IAM authentication (must be configured in Cloud SQL).

.google.privacy.dlp.v2.CloudSqlIamCredential cloud_sql_iam = 3;

Returns
Type Description
boolean

Whether the cloudSqlIam field is set.

hasUsernamePassword()

public boolean hasUsernamePassword()

A username and password stored in Secret Manager.

.google.privacy.dlp.v2.SecretManagerCredential username_password = 2;

Returns
Type Description
boolean

Whether the usernamePassword field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCloudSqlIam(CloudSqlIamCredential value)

public CloudSqlProperties.Builder mergeCloudSqlIam(CloudSqlIamCredential value)

Built-in IAM authentication (must be configured in Cloud SQL).

.google.privacy.dlp.v2.CloudSqlIamCredential cloud_sql_iam = 3;

Parameter
Name Description
value CloudSqlIamCredential
Returns
Type Description
CloudSqlProperties.Builder

mergeFrom(CloudSqlProperties other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUsernamePassword(SecretManagerCredential value)

public CloudSqlProperties.Builder mergeUsernamePassword(SecretManagerCredential value)

A username and password stored in Secret Manager.

.google.privacy.dlp.v2.SecretManagerCredential username_password = 2;

Parameter
Name Description
value SecretManagerCredential
Returns
Type Description
CloudSqlProperties.Builder

setCloudSqlIam(CloudSqlIamCredential value)

public CloudSqlProperties.Builder setCloudSqlIam(CloudSqlIamCredential value)

Built-in IAM authentication (must be configured in Cloud SQL).

.google.privacy.dlp.v2.CloudSqlIamCredential cloud_sql_iam = 3;

Parameter
Name Description
value CloudSqlIamCredential
Returns
Type Description
CloudSqlProperties.Builder

setCloudSqlIam(CloudSqlIamCredential.Builder builderForValue)

public CloudSqlProperties.Builder setCloudSqlIam(CloudSqlIamCredential.Builder builderForValue)

Built-in IAM authentication (must be configured in Cloud SQL).

.google.privacy.dlp.v2.CloudSqlIamCredential cloud_sql_iam = 3;

Parameter
Name Description
builderForValue CloudSqlIamCredential.Builder
Returns
Type Description
CloudSqlProperties.Builder

setConnectionName(String value)

public CloudSqlProperties.Builder setConnectionName(String value)

Optional. Immutable. The Cloud SQL instance for which the connection is defined. Only one connection per instance is allowed. This can only be set at creation time, and cannot be updated.

It is an error to use a connection_name from different project or region than the one that holds the connection. For example, a Connection resource for Cloud SQL connection_name project-id:us-central1:sql-instance must be created under the parent projects/project-id/locations/us-central1

string connection_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The connectionName to set.

Returns
Type Description
CloudSqlProperties.Builder

This builder for chaining.

setConnectionNameBytes(ByteString value)

public CloudSqlProperties.Builder setConnectionNameBytes(ByteString value)

Optional. Immutable. The Cloud SQL instance for which the connection is defined. Only one connection per instance is allowed. This can only be set at creation time, and cannot be updated.

It is an error to use a connection_name from different project or region than the one that holds the connection. For example, a Connection resource for Cloud SQL connection_name project-id:us-central1:sql-instance must be created under the parent projects/project-id/locations/us-central1

string connection_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for connectionName to set.

Returns
Type Description
CloudSqlProperties.Builder

This builder for chaining.

setDatabaseEngine(CloudSqlProperties.DatabaseEngine value)

public CloudSqlProperties.Builder setDatabaseEngine(CloudSqlProperties.DatabaseEngine value)

Required. The database engine used by the Cloud SQL instance that this connection configures.

.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine database_engine = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CloudSqlProperties.DatabaseEngine

The databaseEngine to set.

Returns
Type Description
CloudSqlProperties.Builder

This builder for chaining.

setDatabaseEngineValue(int value)

public CloudSqlProperties.Builder setDatabaseEngineValue(int value)

Required. The database engine used by the Cloud SQL instance that this connection configures.

.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine database_engine = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
CloudSqlProperties.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setMaxConnections(int value)

public CloudSqlProperties.Builder setMaxConnections(int value)

Required. DLP will limit its connections to max_connections. Must be 2 or greater.

int32 max_connections = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The maxConnections to set.

Returns
Type Description
CloudSqlProperties.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUsernamePassword(SecretManagerCredential value)

public CloudSqlProperties.Builder setUsernamePassword(SecretManagerCredential value)

A username and password stored in Secret Manager.

.google.privacy.dlp.v2.SecretManagerCredential username_password = 2;

Parameter
Name Description
value SecretManagerCredential
Returns
Type Description
CloudSqlProperties.Builder

setUsernamePassword(SecretManagerCredential.Builder builderForValue)

public CloudSqlProperties.Builder setUsernamePassword(SecretManagerCredential.Builder builderForValue)

A username and password stored in Secret Manager.

.google.privacy.dlp.v2.SecretManagerCredential username_password = 2;

Parameter
Name Description
builderForValue SecretManagerCredential.Builder
Returns
Type Description
CloudSqlProperties.Builder