Class ExecuteSqlPayload.Builder (0.1.0)

public static final class ExecuteSqlPayload.Builder extends GeneratedMessage.Builder<ExecuteSqlPayload.Builder> implements ExecuteSqlPayloadOrBuilder

The request payload used to execute SQL statements.

Protobuf type google.cloud.sql.v1beta4.ExecuteSqlPayload

Static Methods

getDescriptor()

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

Methods

build()

public ExecuteSqlPayload build()
Returns
Type Description
ExecuteSqlPayload

buildPartial()

public ExecuteSqlPayload buildPartial()
Returns
Type Description
ExecuteSqlPayload

clear()

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

clearApplication()

public ExecuteSqlPayload.Builder clearApplication()

Optional. Specifies the name of the application that is making the request. This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters.

string application = 16 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

clearAutoIamAuthn()

public ExecuteSqlPayload.Builder clearAutoIamAuthn()

Optional. When set to true, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database.

bool auto_iam_authn = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

clearDatabase()

public ExecuteSqlPayload.Builder clearDatabase()

Optional. Name of the database on which the statement will be executed.

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

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

clearPartialResultMode()

public ExecuteSqlPayload.Builder clearPartialResultMode()

Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error.

.google.cloud.sql.v1beta4.ExecuteSqlPayload.PartialResultMode partial_result_mode = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

clearPasswordSecretVersion()

public ExecuteSqlPayload.Builder clearPasswordSecretVersion()

Optional. The resource name of the Secret Manager secret holding the password for the user to log into the database. The secret should be created using the regional endpoint (for API) or from the Regional Secrets page (for UI), and stored in the same region as the Cloud SQL instance. The expected resource name format is projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}. This field is used together with the user field. The secret resource name will not be stored.

string password_secret_version = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

clearRowLimit()

public ExecuteSqlPayload.Builder clearRowLimit()

Optional. The maximum number of rows returned per SQL statement.

int64 row_limit = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

clearSqlStatement()

public ExecuteSqlPayload.Builder clearSqlStatement()

Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.

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

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

clearUser()

public ExecuteSqlPayload.Builder clearUser()

Optional. The name of an existing database user to connect to the database. When auto_iam_authn is set to true, this field is ignored and the API caller's IAM user is used.

string user = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

clearUserPassword()

public ExecuteSqlPayload.Builder clearUserPassword()
Returns
Type Description
ExecuteSqlPayload.Builder

getApplication()

public String getApplication()

Optional. Specifies the name of the application that is making the request. This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters.

string application = 16 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The application.

getApplicationBytes()

public ByteString getApplicationBytes()

Optional. Specifies the name of the application that is making the request. This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters.

string application = 16 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for application.

getAutoIamAuthn()

public boolean getAutoIamAuthn()

Optional. When set to true, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database.

bool auto_iam_authn = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The autoIamAuthn.

getDatabase()

public String getDatabase()

Optional. Name of the database on which the statement will be executed.

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

Returns
Type Description
String

The database.

getDatabaseBytes()

public ByteString getDatabaseBytes()

Optional. Name of the database on which the statement will be executed.

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

Returns
Type Description
ByteString

The bytes for database.

getDefaultInstanceForType()

public ExecuteSqlPayload getDefaultInstanceForType()
Returns
Type Description
ExecuteSqlPayload

getDescriptorForType()

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

getPartialResultMode()

public ExecuteSqlPayload.PartialResultMode getPartialResultMode()

Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error.

.google.cloud.sql.v1beta4.ExecuteSqlPayload.PartialResultMode partial_result_mode = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ExecuteSqlPayload.PartialResultMode

The partialResultMode.

getPartialResultModeValue()

public int getPartialResultModeValue()

Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error.

.google.cloud.sql.v1beta4.ExecuteSqlPayload.PartialResultMode partial_result_mode = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for partialResultMode.

getPasswordSecretVersion()

public String getPasswordSecretVersion()

Optional. The resource name of the Secret Manager secret holding the password for the user to log into the database. The secret should be created using the regional endpoint (for API) or from the Regional Secrets page (for UI), and stored in the same region as the Cloud SQL instance. The expected resource name format is projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}. This field is used together with the user field. The secret resource name will not be stored.

string password_secret_version = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The passwordSecretVersion.

getPasswordSecretVersionBytes()

public ByteString getPasswordSecretVersionBytes()

Optional. The resource name of the Secret Manager secret holding the password for the user to log into the database. The secret should be created using the regional endpoint (for API) or from the Regional Secrets page (for UI), and stored in the same region as the Cloud SQL instance. The expected resource name format is projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}. This field is used together with the user field. The secret resource name will not be stored.

string password_secret_version = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for passwordSecretVersion.

getRowLimit()

public long getRowLimit()

Optional. The maximum number of rows returned per SQL statement.

int64 row_limit = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The rowLimit.

getSqlStatement()

public String getSqlStatement()

Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.

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

Returns
Type Description
String

The sqlStatement.

getSqlStatementBytes()

public ByteString getSqlStatementBytes()

Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.

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

Returns
Type Description
ByteString

The bytes for sqlStatement.

getUser()

