public sealed class FieldTransformation : IMessage<FieldTransformation>, IEquatable<FieldTransformation>, IDeepCloneable<FieldTransformation>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class FieldTransformation.
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.
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".
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis webpage provides reference documentation for the \u003ccode\u003eFieldTransformation\u003c/code\u003e class within the Google Cloud Data Loss Prevention v2 API, specifically for .NET development.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eFieldTransformation\u003c/code\u003e class is used to define transformations applied to data fields, offering functionalities like conditional transformations, handling different data types, and selecting specific fields.\u003c/p\u003e\n"],["\u003cp\u003eMultiple versions of the \u003ccode\u003eFieldTransformation\u003c/code\u003e class are available, ranging from version 2.15.0 up to the latest version 4.16.0, which is the default view.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements various interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and includes properties for defining conditions, target fields, and types of transformations like \u003ccode\u003eInfoTypeTransformations\u003c/code\u003e and \u003ccode\u003ePrimitiveTransformation\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation outlines the constructors, properties, and inheritance structure of the \u003ccode\u003eFieldTransformation\u003c/code\u003e class, along with examples of its use in applying different transformations based on conditions or data type.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Data Loss Prevention v2 API - Class FieldTransformation (4.19.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.19.0 (latest)](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.18.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.18.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.17.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.17.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.16.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.16.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.15.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.15.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.14.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.13.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.12.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.11.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.10.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.9.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.8.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.7.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.6.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.5.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.4.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.3.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.2.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.1.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.0.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.5.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.4.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.3.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.2.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [2.16.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/2.16.0/Google.Cloud.Dlp.V2.FieldTransformation)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/2.15.0/Google.Cloud.Dlp.V2.FieldTransformation) \n\n public sealed class FieldTransformation : IMessage\u003cFieldTransformation\u003e, IEquatable\u003cFieldTransformation\u003e, IDeepCloneable\u003cFieldTransformation\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class FieldTransformation.\n\nThe transformation to apply to the field. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e FieldTransformation \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[FieldTransformation](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.FieldTransformation), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[FieldTransformation](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.FieldTransformation), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[FieldTransformation](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.FieldTransformation), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Dlp.V2](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Dlp.V2.dll\n\nConstructors\n------------\n\n### FieldTransformation()\n\n public FieldTransformation()\n\n### FieldTransformation(FieldTransformation)\n\n public FieldTransformation(FieldTransformation other)\n\nProperties\n----------\n\n### Condition\n\n public RecordCondition Condition { get; set; }\n\nOnly apply the transformation if the condition evaluates to true for the\ngiven `RecordCondition`. The conditions are allowed to reference fields\nthat are not used in the actual transformation.\n\nExample Use Cases:\n\n- Apply a different bucket transformation to an age column if the zip code column for the same record is within a specific range.\n- Redact a field if the date of birth field is greater than 85.\n\n### Fields\n\n public RepeatedField\u003cFieldId\u003e Fields { get; }\n\nRequired. Input field(s) to apply the transformation to.\nWhen you have columns that reference their position within a list,\nomit the index from the FieldId. FieldId name matching ignores the index.\nFor example, instead of \"contact.nums\\[0\\].type\", use \"contact.nums.type\".\n\n### InfoTypeTransformations\n\n public InfoTypeTransformations InfoTypeTransformations { get; set; }\n\nTreat the contents of the field as free text, and selectively\ntransform content that matches an `InfoType`.\n\n### PrimitiveTransformation\n\n public PrimitiveTransformation PrimitiveTransformation { get; set; }\n\nApply the transformation to the entire field.\n\n### TransformationCase\n\n public FieldTransformation.TransformationOneofCase TransformationCase { get; }"]]