Class Connection.Builder

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

public static final class Connection.Builder extends com.google.protobuf.GeneratedMessage.Builder<Connection.Builder> implements ConnectionOrBuilder
 A data connection to allow the DLP API to profile data in locations that
 require additional configuration.
 
Protobuf type google.privacy.dlp.v2.Connection
  • 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<Connection.Builder>
    • clear

      public Connection.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<Connection.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<Connection.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public Connection.Builder mergeFrom(Connection other)
    • isInitialized

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

      public Connection.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<Connection.Builder>
      Throws:
      IOException
    • getPropertiesCase

      public Connection.PropertiesCase getPropertiesCase()
      Specified by:
      getPropertiesCase in interface ConnectionOrBuilder
    • clearProperties

      public Connection.Builder clearProperties()
    • getName

      public String getName()
       Output only. Name of the connection:
       `projects/{project}/locations/{location}/connections/{name}`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getName in interface ConnectionOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Output only. Name of the connection:
       `projects/{project}/locations/{location}/connections/{name}`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNameBytes in interface ConnectionOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Connection.Builder setName(String value)
       Output only. Name of the connection:
       `projects/{project}/locations/{location}/connections/{name}`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Connection.Builder clearName()
       Output only. Name of the connection:
       `projects/{project}/locations/{location}/connections/{name}`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setNameBytes

      public Connection.Builder setNameBytes(com.google.protobuf.ByteString value)
       Output only. Name of the connection:
       `projects/{project}/locations/{location}/connections/{name}`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getStateValue

      public int getStateValue()
       Required. The connection's state in its lifecycle.
       
      .google.privacy.dlp.v2.ConnectionState state = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getStateValue in interface ConnectionOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • setStateValue

      public Connection.Builder setStateValue(int value)
       Required. The connection's state in its lifecycle.
       
      .google.privacy.dlp.v2.ConnectionState state = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for state to set.
      Returns:
      This builder for chaining.
    • getState

      public ConnectionState getState()
       Required. The connection's state in its lifecycle.
       
      .google.privacy.dlp.v2.ConnectionState state = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getState in interface ConnectionOrBuilder
      Returns:
      The state.
    • setState

      public Connection.Builder setState(ConnectionState value)
       Required. The connection's state in its lifecycle.
       
      .google.privacy.dlp.v2.ConnectionState state = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The state to set.
      Returns:
      This builder for chaining.
    • clearState

      public Connection.Builder clearState()
       Required. The connection's state in its lifecycle.
       
      .google.privacy.dlp.v2.ConnectionState state = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getErrorsList

      public List<Error> getErrorsList()
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getErrorsList in interface ConnectionOrBuilder
    • getErrorsCount

      public int getErrorsCount()
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getErrorsCount in interface ConnectionOrBuilder
    • getErrors

      public Error getErrors(int index)
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getErrors in interface ConnectionOrBuilder
    • setErrors

      public Connection.Builder setErrors(int index, Error value)
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setErrors

      public Connection.Builder setErrors(int index, Error.Builder builderForValue)
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addErrors

      public Connection.Builder addErrors(Error value)
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addErrors

      public Connection.Builder addErrors(int index, Error value)
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addErrors

      public Connection.Builder addErrors(Error.Builder builderForValue)
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addErrors

      public Connection.Builder addErrors(int index, Error.Builder builderForValue)
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addAllErrors

      public Connection.Builder addAllErrors(Iterable<? extends Error> values)
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearErrors

      public Connection.Builder clearErrors()
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • removeErrors

      public Connection.Builder removeErrors(int index)
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getErrorsBuilder

      public Error.Builder getErrorsBuilder(int index)
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getErrorsOrBuilder

      public ErrorOrBuilder getErrorsOrBuilder(int index)
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getErrorsOrBuilder in interface ConnectionOrBuilder
    • getErrorsOrBuilderList

      public List<? extends ErrorOrBuilder> getErrorsOrBuilderList()
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getErrorsOrBuilderList in interface ConnectionOrBuilder
    • addErrorsBuilder

      public Error.Builder addErrorsBuilder()
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addErrorsBuilder

      public Error.Builder addErrorsBuilder(int index)
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getErrorsBuilderList

      public List<Error.Builder> getErrorsBuilderList()
       Output only. Set if status == ERROR, to provide additional details. Will
       store the last 10 errors sorted with the most recent first.
       
      repeated .google.privacy.dlp.v2.Error errors = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • hasCloudSql

      public boolean hasCloudSql()
       Connect to a Cloud SQL instance.
       
      .google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;
      Specified by:
      hasCloudSql in interface ConnectionOrBuilder
      Returns:
      Whether the cloudSql field is set.
    • getCloudSql

      public CloudSqlProperties getCloudSql()
       Connect to a Cloud SQL instance.
       
      .google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;
      Specified by:
      getCloudSql in interface ConnectionOrBuilder
      Returns:
      The cloudSql.
    • setCloudSql

      public Connection.Builder setCloudSql(CloudSqlProperties value)
       Connect to a Cloud SQL instance.
       
      .google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;
    • setCloudSql

      public Connection.Builder setCloudSql(CloudSqlProperties.Builder builderForValue)
       Connect to a Cloud SQL instance.
       
      .google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;
    • mergeCloudSql

      public Connection.Builder mergeCloudSql(CloudSqlProperties value)
       Connect to a Cloud SQL instance.
       
      .google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;
    • clearCloudSql

      public Connection.Builder clearCloudSql()
       Connect to a Cloud SQL instance.
       
      .google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;
    • getCloudSqlBuilder

      public CloudSqlProperties.Builder getCloudSqlBuilder()
       Connect to a Cloud SQL instance.
       
      .google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;
    • getCloudSqlOrBuilder

      public CloudSqlPropertiesOrBuilder getCloudSqlOrBuilder()
       Connect to a Cloud SQL instance.
       
      .google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;
      Specified by:
      getCloudSqlOrBuilder in interface ConnectionOrBuilder