Class FieldTransformation.Builder (3.43.0)

public static final class FieldTransformation.Builder extends GeneratedMessageV3.Builder<FieldTransformation.Builder> implements FieldTransformationOrBuilder

The transformation to apply to the field.

Protobuf type google.privacy.dlp.v2.FieldTransformation

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllFields(Iterable<? extends FieldId> values)

public FieldTransformation.Builder addAllFields(Iterable<? extends FieldId> values)

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valuesIterable<? extends com.google.privacy.dlp.v2.FieldId>
Returns
TypeDescription
FieldTransformation.Builder

addFields(FieldId value)

public FieldTransformation.Builder addFields(FieldId value)

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueFieldId
Returns
TypeDescription
FieldTransformation.Builder

addFields(FieldId.Builder builderForValue)

public FieldTransformation.Builder addFields(FieldId.Builder builderForValue)

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueFieldId.Builder
Returns
TypeDescription
FieldTransformation.Builder

addFields(int index, FieldId value)

public FieldTransformation.Builder addFields(int index, FieldId value)

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
indexint
valueFieldId
Returns
TypeDescription
FieldTransformation.Builder

addFields(int index, FieldId.Builder builderForValue)

public FieldTransformation.Builder addFields(int index, FieldId.Builder builderForValue)

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
indexint
builderForValueFieldId.Builder
Returns
TypeDescription
FieldTransformation.Builder

addFieldsBuilder()

public FieldId.Builder addFieldsBuilder()

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
FieldId.Builder

addFieldsBuilder(int index)

public FieldId.Builder addFieldsBuilder(int index)

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
FieldId.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public FieldTransformation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
FieldTransformation.Builder
Overrides

build()

public FieldTransformation build()
Returns
TypeDescription
FieldTransformation

buildPartial()

public FieldTransformation buildPartial()
Returns
TypeDescription
FieldTransformation

clear()

public FieldTransformation.Builder clear()
Returns
TypeDescription
FieldTransformation.Builder
Overrides

clearCondition()

public FieldTransformation.Builder clearCondition()

Only apply the transformation if the condition evaluates to true for the given RecordCondition. The conditions are allowed to reference fields that are not used in the actual transformation.

Example Use Cases:

  • Apply a different bucket transformation to an age column if the zip code column for the same record is within a specific range.
  • Redact a field if the date of birth field is greater than 85.

.google.privacy.dlp.v2.RecordCondition condition = 3;

Returns
TypeDescription
FieldTransformation.Builder

clearField(Descriptors.FieldDescriptor field)

public FieldTransformation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
FieldTransformation.Builder
Overrides

clearFields()

public FieldTransformation.Builder clearFields()

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
FieldTransformation.Builder

clearInfoTypeTransformations()

public FieldTransformation.Builder clearInfoTypeTransformations()

Treat the contents of the field as free text, and selectively transform content that matches an InfoType.

.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;

Returns
TypeDescription
FieldTransformation.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public FieldTransformation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
FieldTransformation.Builder
Overrides

clearPrimitiveTransformation()

public FieldTransformation.Builder clearPrimitiveTransformation()

Apply the transformation to the entire field.

.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;

Returns
TypeDescription
FieldTransformation.Builder

clearTransformation()

public FieldTransformation.Builder clearTransformation()
Returns
TypeDescription
FieldTransformation.Builder

clone()

public FieldTransformation.Builder clone()
Returns
TypeDescription
FieldTransformation.Builder
Overrides

getCondition()

public RecordCondition getCondition()

Only apply the transformation if the condition evaluates to true for the given RecordCondition. The conditions are allowed to reference fields that are not used in the actual transformation.

Example Use Cases:

  • Apply a different bucket transformation to an age column if the zip code column for the same record is within a specific range.
  • Redact a field if the date of birth field is greater than 85.

.google.privacy.dlp.v2.RecordCondition condition = 3;

Returns
TypeDescription
RecordCondition

The condition.

getConditionBuilder()

public RecordCondition.Builder getConditionBuilder()

Only apply the transformation if the condition evaluates to true for the given RecordCondition. The conditions are allowed to reference fields that are not used in the actual transformation.

