Class FieldTransformation (3.57.0)

public final class FieldTransformation extends GeneratedMessageV3 implements FieldTransformationOrBuilder

The transformation to apply to the field.

Protobuf type google.privacy.dlp.v2.FieldTransformation

Static Fields

CONDITION_FIELD_NUMBER

public static final int CONDITION_FIELD_NUMBER
Field Value
Type Description
int

FIELDS_FIELD_NUMBER

public static final int FIELDS_FIELD_NUMBER
Field Value
Type Description
int

INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER

public static final int INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER
Field Value
Type Description
int

PRIMITIVE_TRANSFORMATION_FIELD_NUMBER

public static final int PRIMITIVE_TRANSFORMATION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static FieldTransformation getDefaultInstance()
Returns
Type Description
FieldTransformation

getDescriptor()

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

newBuilder()

public static FieldTransformation.Builder newBuilder()
Returns
Type Description
FieldTransformation.Builder

newBuilder(FieldTransformation prototype)

public static FieldTransformation.Builder newBuilder(FieldTransformation prototype)
Parameter
Name Description
prototype FieldTransformation
Returns
Type Description
FieldTransformation.Builder

parseDelimitedFrom(InputStream input)

public static FieldTransformation parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FieldTransformation
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FieldTransformation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FieldTransformation
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static FieldTransformation parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
FieldTransformation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static FieldTransformation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FieldTransformation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static FieldTransformation parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
FieldTransformation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static FieldTransformation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FieldTransformation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static FieldTransformation parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
FieldTransformation
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static FieldTransformation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FieldTransformation
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static FieldTransformation parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FieldTransformation
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FieldTransformation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FieldTransformation
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static FieldTransformation parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
FieldTransformation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static FieldTransformation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FieldTransformation
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<FieldTransformation> parser()
Returns
Type Description
Parser<FieldTransformation>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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
Type Description
RecordCondition

The condition.

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
Type Description
RecordConditionOrBuilder

getDefaultInstanceForType()

public FieldTransformation getDefaultInstanceForType()
Returns
Type Description
FieldTransformation

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
Name Description
index int
Returns
Type Description
FieldId

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
Type Description
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
Type Description
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
Name Description
index int
Returns
Type Description
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
Type Description
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
Type Description
InfoTypeTransformations

The infoTypeTransformations.

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
Type Description
InfoTypeTransformationsOrBuilder

getParserForType()

public Parser<FieldTransformation> getParserForType()
Returns
Type Description
Parser<FieldTransformation>
Overrides

getPrimitiveTransformation()

public PrimitiveTransformation getPrimitiveTransformation()

Apply the transformation to the entire field.

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

Returns
Type Description
PrimitiveTransformation

The primitiveTransformation.

getPrimitiveTransformationOrBuilder()

public PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder()

Apply the transformation to the entire field.

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

Returns
Type Description
PrimitiveTransformationOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTransformationCase()

public FieldTransformation.TransformationCase getTransformationCase()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the primitiveTransformation field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public FieldTransformation.Builder newBuilderForType()
Returns
Type Description
FieldTransformation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected FieldTransformation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
FieldTransformation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public FieldTransformation.Builder toBuilder()
Returns
Type Description
FieldTransformation.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException