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

Type of content to inspect.

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

## Namespace

Google \\ Cloud \\ Dlp \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ value` | `string` String data to inspect or redact. |
| `↳ table` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Table` Structured content for inspection. See <https://cloud.google.com/sensitive-data-protection/docs/inspecting-text#inspecting_a_table> to learn more. |
| `↳ byte_item` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ByteContentItem` Content data to inspect or redact. Replaces `type` and `data`. |
| `↳ conversation` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.Conversation` Represents a conversation (either complete or a slice). It is assumed that all included messages are contiguous and ordered in chronological order. |
| `↳ batch_content_item` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.BatchContentItem` Represents a batch of items to inspect. |
| `↳ content_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.ContentMetadata` User provided metadata for the content. |

### getValue

String data to inspect or redact.

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

### hasValue

### setValue

String data to inspect or redact.

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

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

### getTable

Structured content for inspection. See
<https://cloud.google.com/sensitive-data-protection/docs/inspecting-text#inspecting_a_table>
to learn more.

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

### hasTable

### setTable

Structured content for inspection. See
<https://cloud.google.com/sensitive-data-protection/docs/inspecting-text#inspecting_a_table>
to learn more.

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

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

### getByteItem

Content data to inspect or redact. Replaces `type` and `data`.

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

### hasByteItem

### setByteItem

Content data to inspect or redact. Replaces `type` and `data`.

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

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

### getConversation

Represents a conversation (either complete or a slice).

It is assumed that all included messages are contiguous and ordered in
chronological order.

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

### hasConversation

### setConversation

Represents a conversation (either complete or a slice).

It is assumed that all included messages are contiguous and ordered in
chronological order.

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

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

### getBatchContentItem

Represents a batch of items to inspect.

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

### hasBatchContentItem

### setBatchContentItem

Represents a batch of items to inspect.

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

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

### getContentMetadata

User provided metadata for the content.

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

### hasContentMetadata

### clearContentMetadata

### setContentMetadata

User provided metadata for the content.

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

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

### getDataItem

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