Reference documentation and code samples for the Data Loss Prevention V2 Client class ContentLocation.
Precise location of the finding within a document, record, image, or metadata
container.
Generated from protobuf messagegoogle.privacy.dlp.v2.ContentLocation
Namespace
Google \ Cloud \ Dlp \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ container_name
string
Name of the container where the finding is located. The top level name is the source file name or table name. Names of some common storage containers are formatted as follows: * * BigQuery tables:{project_id}:{dataset_id}.{table_id}* * Cloud Storage files:gs://{bucket}/{path}* * Datastore namespace: {namespace} Nested names could be absent if the embedded object has no string identifier (for example, an image contained within a document).
Finding container modification timestamp, if applicable. For Cloud Storage, this field contains the last file modification timestamp. For a BigQuery table, this field contains the last_modified_time property. For Datastore, this field isn't populated.
↳ container_version
string
Finding container version, if available ("generation" for Cloud Storage).
getContainerName
Name of the container where the finding is located.
The top level name is the source file name or table name. Names of some
common storage containers are formatted as follows:
Datastore namespace: {namespace}
Nested names could be absent if the embedded object has no string
identifier (for example, an image contained within a document).
Returns
Type
Description
string
setContainerName
Name of the container where the finding is located.
The top level name is the source file name or table name. Names of some
common storage containers are formatted as follows:
Datastore namespace: {namespace}
Nested names could be absent if the embedded object has no string
identifier (for example, an image contained within a document).
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getRecordLocation
Location within a row or record of a database table.
Finding container modification timestamp, if applicable. For Cloud Storage,
this field contains the last file modification timestamp. For a BigQuery
table, this field contains the last_modified_time property. For Datastore,
this field isn't populated.
Finding container modification timestamp, if applicable. For Cloud Storage,
this field contains the last file modification timestamp. For a BigQuery
table, this field contains the last_modified_time property. For Datastore,
this field isn't populated.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Data Loss Prevention V2 Client - Class ContentLocation (2.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.1 (latest)](/php/docs/reference/cloud-dlp/latest/V2.ContentLocation)\n- [2.6.0](/php/docs/reference/cloud-dlp/2.6.0/V2.ContentLocation)\n- [2.4.1](/php/docs/reference/cloud-dlp/2.4.1/V2.ContentLocation)\n- [2.3.0](/php/docs/reference/cloud-dlp/2.3.0/V2.ContentLocation)\n- [2.2.3](/php/docs/reference/cloud-dlp/2.2.3/V2.ContentLocation)\n- [2.1.0](/php/docs/reference/cloud-dlp/2.1.0/V2.ContentLocation)\n- [2.0.0](/php/docs/reference/cloud-dlp/2.0.0/V2.ContentLocation)\n- [1.19.0](/php/docs/reference/cloud-dlp/1.19.0/V2.ContentLocation)\n- [1.18.0](/php/docs/reference/cloud-dlp/1.18.0/V2.ContentLocation)\n- [1.17.0](/php/docs/reference/cloud-dlp/1.17.0/V2.ContentLocation)\n- [1.16.0](/php/docs/reference/cloud-dlp/1.16.0/V2.ContentLocation)\n- [1.15.1](/php/docs/reference/cloud-dlp/1.15.1/V2.ContentLocation)\n- [1.14.0](/php/docs/reference/cloud-dlp/1.14.0/V2.ContentLocation)\n- [1.13.2](/php/docs/reference/cloud-dlp/1.13.2/V2.ContentLocation)\n- [1.12.0](/php/docs/reference/cloud-dlp/1.12.0/V2.ContentLocation)\n- [1.11.0](/php/docs/reference/cloud-dlp/1.11.0/V2.ContentLocation)\n- [1.10.2](/php/docs/reference/cloud-dlp/1.10.2/V2.ContentLocation)\n- [1.9.0](/php/docs/reference/cloud-dlp/1.9.0/V2.ContentLocation)\n- [1.8.6](/php/docs/reference/cloud-dlp/1.8.6/V2.ContentLocation) \nReference documentation and code samples for the Data Loss Prevention V2 Client class ContentLocation.\n\nPrecise location of the finding within a document, record, image, or metadata\ncontainer.\n\nGenerated from protobuf message `google.privacy.dlp.v2.ContentLocation`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dlp \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getContainerName\n\nName of the container where the finding is located.\n\nThe top level name is the source file name or table name. Names of some\ncommon storage containers are formatted as follows:\n\n- BigQuery tables: `{project_id}:{dataset_id}.{table_id}`\n- Cloud Storage files: `gs://{bucket}/{path}`\n- Datastore namespace: {namespace} Nested names could be absent if the embedded object has no string identifier (for example, an image contained within a document).\n\n### setContainerName\n\nName of the container where the finding is located.\n\nThe top level name is the source file name or table name. Names of some\ncommon storage containers are formatted as follows:\n\n- BigQuery tables: `{project_id}:{dataset_id}.{table_id}`\n- Cloud Storage files: `gs://{bucket}/{path}`\n- Datastore namespace: {namespace} Nested names could be absent if the embedded object has no string identifier (for example, an image contained within a document).\n\n### getRecordLocation\n\nLocation within a row or record of a database table.\n\n### hasRecordLocation\n\n### setRecordLocation\n\nLocation within a row or record of a database table.\n\n### getImageLocation\n\nLocation within an image's pixels.\n\n### hasImageLocation\n\n### setImageLocation\n\nLocation within an image's pixels.\n\n### getDocumentLocation\n\nLocation data for document files.\n\n### hasDocumentLocation\n\n### setDocumentLocation\n\nLocation data for document files.\n\n### getMetadataLocation\n\nLocation within the metadata for inspected content.\n\n### hasMetadataLocation\n\n### setMetadataLocation\n\nLocation within the metadata for inspected content.\n\n### getContainerTimestamp\n\nFinding container modification timestamp, if applicable. For Cloud Storage,\nthis field contains the last file modification timestamp. For a BigQuery\ntable, this field contains the last_modified_time property. For Datastore,\nthis field isn't populated.\n\n### hasContainerTimestamp\n\n### clearContainerTimestamp\n\n### setContainerTimestamp\n\nFinding container modification timestamp, if applicable. For Cloud Storage,\nthis field contains the last file modification timestamp. For a BigQuery\ntable, this field contains the last_modified_time property. For Datastore,\nthis field isn't populated.\n\n### getContainerVersion\n\nFinding container version, if available\n(\"generation\" for Cloud Storage).\n\n### setContainerVersion\n\nFinding container version, if available\n(\"generation\" for Cloud Storage).\n\n### getLocation"]]