Reference documentation and code samples for the Data Loss Prevention V2 Client class Container.
Represents a container that may contain DLP findings.
Examples of a container include a file, table, or database record.
Generated from protobuf messagegoogle.privacy.dlp.v2.Container
Namespace
Google \ Cloud \ Dlp \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ type
string
Container type, for example BigQuery or Cloud Storage.
↳ project_id
string
Project where the finding was found. Can be different from the project that owns the finding.
↳ full_path
string
A string representation of the full container name. Examples: - BigQuery: 'Project:DataSetId.TableId' - Cloud Storage: 'gs://Bucket/folders/filename.txt'
↳ root_path
string
The root of the container. Examples: - For BigQuery tableproject_id:dataset_id.table_id, the root isdataset_id- For Cloud Storage filegs://bucket/folder/filename.txt, the root isgs://bucket
↳ relative_path
string
The rest of the path after the root. Examples: - For BigQuery tableproject_id:dataset_id.table_id, the relative path istable_id- For Cloud Storage filegs://bucket/folder/filename.txt, the relative path isfolder/filename.txt
Findings 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.
↳ version
string
Findings container version, if available ("generation" for Cloud Storage).
getType
Container type, for example BigQuery or Cloud Storage.
Returns
Type
Description
string
setType
Container type, for example BigQuery or Cloud Storage.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getProjectId
Project where the finding was found.
Can be different from the project that owns the finding.
Returns
Type
Description
string
setProjectId
Project where the finding was found.
Can be different from the project that owns the finding.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getFullPath
A string representation of the full container name.
Examples:
BigQuery: 'Project:DataSetId.TableId'
Cloud Storage: 'gs://Bucket/folders/filename.txt'
Returns
Type
Description
string
setFullPath
A string representation of the full container name.
Examples:
BigQuery: 'Project:DataSetId.TableId'
Cloud Storage: 'gs://Bucket/folders/filename.txt'
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getRootPath
The root of the container.
Examples:
For BigQuery tableproject_id:dataset_id.table_id, the root isdataset_id
For Cloud Storage filegs://bucket/folder/filename.txt, the root
isgs://bucket
Returns
Type
Description
string
setRootPath
The root of the container.
Examples:
For BigQuery tableproject_id:dataset_id.table_id, the root isdataset_id
For Cloud Storage filegs://bucket/folder/filename.txt, the root
isgs://bucket
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getRelativePath
The rest of the path after the root.
Examples:
For BigQuery tableproject_id:dataset_id.table_id, the relative path istable_id
For Cloud Storage filegs://bucket/folder/filename.txt, the relative
path isfolder/filename.txt
Returns
Type
Description
string
setRelativePath
The rest of the path after the root.
Examples:
For BigQuery tableproject_id:dataset_id.table_id, the relative path istable_id
For Cloud Storage filegs://bucket/folder/filename.txt, the relative
path isfolder/filename.txt
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getUpdateTime
Findings 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.
Findings 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-09 UTC."],[],[],null,["# Data Loss Prevention V2 Client - Class Container (2.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.1 (latest)](/php/docs/reference/cloud-dlp/latest/V2.Container)\n- [2.6.0](/php/docs/reference/cloud-dlp/2.6.0/V2.Container)\n- [2.4.1](/php/docs/reference/cloud-dlp/2.4.1/V2.Container)\n- [2.3.0](/php/docs/reference/cloud-dlp/2.3.0/V2.Container)\n- [2.2.3](/php/docs/reference/cloud-dlp/2.2.3/V2.Container)\n- [2.1.0](/php/docs/reference/cloud-dlp/2.1.0/V2.Container)\n- [2.0.0](/php/docs/reference/cloud-dlp/2.0.0/V2.Container)\n- [1.19.0](/php/docs/reference/cloud-dlp/1.19.0/V2.Container)\n- [1.18.0](/php/docs/reference/cloud-dlp/1.18.0/V2.Container)\n- [1.17.0](/php/docs/reference/cloud-dlp/1.17.0/V2.Container)\n- [1.16.0](/php/docs/reference/cloud-dlp/1.16.0/V2.Container)\n- [1.15.1](/php/docs/reference/cloud-dlp/1.15.1/V2.Container)\n- [1.14.0](/php/docs/reference/cloud-dlp/1.14.0/V2.Container)\n- [1.13.2](/php/docs/reference/cloud-dlp/1.13.2/V2.Container)\n- [1.12.0](/php/docs/reference/cloud-dlp/1.12.0/V2.Container)\n- [1.11.0](/php/docs/reference/cloud-dlp/1.11.0/V2.Container)\n- [1.10.2](/php/docs/reference/cloud-dlp/1.10.2/V2.Container)\n- [1.9.0](/php/docs/reference/cloud-dlp/1.9.0/V2.Container)\n- [1.8.6](/php/docs/reference/cloud-dlp/1.8.6/V2.Container) \nReference documentation and code samples for the Data Loss Prevention V2 Client class Container.\n\nRepresents a container that may contain DLP findings.\n\nExamples of a container include a file, table, or database record.\n\nGenerated from protobuf message `google.privacy.dlp.v2.Container`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dlp \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getType\n\nContainer type, for example BigQuery or Cloud Storage.\n\n### setType\n\nContainer type, for example BigQuery or Cloud Storage.\n\n### getProjectId\n\nProject where the finding was found.\n\nCan be different from the project that owns the finding.\n\n### setProjectId\n\nProject where the finding was found.\n\nCan be different from the project that owns the finding.\n\n### getFullPath\n\nA string representation of the full container name.\n\nExamples:\n\n- BigQuery: 'Project:DataSetId.TableId'\n- Cloud Storage: 'gs://Bucket/folders/filename.txt'\n\n### setFullPath\n\nA string representation of the full container name.\n\nExamples:\n\n- BigQuery: 'Project:DataSetId.TableId'\n- Cloud Storage: 'gs://Bucket/folders/filename.txt'\n\n### getRootPath\n\nThe root of the container.\n\nExamples:\n\n- For BigQuery table `project_id:dataset_id.table_id`, the root is `dataset_id`\n- For Cloud Storage file `gs://bucket/folder/filename.txt`, the root is `gs://bucket`\n\n### setRootPath\n\nThe root of the container.\n\nExamples:\n\n- For BigQuery table `project_id:dataset_id.table_id`, the root is `dataset_id`\n- For Cloud Storage file `gs://bucket/folder/filename.txt`, the root is `gs://bucket`\n\n### getRelativePath\n\nThe rest of the path after the root.\n\nExamples:\n\n- For BigQuery table `project_id:dataset_id.table_id`, the relative path is `table_id`\n- For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative path is `folder/filename.txt`\n\n### setRelativePath\n\nThe rest of the path after the root.\n\nExamples:\n\n- For BigQuery table `project_id:dataset_id.table_id`, the relative path is `table_id`\n- For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative path is `folder/filename.txt`\n\n### getUpdateTime\n\nFindings container modification timestamp, if applicable. For Cloud\nStorage, this field contains the last file modification timestamp. For a\nBigQuery table, this field contains the last_modified_time property. For\nDatastore, this field isn't populated.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nFindings container modification timestamp, if applicable. For Cloud\nStorage, this field contains the last file modification timestamp. For a\nBigQuery table, this field contains the last_modified_time property. For\nDatastore, this field isn't populated.\n\n### getVersion\n\nFindings container version, if available\n(\"generation\" for Cloud Storage).\n\n### setVersion\n\nFindings container version, if available\n(\"generation\" for Cloud Storage)."]]