public String getUser()

Optional. The name of an existing database user to connect to the database. When auto_iam_authn is set to true, this field is ignored and the API caller's IAM user is used.

string user = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The user.

getUserBytes()

public ByteString getUserBytes()

Optional. The name of an existing database user to connect to the database. When auto_iam_authn is set to true, this field is ignored and the API caller's IAM user is used.

string user = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for user.

getUserPasswordCase()

public ExecuteSqlPayload.UserPasswordCase getUserPasswordCase()
Returns
Type Description
ExecuteSqlPayload.UserPasswordCase

hasAutoIamAuthn()

public boolean hasAutoIamAuthn()

Optional. When set to true, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database.

bool auto_iam_authn = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the autoIamAuthn field is set.

hasPasswordSecretVersion()

public boolean hasPasswordSecretVersion()

Optional. The resource name of the Secret Manager secret holding the password for the user to log into the database. The secret should be created using the regional endpoint (for API) or from the Regional Secrets page (for UI), and stored in the same region as the Cloud SQL instance. The expected resource name format is projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}. This field is used together with the user field. The secret resource name will not be stored.

string password_secret_version = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the passwordSecretVersion field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ExecuteSqlPayload other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setApplication(String value)

public ExecuteSqlPayload.Builder setApplication(String value)

Optional. Specifies the name of the application that is making the request. This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters.

string application = 16 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The application to set.

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

setApplicationBytes(ByteString value)

public ExecuteSqlPayload.Builder setApplicationBytes(ByteString value)

Optional. Specifies the name of the application that is making the request. This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters.

string application = 16 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for application to set.

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

setAutoIamAuthn(boolean value)

public ExecuteSqlPayload.Builder setAutoIamAuthn(boolean value)

Optional. When set to true, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database.

bool auto_iam_authn = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The autoIamAuthn to set.

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

setDatabase(String value)

public ExecuteSqlPayload.Builder setDatabase(String value)

Optional. Name of the database on which the statement will be executed.

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

Parameter
Name Description
value String

The database to set.

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

setDatabaseBytes(ByteString value)

public ExecuteSqlPayload.Builder setDatabaseBytes(ByteString value)

Optional. Name of the database on which the statement will be executed.

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

Parameter
Name Description
value ByteString

The bytes for database to set.

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

setPartialResultMode(ExecuteSqlPayload.PartialResultMode value)

public ExecuteSqlPayload.Builder setPartialResultMode(ExecuteSqlPayload.PartialResultMode value)

Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error.

.google.cloud.sql.v1beta4.ExecuteSqlPayload.PartialResultMode partial_result_mode = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ExecuteSqlPayload.PartialResultMode

The partialResultMode to set.

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

setPartialResultModeValue(int value)

public ExecuteSqlPayload.Builder setPartialResultModeValue(int value)

Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error.

.google.cloud.sql.v1beta4.ExecuteSqlPayload.PartialResultMode partial_result_mode = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

setPasswordSecretVersion(String value)

public ExecuteSqlPayload.Builder setPasswordSecretVersion(String value)

Optional. The resource name of the Secret Manager secret holding the password for the user to log into the database. The secret should be created using the regional endpoint (for API) or from the Regional Secrets page (for UI), and stored in the same region as the Cloud SQL instance. The expected resource name format is projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}. This field is used together with the user field. The secret resource name will not be stored.

string password_secret_version = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The passwordSecretVersion to set.

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

setPasswordSecretVersionBytes(ByteString value)

public ExecuteSqlPayload.Builder setPasswordSecretVersionBytes(ByteString value)

Optional. The resource name of the Secret Manager secret holding the password for the user to log into the database. The secret should be created using the regional endpoint (for API) or from the Regional Secrets page (for UI), and stored in the same region as the Cloud SQL instance. The expected resource name format is projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}. This field is used together with the user field. The secret resource name will not be stored.

string password_secret_version = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for passwordSecretVersion to set.

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

setRowLimit(long value)

public ExecuteSqlPayload.Builder setRowLimit(long value)

Optional. The maximum number of rows returned per SQL statement.

int64 row_limit = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value long

The rowLimit to set.

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

setSqlStatement(String value)

public ExecuteSqlPayload.Builder setSqlStatement(String value)

Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.

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

Parameter
Name Description
value String

The sqlStatement to set.

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

setSqlStatementBytes(ByteString value)

public ExecuteSqlPayload.Builder setSqlStatementBytes(ByteString value)

Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.

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

Parameter
Name Description
value ByteString

The bytes for sqlStatement to set.

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

setUser(String value)

public ExecuteSqlPayload.Builder setUser(String value)

Optional. The name of an existing database user to connect to the database. When auto_iam_authn is set to true, this field is ignored and the API caller's IAM user is used.

string user = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The user to set.

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.

setUserBytes(ByteString value)

public ExecuteSqlPayload.Builder setUserBytes(ByteString value)

Optional. The name of an existing database user to connect to the database. When auto_iam_authn is set to true, this field is ignored and the API caller's IAM user is used.

string user = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for user to set.

Returns
Type Description
ExecuteSqlPayload.Builder

This builder for chaining.