# Google Cloud Dialogflow V2 Client - Class OriginalDetectIntentRequest (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 OriginalDetectIntentRequest.

Represents the contents of the original request that was passed to
the `[Streaming]DetectIntent` call.

Generated from protobuf message `google.cloud.dialogflow.v2.OriginalDetectIntentRequest`

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ source` | `string` The source of this request, e.g., `google`, `facebook`, `slack`. It is set by Dialogflow-owned servers. |
| `↳ version` | `string` Optional. The version of the protocol used for this request. This field is AoG-specific. |
| `↳ payload` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` Optional. This field is set to the value of the `QueryParameters.payload` field passed in the request. Some integrations that query a Dialogflow agent may provide additional information in the payload. In particular, for the Dialogflow Phone Gateway integration, this field has the form: ``` { "telephony": { "caller_id": "+18558363987" } } ``` Note: The caller ID field (`caller_id`) will be redacted for Trial Edition agents and populated with the caller ID in [E.164 format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents. <br /> |

### getSource

The source of this request, e.g., `google`, `facebook`, `slack`. It is set
by Dialogflow-owned servers.

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

### setSource

The source of this request, e.g., `google`, `facebook`, `slack`. It is set
by Dialogflow-owned servers.

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

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

### getVersion

Optional. The version of the protocol used for this request.

This field is AoG-specific.

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

### setVersion

Optional. The version of the protocol used for this request.

This field is AoG-specific.

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

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

### getPayload

Optional. This field is set to the value of the `QueryParameters.payload`
field passed in the request. Some integrations that query a Dialogflow
agent may provide additional information in the payload.

In particular, for the Dialogflow Phone Gateway integration, this field has
the form:

```
{
 "telephony": {
   "caller_id": "+18558363987"
 }
}
```

Note: The caller ID field (`caller_id`) will be redacted for Trial
Edition agents and populated with the caller ID in [E.164
format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents.

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

### hasPayload

### clearPayload

### setPayload

Optional. This field is set to the value of the `QueryParameters.payload`
field passed in the request. Some integrations that query a Dialogflow
agent may provide additional information in the payload.

In particular, for the Dialogflow Phone Gateway integration, this field has
the form:

```
{
 "telephony": {
   "caller_id": "+18558363987"
 }
}
```

Note: The caller ID field (`caller_id`) will be redacted for Trial
Edition agents and populated with the caller ID in [E.164
format](https://en.wikipedia.org/wiki/E.164) for Essentials Edition agents.

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

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