Class FieldTransformation (3.36.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
TypeDescription
int

FIELDS_FIELD_NUMBER

public static final int FIELDS_FIELD_NUMBER
Field Value
TypeDescription
int

INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER

public static final int INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

PRIMITIVE_TRANSFORMATION_FIELD_NUMBER

public static final int PRIMITIVE_TRANSFORMATION_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static FieldTransformation getDefaultInstance()
Returns
TypeDescription
FieldTransformation

getDescriptor()

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

newBuilder()

public static FieldTransformation.Builder newBuilder()
Returns
TypeDescription
FieldTransformation.Builder

newBuilder(FieldTransformation prototype)

public static FieldTransformation.Builder newBuilder(FieldTransformation prototype)
Parameter
NameDescription
prototypeFieldTransformation
Returns
TypeDescription
FieldTransformation.Builder

parseDelimitedFrom(InputStream input)

public static FieldTransformation parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
FieldTransformation
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FieldTransformation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FieldTransformation
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static FieldTransformation parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
FieldTransformation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static FieldTransformation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FieldTransformation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static FieldTransformation parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
FieldTransformation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static FieldTransformation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FieldTransformation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static FieldTransformation parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
FieldTransformation
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static FieldTransformation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FieldTransformation
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static FieldTransformation parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
FieldTransformation
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FieldTransformation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FieldTransformation
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static FieldTransformation parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
FieldTransformation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static FieldTransformation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FieldTransformation
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<FieldTransformation> parser()
Returns
TypeDescription
Parser<FieldTransformation>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
RecordConditionOrBuilder

getDefaultInstanceForType()

public FieldTransformation getDefaultInstanceForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
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.

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

getParserForType()

public Parser<FieldTransformation> getParserForType()
Returns
TypeDescription
Parser<FieldTransformation>
Overrides

getPrimitiveTransformation()

public PrimitiveTransformation getPrimitiveTransformation()

Apply the transformation to the entire field.

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

Returns
TypeDescription
PrimitiveTransformation

The primitiveTransformation.

getPrimitiveTransformationOrBuilder()

public PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder()

Apply the transformation to the entire field.

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

Returns
TypeDescription
PrimitiveTransformationOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected FieldTransformation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
FieldTransformation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException