# Data Loss Prevention V2 Client - Class Container (2.13.0)

2.13.0 (latest) 2.12.0 2.11.0 2.10.0 2.9.2 2.8.1 2.7.0 2.6.1 2.4.1 2.3.0 2.2.3 2.1.0 2.0.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.1 1.14.0 1.13.2 1.12.0 1.11.0 1.10.2 1.9.0 1.8.6 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 message `google.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 table `project_id:dataset_id.table_id`, the root is `dataset_id` - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root is `gs://bucket` |
| `↳ relative_path` | `string` The rest of the path after the root. Examples: - For BigQuery table `project_id:dataset_id.table_id`, the relative path is `table_id` - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative path is `folder/filename.txt` |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` 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 table `project_id:dataset_id.table_id`, the root is `dataset_id`
- For Cloud Storage file `gs://bucket/folder/filename.txt`, the root is `gs://bucket`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setRootPath

The root of the container.

Examples:

- For BigQuery table `project_id:dataset_id.table_id`, the root is `dataset_id`
- For Cloud Storage file `gs://bucket/folder/filename.txt`, the root is `gs://bucket`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRelativePath

The rest of the path after the root.

Examples:

- For BigQuery table `project_id:dataset_id.table_id`, the relative path is `table_id`
- For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative path is `folder/filename.txt`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setRelativePath

The rest of the path after the root.

Examples:

- For BigQuery table `project_id:dataset_id.table_id`, the relative path is `table_id`
- For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative path is `folder/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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVersion

Findings container version, if available
("generation" for Cloud Storage).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setVersion

Findings container version, if available
("generation" for Cloud Storage).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |