Class CloudSqlSingleUserCredentials.Builder (2.103.0)

public static final class CloudSqlSingleUserCredentials.Builder extends GeneratedMessage.Builder<CloudSqlSingleUserCredentials.Builder> implements CloudSqlSingleUserCredentialsOrBuilder

These are the credentials required for Cloud SQL DB for Single user Managed Rotation.

Protobuf type google.cloud.secretmanager.v1.CloudSqlSingleUserCredentials

Static Methods

getDescriptor()

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

Methods

build()

public CloudSqlSingleUserCredentials build()
Returns
Type Description
CloudSqlSingleUserCredentials

buildPartial()

public CloudSqlSingleUserCredentials buildPartial()
Returns
Type Description
CloudSqlSingleUserCredentials

clear()

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

clearInstanceId()

public CloudSqlSingleUserCredentials.Builder clearInstanceId()

Required. Instance ID of the Cloud SQL instance.

string instance_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CloudSqlSingleUserCredentials.Builder

This builder for chaining.

clearPassword()

public CloudSqlSingleUserCredentials.Builder clearPassword()

Optional. Password of the Cloud SQL instance. If this is not provided, a random password will be generated.

string password = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CloudSqlSingleUserCredentials.Builder

This builder for chaining.

clearUsername()

public CloudSqlSingleUserCredentials.Builder clearUsername()

Required. Username of the Cloud SQL instance.

string username = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CloudSqlSingleUserCredentials.Builder

This builder for chaining.

getDefaultInstanceForType()

public CloudSqlSingleUserCredentials getDefaultInstanceForType()
Returns
Type Description
CloudSqlSingleUserCredentials

getDescriptorForType()

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

getInstanceId()

public String getInstanceId()

Required. Instance ID of the Cloud SQL instance.

string instance_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The instanceId.

getInstanceIdBytes()

public ByteString getInstanceIdBytes()

Required. Instance ID of the Cloud SQL instance.

string instance_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for instanceId.

getPassword()

public String getPassword()

Optional. Password of the Cloud SQL instance. If this is not provided, a random password will be generated.

string password = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The password.

getPasswordBytes()

public ByteString getPasswordBytes()

Optional. Password of the Cloud SQL instance. If this is not provided, a random password will be generated.

string password = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for password.

getUsername()

public String getUsername()

Required. Username of the Cloud SQL instance.

string username = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The username.

getUsernameBytes()

public ByteString getUsernameBytes()

Required. Username of the Cloud SQL instance.

string username = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for username.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CloudSqlSingleUserCredentials other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setInstanceId(String value)

public CloudSqlSingleUserCredentials.Builder setInstanceId(String value)

Required. Instance ID of the Cloud SQL instance.

string instance_id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The instanceId to set.

Returns
Type Description
CloudSqlSingleUserCredentials.Builder

This builder for chaining.

setInstanceIdBytes(ByteString value)

public CloudSqlSingleUserCredentials.Builder setInstanceIdBytes(ByteString value)

Required. Instance ID of the Cloud SQL instance.

string instance_id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for instanceId to set.

Returns
Type Description
CloudSqlSingleUserCredentials.Builder

This builder for chaining.

setPassword(String value)

public CloudSqlSingleUserCredentials.Builder setPassword(String value)

Optional. Password of the Cloud SQL instance. If this is not provided, a random password will be generated.

string password = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The password to set.

Returns
Type Description
CloudSqlSingleUserCredentials.Builder

This builder for chaining.

setPasswordBytes(ByteString value)

public CloudSqlSingleUserCredentials.Builder setPasswordBytes(ByteString value)

Optional. Password of the Cloud SQL instance. If this is not provided, a random password will be generated.

string password = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for password to set.

Returns
Type Description
CloudSqlSingleUserCredentials.Builder

This builder for chaining.

setUsername(String value)

public CloudSqlSingleUserCredentials.Builder setUsername(String value)

Required. Username of the Cloud SQL instance.

string username = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The username to set.

Returns
Type Description
CloudSqlSingleUserCredentials.Builder

This builder for chaining.

setUsernameBytes(ByteString value)

public CloudSqlSingleUserCredentials.Builder setUsernameBytes(ByteString value)

Required. Username of the Cloud SQL instance.

string username = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for username to set.

Returns
Type Description
CloudSqlSingleUserCredentials.Builder

This builder for chaining.