# Google Cloud Dialogflow V2 Client - Class ContextContent (2.4.0)

2.4.0 (latest) 2.3.1 2.2.1 2.1.2 2.0.1 1.17.2 1.16.0 1.15.1 1.14.0 1.13.0 1.12.3 1.11.0 1.10.2 1.9.0 1.8.0 1.7.2 1.6.0 1.5.0 1.4.0 1.3.2 1.2.0 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class ContextContent.

Contents ingested.

Generated from protobuf message `google.cloud.dialogflow.v2.Conversation.ContextReference.ContextContent`

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2 \\ Conversation \\ ContextReference

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ content` | `string` Required. The information ingested in a single request. |
| `↳ content_format` | `int` Required. The format of the ingested string. |
| `↳ ingestion_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when this information was incorporated into the relevant context reference. |
| `↳ answer_record` | `string` If the context content was generated from a tool call, specify the answer record associated with the tool call. Format: `projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>`. |

### getContent

Required. The information ingested in a single request.

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

### setContent

Required. The information ingested in a single request.

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

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

### getContentFormat

Required. The format of the ingested string.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ContentFormat](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Conversation.ContextReference.ContextContent.ContentFormat). |

### setContentFormat

Required. The format of the ingested string.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ContentFormat](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Conversation.ContextReference.ContextContent.ContentFormat). |

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

### getIngestionTime

Output only. The time when this information was incorporated into the
relevant context reference.

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

### hasIngestionTime

### clearIngestionTime

### setIngestionTime

Output only. The time when this information was incorporated into the
relevant context reference.

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

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

### getAnswerRecord

If the context content was generated from a tool call, specify the
answer record associated with the tool call.

Format: `projects/<Project ID>/locations/<Location
ID>/answerRecords/<Answer Record ID>`.

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

### setAnswerRecord

If the context content was generated from a tool call, specify the
answer record associated with the tool call.

Format: `projects/<Project ID>/locations/<Location
ID>/answerRecords/<Answer Record ID>`.

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

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