Class CloudSqlProperties.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CloudSqlProperties.Builder>
com.google.privacy.dlp.v2.CloudSqlProperties.Builder
All Implemented Interfaces:
CloudSqlPropertiesOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CloudSqlProperties

public static final class CloudSqlProperties.Builder extends com.google.protobuf.GeneratedMessage.Builder<CloudSqlProperties.Builder> implements CloudSqlPropertiesOrBuilder
 Cloud SQL connection properties.
 
Protobuf type google.privacy.dlp.v2.CloudSqlProperties
  • 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<CloudSqlProperties.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<CloudSqlProperties.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<CloudSqlProperties.Builder>
    • getDefaultInstanceForType

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

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

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

      public CloudSqlProperties.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<CloudSqlProperties.Builder>
    • mergeFrom

    • isInitialized

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

      public CloudSqlProperties.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<CloudSqlProperties.Builder>
      Throws:
      IOException
    • getCredentialCase

      public CloudSqlProperties.CredentialCase getCredentialCase()
      Specified by:
      getCredentialCase in interface CloudSqlPropertiesOrBuilder
    • clearCredential

      public CloudSqlProperties.Builder clearCredential()
    • 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];
      Specified by:
      getConnectionName in interface CloudSqlPropertiesOrBuilder
      Returns:
      The connectionName.
    • getConnectionNameBytes

      public com.google.protobuf.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];
      Specified by:
      getConnectionNameBytes in interface CloudSqlPropertiesOrBuilder
      Returns:
      The bytes for connectionName.
    • setConnectionName

      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];
      Parameters:
      value - The connectionName to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setConnectionNameBytes

      public CloudSqlProperties.Builder setConnectionNameBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for connectionName to set.
      Returns:
      This builder for chaining.
    • hasUsernamePassword

      public boolean hasUsernamePassword()
       A username and password stored in Secret Manager.
       
      .google.privacy.dlp.v2.SecretManagerCredential username_password = 2;
      Specified by:
      hasUsernamePassword in interface CloudSqlPropertiesOrBuilder
      Returns:
      Whether the usernamePassword field is set.
    • getUsernamePassword

      public SecretManagerCredential getUsernamePassword()
       A username and password stored in Secret Manager.
       
      .google.privacy.dlp.v2.SecretManagerCredential username_password = 2;
      Specified by:
      getUsernamePassword in interface CloudSqlPropertiesOrBuilder
      Returns:
      The usernamePassword.
    • setUsernamePassword

      public CloudSqlProperties.Builder setUsernamePassword(SecretManagerCredential value)
       A username and password stored in Secret Manager.
       
      .google.privacy.dlp.v2.SecretManagerCredential username_password = 2;
    • setUsernamePassword

      public CloudSqlProperties.Builder setUsernamePassword(SecretManagerCredential.Builder builderForValue)
       A username and password stored in Secret Manager.
       
      .google.privacy.dlp.v2.SecretManagerCredential username_password = 2;
    • mergeUsernamePassword

      public CloudSqlProperties.Builder mergeUsernamePassword(SecretManagerCredential value)
       A username and password stored in Secret Manager.
       
      .google.privacy.dlp.v2.SecretManagerCredential username_password = 2;
    • clearUsernamePassword

      public CloudSqlProperties.Builder clearUsernamePassword()
       A username and password stored in Secret Manager.
       
      .google.privacy.dlp.v2.SecretManagerCredential username_password = 2;
    • getUsernamePasswordBuilder

      public SecretManagerCredential.Builder getUsernamePasswordBuilder()
       A username and password stored in Secret Manager.
       
      .google.privacy.dlp.v2.SecretManagerCredential username_password = 2;
    • getUsernamePasswordOrBuilder

      public SecretManagerCredentialOrBuilder getUsernamePasswordOrBuilder()
       A username and password stored in Secret Manager.
       
      .google.privacy.dlp.v2.SecretManagerCredential username_password = 2;
      Specified by:
      getUsernamePasswordOrBuilder in interface CloudSqlPropertiesOrBuilder
    • hasCloudSqlIam

      public boolean hasCloudSqlIam()
       Built-in IAM authentication (must be configured in Cloud SQL).
       
      .google.privacy.dlp.v2.CloudSqlIamCredential cloud_sql_iam = 3;
      Specified by:
      hasCloudSqlIam in interface CloudSqlPropertiesOrBuilder
      Returns:
      Whether the cloudSqlIam field is set.
    • getCloudSqlIam

      public CloudSqlIamCredential getCloudSqlIam()
       Built-in IAM authentication (must be configured in Cloud SQL).
       
      .google.privacy.dlp.v2.CloudSqlIamCredential cloud_sql_iam = 3;
      Specified by:
      getCloudSqlIam in interface CloudSqlPropertiesOrBuilder
      Returns:
      The cloudSqlIam.
    • setCloudSqlIam

      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;
    • setCloudSqlIam

      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;
    • mergeCloudSqlIam

      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;
    • clearCloudSqlIam

      public CloudSqlProperties.Builder clearCloudSqlIam()
       Built-in IAM authentication (must be configured in Cloud SQL).
       
      .google.privacy.dlp.v2.CloudSqlIamCredential cloud_sql_iam = 3;
    • getCloudSqlIamBuilder

      public CloudSqlIamCredential.Builder getCloudSqlIamBuilder()
       Built-in IAM authentication (must be configured in Cloud SQL).
       
      .google.privacy.dlp.v2.CloudSqlIamCredential cloud_sql_iam = 3;
    • getCloudSqlIamOrBuilder

      public CloudSqlIamCredentialOrBuilder getCloudSqlIamOrBuilder()
       Built-in IAM authentication (must be configured in Cloud SQL).
       
      .google.privacy.dlp.v2.CloudSqlIamCredential cloud_sql_iam = 3;
      Specified by:
      getCloudSqlIamOrBuilder in interface CloudSqlPropertiesOrBuilder
    • getMaxConnections

      public int getMaxConnections()
       Required. The DLP API will limit its connections to max_connections.
       Must be 2 or greater.
       
      int32 max_connections = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getMaxConnections in interface CloudSqlPropertiesOrBuilder
      Returns:
      The maxConnections.
    • setMaxConnections

      public CloudSqlProperties.Builder setMaxConnections(int value)
       Required. The DLP API will limit its connections to max_connections.
       Must be 2 or greater.
       
      int32 max_connections = 4 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The maxConnections to set.
      Returns:
      This builder for chaining.
    • clearMaxConnections

      public CloudSqlProperties.Builder clearMaxConnections()
       Required. The DLP API will limit its connections to max_connections.
       Must be 2 or greater.
       
      int32 max_connections = 4 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getDatabaseEngineValue in interface CloudSqlPropertiesOrBuilder
      Returns:
      The enum numeric value on the wire for databaseEngine.
    • setDatabaseEngineValue

      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];
      Parameters:
      value - The enum numeric value on the wire for databaseEngine to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getDatabaseEngine in interface CloudSqlPropertiesOrBuilder
      Returns:
      The databaseEngine.
    • setDatabaseEngine

       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];
      Parameters:
      value - The databaseEngine to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.