public sealed class InspectContentRequest : IMessage<InspectContentRequest>, IEquatable<InspectContentRequest>, IDeepCloneable<InspectContentRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class InspectContentRequest.
Request to search for potentially sensitive info in a ContentItem.
Template to use. Any configuration directly specified in
inspect_config will override those set in the template. Singular fields
that are set in this request will replace their corresponding fields in the
template. Repeated fields are appended. Singular sub-messages and groups
are recursively merged.
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\u003eThis page provides reference documentation for the \u003ccode\u003eInspectContentRequest\u003c/code\u003e class in the Google Cloud Data Loss Prevention v2 API, used to search for potentially sensitive information in a \u003ccode\u003eContentItem\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eInspectContentRequest\u003c/code\u003e class is 4.16.0, with documentation available for multiple prior versions, dating back to version 2.15.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eInspectContentRequest\u003c/code\u003e class has multiple properties including \u003ccode\u003eInspectConfig\u003c/code\u003e, \u003ccode\u003eInspectTemplateName\u003c/code\u003e, \u003ccode\u003eItem\u003c/code\u003e, \u003ccode\u003eLocationId\u003c/code\u003e, and \u003ccode\u003eParent\u003c/code\u003e, allowing configuration of the inspection process.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits members from the \u003ccode\u003eobject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eConstructors are available for creating a new \u003ccode\u003eInspectContentRequest\u003c/code\u003e instance, either as a default or by cloning another \u003ccode\u003eInspectContentRequest\u003c/code\u003e instance.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Data Loss Prevention v2 API - Class InspectContentRequest (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.InspectContentRequest)\n- [4.18.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.18.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.17.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.17.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.16.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.16.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.15.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.15.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.14.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.13.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.12.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.11.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.10.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.9.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.8.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.7.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.6.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.5.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.4.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.3.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.2.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.1.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/4.0.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.5.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.4.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.3.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/3.2.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [2.16.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/2.16.0/Google.Cloud.Dlp.V2.InspectContentRequest)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.Dlp.V2/2.15.0/Google.Cloud.Dlp.V2.InspectContentRequest) \n\n public sealed class InspectContentRequest : IMessage\u003cInspectContentRequest\u003e, IEquatable\u003cInspectContentRequest\u003e, IDeepCloneable\u003cInspectContentRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Data Loss Prevention v2 API class InspectContentRequest.\n\nRequest to search for potentially sensitive info in a ContentItem. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e InspectContentRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[InspectContentRequest](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.InspectContentRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[InspectContentRequest](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.InspectContentRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[InspectContentRequest](/dotnet/docs/reference/Google.Cloud.Dlp.V2/latest/Google.Cloud.Dlp.V2.InspectContentRequest), [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### InspectContentRequest()\n\n public InspectContentRequest()\n\n### InspectContentRequest(InspectContentRequest)\n\n public InspectContentRequest(InspectContentRequest other)\n\nProperties\n----------\n\n### InspectConfig\n\n public InspectConfig InspectConfig { get; set; }\n\nConfiguration for the inspector. What specified here will override\nthe template referenced by the inspect_template_name argument.\n\n### InspectTemplateName\n\n public string InspectTemplateName { get; set; }\n\nTemplate to use. Any configuration directly specified in\ninspect_config will override those set in the template. Singular fields\nthat are set in this request will replace their corresponding fields in the\ntemplate. Repeated fields are appended. Singular sub-messages and groups\nare recursively merged.\n\n### Item\n\n public ContentItem Item { get; set; }\n\nThe item to inspect.\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.InspectContentRequest#Google_Cloud_Dlp_V2_InspectContentRequest_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.InspectContentRequest#Google_Cloud_Dlp_V2_InspectContentRequest_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.InspectContentRequest#Google_Cloud_Dlp_V2_InspectContentRequest_Parent) resource name property."]]