Reference documentation and code samples for the Data Loss Prevention V2 Client class FieldTransformation.
The transformation to apply to the field.
Generated from protobuf message google.privacy.dlp.v2.FieldTransformation
Namespace
Google \ Cloud \ Dlp \ V2Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ fields
array< Google\Cloud\Dlp\V2\FieldId
>
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".
↳ condition
Google\Cloud\Dlp\V2\RecordCondition
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.
↳ primitive_transformation
↳ info_type_transformations
Google\Cloud\Dlp\V2\InfoTypeTransformations
Treat the contents of the field as free text, and selectively transform content that matches an InfoType
.
getFields
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".
setFields
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".
$this
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.
hasCondition
clearCondition
setCondition
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.
$this
getPrimitiveTransformation
Apply the transformation to the entire field.
hasPrimitiveTransformation
setPrimitiveTransformation
Apply the transformation to the entire field.
$this
getInfoTypeTransformations
Treat the contents of the field as free text, and selectively
transform content that matches an InfoType
.
hasInfoTypeTransformations
setInfoTypeTransformations
Treat the contents of the field as free text, and selectively
transform content that matches an InfoType
.
$this
getTransformation
string