public sealed class RedactImageRequest : IMessage<RedactImageRequest>, IEquatable<RedactImageRequest>, IDeepCloneable<RedactImageRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class RedactImageRequest.
Request to search for potentially sensitive info in an image and redact it
by covering it with a colored rectangle.
Projects scope, no location specified (defaults to global):
projects/{project_id}
The following example parent string specifies a parent project with the
identifier example-project, and specifies the europe-west3 location
for processing data:
[[["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\u003eThe \u003ccode\u003eRedactImageRequest\u003c/code\u003e class is part of the Google Cloud Data Loss Prevention v2 API, designed to search for and redact potentially sensitive information within an image.\u003c/p\u003e\n"],["\u003cp\u003eThis class supports various image formats like PNG, JPEG, SVG, and BMP, and uses configurations to determine what content should be redacted.\u003c/p\u003e\n"],["\u003cp\u003eIt offers options to include findings with the redacted image and to set configurations for the inspection process.\u003c/p\u003e\n"],["\u003cp\u003eThe class also includes properties like \u003ccode\u003eParent\u003c/code\u003e to specify the project and location for processing and the \u003ccode\u003eImageRedactionConfigs\u003c/code\u003e which determine what to redact.\u003c/p\u003e\n"],["\u003cp\u003eMultiple versions of the \u003ccode\u003eRedactImageRequest\u003c/code\u003e API are available, with the latest being version 4.16.0 and historical versions back to 2.15.0 being accessible.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Data Loss Prevention v2 API - Class RedactImageRequest (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.RedactImageRequest)\n- [4.18.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.18.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.17.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.17.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.16.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.16.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.15.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.15.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.14.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.13.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.12.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.11.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.10.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.9.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.8.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.7.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.6.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.5.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.4.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.3.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.2.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.1.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.0.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.5.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.4.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.3.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.2.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [2.16.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/2.16.0/Google.Cloud.Dlp.V2.RedactImageRequest)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/2.15.0/Google.Cloud.Dlp.V2.RedactImageRequest) \n\n public sealed class RedactImageRequest : IMessage\u003cRedactImageRequest\u003e, IEquatable\u003cRedactImageRequest\u003e, IDeepCloneable\u003cRedactImageRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class RedactImageRequest.\n\nRequest to search for potentially sensitive info in an image and redact it\nby covering it with a colored rectangle. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e RedactImageRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RedactImageRequest](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.RedactImageRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RedactImageRequest](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.RedactImageRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RedactImageRequest](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.RedactImageRequest), [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### RedactImageRequest()\n\n public RedactImageRequest()\n\n### RedactImageRequest(RedactImageRequest)\n\n public RedactImageRequest(RedactImageRequest other)\n\nProperties\n----------\n\n### ByteItem\n\n public ByteContentItem ByteItem { get; set; }\n\nThe content must be PNG, JPEG, SVG or BMP.\n\n### ImageRedactionConfigs\n\n public RepeatedField\u003cRedactImageRequest.Types.ImageRedactionConfig\u003e ImageRedactionConfigs { get; }\n\nThe configuration for specifying what content to redact from images.\n\n### IncludeFindings\n\n public bool IncludeFindings { get; set; }\n\nWhether the response should include findings along with the redacted\nimage.\n\n### InspectConfig\n\n public InspectConfig InspectConfig { get; set; }\n\nConfiguration for the inspector.\n\n### LocationId\n\n public string LocationId { get; set; }\n\nDeprecated. This field has no effect.\n\n### Parent\n\n public string Parent { get; set; }\n\nParent resource name.\n\nThe format of this value varies depending on whether you have [specified a\nprocessing\nlocation](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):\n\n- Projects scope, location specified: `projects/{project_id}/locations/{location_id}`\n- Projects scope, no location specified (defaults to global): `projects/{project_id}`\n\nThe following example `parent` string specifies a parent project with the\nidentifier `example-project`, and specifies the `europe-west3` location\nfor processing data: \n\n parent=projects/example-project/locations/europe-west3\n\n### ParentAsLocationName\n\n public LocationName ParentAsLocationName { get; set; }\n\n[LocationName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.RedactImageRequest#Google_Cloud_Dlp_V2_RedactImageRequest_Parent) resource name property.\n\n### ParentAsProjectName\n\n public ProjectName ParentAsProjectName { get; set; }\n\n[ProjectName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.ProjectName.html)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.RedactImageRequest#Google_Cloud_Dlp_V2_RedactImageRequest_Parent) resource name property.\n\n### ParentAsResourceName\n\n public IResourceName ParentAsResourceName { get; set; }\n\n[IResourceName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.RedactImageRequest#Google_Cloud_Dlp_V2_RedactImageRequest_Parent) resource name property."]]