Class ExecuteSqlRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ExecuteSqlRequest.Builder>
com.google.cloud.alloydb.v1beta.ExecuteSqlRequest.Builder
All Implemented Interfaces:
ExecuteSqlRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ExecuteSqlRequest

public static final class ExecuteSqlRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<ExecuteSqlRequest.Builder> implements ExecuteSqlRequestOrBuilder
 Request for ExecuteSql rpc.
 
Protobuf type google.cloud.alloydb.v1beta.ExecuteSqlRequest
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ExecuteSqlRequest.Builder>
    • clear

      public ExecuteSqlRequest.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ExecuteSqlRequest.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ExecuteSqlRequest.Builder>
    • getDefaultInstanceForType

      public ExecuteSqlRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ExecuteSqlRequest build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ExecuteSqlRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ExecuteSqlRequest.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ExecuteSqlRequest.Builder>
    • mergeFrom

      public ExecuteSqlRequest.Builder mergeFrom(ExecuteSqlRequest other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ExecuteSqlRequest.Builder>
    • mergeFrom

      public ExecuteSqlRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ExecuteSqlRequest.Builder>
      Throws:
      IOException
    • getUserCredentialCase

      public ExecuteSqlRequest.UserCredentialCase getUserCredentialCase()
      Specified by:
      getUserCredentialCase in interface ExecuteSqlRequestOrBuilder
    • clearUserCredential

      public ExecuteSqlRequest.Builder clearUserCredential()
    • hasPassword

      public boolean hasPassword()
       Optional. The database native user’s password.
       
      string password = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasPassword in interface ExecuteSqlRequestOrBuilder
      Returns:
      Whether the password field is set.
    • getPassword

      public String getPassword()
       Optional. The database native user’s password.
       
      string password = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPassword in interface ExecuteSqlRequestOrBuilder
      Returns:
      The password.
    • getPasswordBytes

      public com.google.protobuf.ByteString getPasswordBytes()
       Optional. The database native user’s password.
       
      string password = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPasswordBytes in interface ExecuteSqlRequestOrBuilder
      Returns:
      The bytes for password.
    • setPassword

      public ExecuteSqlRequest.Builder setPassword(String value)
       Optional. The database native user’s password.
       
      string password = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The password to set.
      Returns:
      This builder for chaining.
    • clearPassword

      public ExecuteSqlRequest.Builder clearPassword()
       Optional. The database native user’s password.
       
      string password = 5 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setPasswordBytes

      public ExecuteSqlRequest.Builder setPasswordBytes(com.google.protobuf.ByteString value)
       Optional. The database native user’s password.
       
      string password = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for password to set.
      Returns:
      This builder for chaining.
    • getInstance

      public String getInstance()
       Required. The instance where the SQL will be executed. For the required
       format, see the comment on the Instance.name field.
       
      string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getInstance in interface ExecuteSqlRequestOrBuilder
      Returns:
      The instance.
    • getInstanceBytes

      public com.google.protobuf.ByteString getInstanceBytes()
       Required. The instance where the SQL will be executed. For the required
       format, see the comment on the Instance.name field.
       
      string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getInstanceBytes in interface ExecuteSqlRequestOrBuilder
      Returns:
      The bytes for instance.
    • setInstance

      public ExecuteSqlRequest.Builder setInstance(String value)
       Required. The instance where the SQL will be executed. For the required
       format, see the comment on the Instance.name field.
       
      string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The instance to set.
      Returns:
      This builder for chaining.
    • clearInstance

      public ExecuteSqlRequest.Builder clearInstance()
       Required. The instance where the SQL will be executed. For the required
       format, see the comment on the Instance.name field.
       
      string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setInstanceBytes

      public ExecuteSqlRequest.Builder setInstanceBytes(com.google.protobuf.ByteString value)
       Required. The instance where the SQL will be executed. For the required
       format, see the comment on the Instance.name field.
       
      string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for instance to set.
      Returns:
      This builder for chaining.
    • getDatabase

      public String getDatabase()
       Required. Name of the database where the query will be executed.
       Note - Value provided should be the same as expected from `SELECT
       current_database();` and NOT as a resource reference.
       
      string database = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDatabase in interface ExecuteSqlRequestOrBuilder
      Returns:
      The database.
    • getDatabaseBytes

      public com.google.protobuf.ByteString getDatabaseBytes()
       Required. Name of the database where the query will be executed.
       Note - Value provided should be the same as expected from `SELECT
       current_database();` and NOT as a resource reference.
       
      string database = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDatabaseBytes in interface ExecuteSqlRequestOrBuilder
      Returns:
      The bytes for database.
    • setDatabase

      public ExecuteSqlRequest.Builder setDatabase(String value)
       Required. Name of the database where the query will be executed.
       Note - Value provided should be the same as expected from `SELECT
       current_database();` and NOT as a resource reference.
       
      string database = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The database to set.
      Returns:
      This builder for chaining.
    • clearDatabase

      public ExecuteSqlRequest.Builder clearDatabase()
       Required. Name of the database where the query will be executed.
       Note - Value provided should be the same as expected from `SELECT
       current_database();` and NOT as a resource reference.
       
      string database = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setDatabaseBytes

      public ExecuteSqlRequest.Builder setDatabaseBytes(com.google.protobuf.ByteString value)
       Required. Name of the database where the query will be executed.
       Note - Value provided should be the same as expected from `SELECT
       current_database();` and NOT as a resource reference.
       
      string database = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for database to set.
      Returns:
      This builder for chaining.
    • getUser

      public String getUser()
       Required. Database user to be used for executing the SQL.
       Note - Value provided should be the same as expected from
       `SELECT current_user;` and NOT as a resource reference.
       
      string user = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getUser in interface ExecuteSqlRequestOrBuilder
      Returns:
      The user.
    • getUserBytes

      public com.google.protobuf.ByteString getUserBytes()
       Required. Database user to be used for executing the SQL.
       Note - Value provided should be the same as expected from
       `SELECT current_user;` and NOT as a resource reference.
       
      string user = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getUserBytes in interface ExecuteSqlRequestOrBuilder
      Returns:
      The bytes for user.
    • setUser

      public ExecuteSqlRequest.Builder setUser(String value)
       Required. Database user to be used for executing the SQL.
       Note - Value provided should be the same as expected from
       `SELECT current_user;` and NOT as a resource reference.
       
      string user = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The user to set.
      Returns:
      This builder for chaining.
    • clearUser

      public ExecuteSqlRequest.Builder clearUser()
       Required. Database user to be used for executing the SQL.
       Note - Value provided should be the same as expected from
       `SELECT current_user;` and NOT as a resource reference.
       
      string user = 3 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setUserBytes

      public ExecuteSqlRequest.Builder setUserBytes(com.google.protobuf.ByteString value)
       Required. Database user to be used for executing the SQL.
       Note - Value provided should be the same as expected from
       `SELECT current_user;` and NOT as a resource reference.
       
      string user = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for user to set.
      Returns:
      This builder for chaining.
    • getSqlStatement

      public String getSqlStatement()
       Required. SQL statement to execute on database. Any valid statement is
       permitted, including DDL, DML, DQL statements.
       
      string sql_statement = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getSqlStatement in interface ExecuteSqlRequestOrBuilder
      Returns:
      The sqlStatement.
    • getSqlStatementBytes

      public com.google.protobuf.ByteString getSqlStatementBytes()
       Required. SQL statement to execute on database. Any valid statement is
       permitted, including DDL, DML, DQL statements.
       
      string sql_statement = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getSqlStatementBytes in interface ExecuteSqlRequestOrBuilder
      Returns:
      The bytes for sqlStatement.
    • setSqlStatement

      public ExecuteSqlRequest.Builder setSqlStatement(String value)
       Required. SQL statement to execute on database. Any valid statement is
       permitted, including DDL, DML, DQL statements.
       
      string sql_statement = 4 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The sqlStatement to set.
      Returns:
      This builder for chaining.
    • clearSqlStatement

      public ExecuteSqlRequest.Builder clearSqlStatement()
       Required. SQL statement to execute on database. Any valid statement is
       permitted, including DDL, DML, DQL statements.
       
      string sql_statement = 4 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setSqlStatementBytes

      public ExecuteSqlRequest.Builder setSqlStatementBytes(com.google.protobuf.ByteString value)
       Required. SQL statement to execute on database. Any valid statement is
       permitted, including DDL, DML, DQL statements.
       
      string sql_statement = 4 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for sqlStatement to set.
      Returns:
      This builder for chaining.
    • getValidateOnly

      public boolean getValidateOnly()
       Optional. If set, validates the sql statement by performing
       syntax and semantic validation and doesn't execute the query.
       
      bool validate_only = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getValidateOnly in interface ExecuteSqlRequestOrBuilder
      Returns:
      The validateOnly.
    • setValidateOnly

      public ExecuteSqlRequest.Builder setValidateOnly(boolean value)
       Optional. If set, validates the sql statement by performing
       syntax and semantic validation and doesn't execute the query.
       
      bool validate_only = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The validateOnly to set.
      Returns:
      This builder for chaining.
    • clearValidateOnly

      public ExecuteSqlRequest.Builder clearValidateOnly()
       Optional. If set, validates the sql statement by performing
       syntax and semantic validation and doesn't execute the query.
       
      bool validate_only = 6 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.