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

Specifies the location of the finding.

Generated from protobuf message `google.privacy.dlp.v2.Location`

## Namespace

Google \\ Cloud \\ Dlp \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ byte_range` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Range` Zero-based byte offsets delimiting the finding. These are relative to the finding's containing element. Note that when the content is not textual, this references the UTF-8 encoded textual representation of the content. Omitted if content is an image. |
| `↳ codepoint_range` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Range` Unicode character offsets delimiting the finding. These are relative to the finding's containing element. Provided when the content is text. |
| `↳ content_locations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ContentLocation>` List of nested objects pointing to the precise location of the finding within the file or record. |
| `↳ container` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Container` Information about the container where this finding occurred, if available. |

### getByteRange

Zero-based byte offsets delimiting the finding.

These are relative to the finding's containing element.
Note that when the content is not textual, this references
the UTF-8 encoded textual representation of the content.
Omitted if content is an image.

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

### hasByteRange

### clearByteRange

### setByteRange

Zero-based byte offsets delimiting the finding.

These are relative to the finding's containing element.
Note that when the content is not textual, this references
the UTF-8 encoded textual representation of the content.
Omitted if content is an image.

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

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

### getCodepointRange

Unicode character offsets delimiting the finding.

These are relative to the finding's containing element.
Provided when the content is text.

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

### hasCodepointRange

### clearCodepointRange

### setCodepointRange

Unicode character offsets delimiting the finding.

These are relative to the finding's containing element.
Provided when the content is text.

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

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

### getContentLocations

List of nested objects pointing to the precise location of the finding
within the file or record.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ContentLocation>` |   |

### setContentLocations

List of nested objects pointing to the precise location of the finding
within the file or record.

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

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

### getContainer

Information about the container where this finding occurred, if available.

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

### hasContainer

### clearContainer

### setContainer

Information about the container where this finding occurred, if available.

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

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