Class Connection.Builder (3.58.0)

public static final class Connection.Builder extends GeneratedMessageV3.Builder<Connection.Builder> implements ConnectionOrBuilder

A data connection to allow DLP to profile data in locations that require additional configuration.

Protobuf type google.privacy.dlp.v2.Connection

Implements

ConnectionOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllErrors(Iterable<? extends Error> values)

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];

Parameter
Name Description
values Iterable<? extends com.google.privacy.dlp.v2.Error>
Returns
Type Description
Connection.Builder

addErrors(Error value)

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];

Parameter
Name Description
value Error
Returns
Type Description
Connection.Builder

addErrors(Error.Builder builderForValue)

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];

Parameter
Name Description
builderForValue Error.Builder
Returns
Type Description
Connection.Builder

addErrors(int index, Error value)

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];

Parameters
Name Description
index int
value Error
Returns
Type Description
Connection.Builder

addErrors(int index, Error.Builder builderForValue)

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];

Parameters
Name Description
index int
builderForValue Error.Builder
Returns
Type Description
Connection.Builder

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];

Returns
Type Description
Error.Builder

addErrorsBuilder(int index)

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];

Parameter
Name Description
index int
Returns
Type Description
Error.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Connection.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Connection.Builder
Overrides

build()

public Connection build()
Returns
Type Description
Connection

buildPartial()

public Connection buildPartial()
Returns
Type Description
Connection

clear()

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

clearCloudSql()

public Connection.Builder clearCloudSql()

Connect to a Cloud SQL instance.

.google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;

Returns
Type Description
Connection.Builder

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];

Returns
Type Description
Connection.Builder

clearField(Descriptors.FieldDescriptor field)

public Connection.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Connection.Builder
Overrides

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
Type Description
Connection.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Connection.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Connection.Builder
Overrides

clearProperties()

public Connection.Builder clearProperties()
Returns
Type Description
Connection.Builder

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
Type Description
Connection.Builder

This builder for chaining.

clone()

public Connection.Builder clone()
Returns
Type Description
Connection.Builder
Overrides

getCloudSql()

public CloudSqlProperties getCloudSql()

Connect to a Cloud SQL instance.

.google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;

Returns
Type Description
CloudSqlProperties

The cloudSql.

getCloudSqlBuilder()

public CloudSqlProperties.Builder getCloudSqlBuilder()

Connect to a Cloud SQL instance.

.google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;

Returns
Type Description
CloudSqlProperties.Builder

getCloudSqlOrBuilder()

public CloudSqlPropertiesOrBuilder getCloudSqlOrBuilder()

Connect to a Cloud SQL instance.

.google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;

Returns
Type Description
CloudSqlPropertiesOrBuilder

getDefaultInstanceForType()

public Connection getDefaultInstanceForType()
Returns
Type Description
Connection

getDescriptorForType()

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

getErrors(int index)

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];

Parameter
Name Description
index int
Returns
Type Description
Error

getErrorsBuilder(int index)

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];

Parameter
Name Description
index int
Returns
Type Description
Error.Builder

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];

Returns
Type Description
List<Builder>

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];

Returns
Type Description
int

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];

Returns
Type Description
List<Error>

getErrorsOrBuilder(int index)

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];

Parameter
Name Description
index int
Returns
Type Description
ErrorOrBuilder

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];

Returns
Type Description
List<? extends com.google.privacy.dlp.v2.ErrorOrBuilder>

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];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Name of the connection: projects/{project}/locations/{location}/connections/{name}.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getPropertiesCase()

public Connection.PropertiesCase getPropertiesCase()
Returns
Type Description
Connection.PropertiesCase

getState()

public ConnectionState getState()

Required. The connection's state in its lifecycle.

.google.privacy.dlp.v2.ConnectionState state = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ConnectionState

The state.

getStateValue()

public int getStateValue()

Required. The connection's state in its lifecycle.

.google.privacy.dlp.v2.ConnectionState state = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for state.

hasCloudSql()

public boolean hasCloudSql()

Connect to a Cloud SQL instance.

.google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;

Returns
Type Description
boolean

Whether the cloudSql field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCloudSql(CloudSqlProperties value)

public Connection.Builder mergeCloudSql(CloudSqlProperties value)

Connect to a Cloud SQL instance.

.google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;

Parameter
Name Description
value CloudSqlProperties
Returns
Type Description
Connection.Builder

mergeFrom(Connection other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Connection.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Connection.Builder
Overrides

removeErrors(int index)

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];

Parameter
Name Description
index int
Returns
Type Description
Connection.Builder

setCloudSql(CloudSqlProperties value)

public Connection.Builder setCloudSql(CloudSqlProperties value)

Connect to a Cloud SQL instance.

.google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;

Parameter
Name Description
value CloudSqlProperties
Returns
Type Description
Connection.Builder

setCloudSql(CloudSqlProperties.Builder builderForValue)

public Connection.Builder setCloudSql(CloudSqlProperties.Builder builderForValue)

Connect to a Cloud SQL instance.

.google.privacy.dlp.v2.CloudSqlProperties cloud_sql = 4;

Parameter
Name Description
builderForValue CloudSqlProperties.Builder
Returns
Type Description
Connection.Builder

setErrors(int index, Error value)

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];

Parameters
Name Description
index int
value Error
Returns
Type Description
Connection.Builder

setErrors(int index, Error.Builder builderForValue)

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];

Parameters
Name Description
index int
builderForValue Error.Builder
Returns
Type Description
Connection.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Connection.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Connection.Builder
Overrides

setName(String value)

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];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Connection.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Connection.Builder setNameBytes(ByteString value)

Output only. Name of the connection: projects/{project}/locations/{location}/connections/{name}.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Connection.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Connection.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Connection.Builder
Overrides

setState(ConnectionState value)

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];

Parameter
Name Description
value ConnectionState

The state to set.

Returns
Type Description
Connection.Builder

This builder for chaining.

setStateValue(int value)

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];

Parameter
Name Description
value int

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

Returns
Type Description
Connection.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Connection.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Connection.Builder
Overrides