# Data Loss Prevention V2 Client - Class ContentLocation (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 ContentLocation.

Precise location of the finding within a document, record, image, or metadata
container.

Generated from protobuf message `google.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). |
| `↳ record_location` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.RecordLocation` Location within a row or record of a database table. |
| `↳ image_location` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ImageLocation` Location within an image's pixels. |
| `↳ document_location` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.DocumentLocation` Location data for document files. |
| `↳ metadata_location` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.MetadataLocation` Location within the metadata for inspected content. |
| `↳ conversation_location` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ConversationLocation` Location within a conversation. |
| `↳ batch_content_location` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.BatchContentLocation` Location within a batch of content. |
| `↳ container_timestamp` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` 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:

- 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).

| **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:

- 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).

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

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

### getRecordLocation

Location within a row or record of a database table.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.RecordLocation|null` |   |

### hasRecordLocation

### setRecordLocation

Location within a row or record of a database table.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.RecordLocation` |

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

### getImageLocation

Location within an image's pixels.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ImageLocation|null` |   |

### hasImageLocation

### setImageLocation

Location within an image's pixels.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ImageLocation` |

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

### getDocumentLocation

Location data for document files.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.DocumentLocation|null` |   |

### hasDocumentLocation

### setDocumentLocation

Location data for document files.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.DocumentLocation` |

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

### getMetadataLocation

Location within the metadata for inspected content.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.MetadataLocation|null` |   |

### hasMetadataLocation

### setMetadataLocation

Location within the metadata for inspected content.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.MetadataLocation` |

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

### getConversationLocation

Location within a conversation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ConversationLocation|null` |   |

### hasConversationLocation

### setConversationLocation

Location within a conversation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ConversationLocation` |

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

### getBatchContentLocation

Location within a batch of content.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.BatchContentLocation|null` |   |

### hasBatchContentLocation

### setBatchContentLocation

Location within a batch of content.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.BatchContentLocation` |

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

### getContainerTimestamp

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.

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

### hasContainerTimestamp

### clearContainerTimestamp

### setContainerTimestamp

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.

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

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

### getContainerVersion

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

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

### setContainerVersion

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

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

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

### getLocation

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