Example Use Cases:

  • Apply a different bucket transformation to an age column if the zip code column for the same record is within a specific range.
  • Redact a field if the date of birth field is greater than 85.

.google.privacy.dlp.v2.RecordCondition condition = 3;

Returns
TypeDescription
RecordCondition.Builder

getConditionOrBuilder()

public RecordConditionOrBuilder getConditionOrBuilder()

Only apply the transformation if the condition evaluates to true for the given RecordCondition. The conditions are allowed to reference fields that are not used in the actual transformation.

Example Use Cases:

  • Apply a different bucket transformation to an age column if the zip code column for the same record is within a specific range.
  • Redact a field if the date of birth field is greater than 85.

.google.privacy.dlp.v2.RecordCondition condition = 3;

Returns
TypeDescription
RecordConditionOrBuilder

getDefaultInstanceForType()

public FieldTransformation getDefaultInstanceForType()
Returns
TypeDescription
FieldTransformation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFields(int index)

public FieldId getFields(int index)

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
FieldId

getFieldsBuilder(int index)

public FieldId.Builder getFieldsBuilder(int index)

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
FieldId.Builder

getFieldsBuilderList()

public List<FieldId.Builder> getFieldsBuilderList()

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<Builder>

getFieldsCount()

public int getFieldsCount()

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

getFieldsList()

public List<FieldId> getFieldsList()

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<FieldId>

getFieldsOrBuilder(int index)

public FieldIdOrBuilder getFieldsOrBuilder(int index)

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
FieldIdOrBuilder

getFieldsOrBuilderList()

public List<? extends FieldIdOrBuilder> getFieldsOrBuilderList()

Required. Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type".

repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<? extends com.google.privacy.dlp.v2.FieldIdOrBuilder>

getInfoTypeTransformations()

public InfoTypeTransformations getInfoTypeTransformations()

Treat the contents of the field as free text, and selectively transform content that matches an InfoType.

.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;

Returns
TypeDescription
InfoTypeTransformations

The infoTypeTransformations.

getInfoTypeTransformationsBuilder()

public InfoTypeTransformations.Builder getInfoTypeTransformationsBuilder()

Treat the contents of the field as free text, and selectively transform content that matches an InfoType.

.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;

Returns
TypeDescription
InfoTypeTransformations.Builder

getInfoTypeTransformationsOrBuilder()

public InfoTypeTransformationsOrBuilder getInfoTypeTransformationsOrBuilder()

Treat the contents of the field as free text, and selectively transform content that matches an InfoType.

.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;

Returns
TypeDescription
InfoTypeTransformationsOrBuilder

getPrimitiveTransformation()

public PrimitiveTransformation getPrimitiveTransformation()

Apply the transformation to the entire field.

.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;

Returns
TypeDescription
PrimitiveTransformation

The primitiveTransformation.

getPrimitiveTransformationBuilder()

public PrimitiveTransformation.Builder getPrimitiveTransformationBuilder()

Apply the transformation to the entire field.

.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;

Returns
TypeDescription
PrimitiveTransformation.Builder

getPrimitiveTransformationOrBuilder()

public PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder()

Apply the transformation to the entire field.

.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;

Returns
TypeDescription
PrimitiveTransformationOrBuilder

getTransformationCase()

public FieldTransformation.TransformationCase getTransformationCase()
Returns
TypeDescription
FieldTransformation.TransformationCase

hasCondition()

public boolean hasCondition()

Only apply the transformation if the condition evaluates to true for the given RecordCondition. The conditions are allowed to reference fields that are not used in the actual transformation.

Example Use Cases:

  • Apply a different bucket transformation to an age column if the zip code column for the same record is within a specific range.
  • Redact a field if the date of birth field is greater than 85.

.google.privacy.dlp.v2.RecordCondition condition = 3;

Returns
TypeDescription
boolean

Whether the condition field is set.

hasInfoTypeTransformations()

public boolean hasInfoTypeTransformations()

Treat the contents of the field as free text, and selectively transform content that matches an InfoType.

.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;

Returns
TypeDescription
boolean

Whether the infoTypeTransformations field is set.

hasPrimitiveTransformation()

public boolean hasPrimitiveTransformation()

Apply the transformation to the entire field.

.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;

Returns
TypeDescription
boolean

Whether the primitiveTransformation field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides