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

Represents the parameters of the conversational query.

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

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ time_zone` | `string` The time zone of this conversational query from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. If not provided, the time zone specified in agent settings is used. |
| `↳ geo_location` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.LatLng.html` The geo location of this conversational query. |
| `↳ contexts` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Context>` The collection of contexts to be activated before this query is executed. |
| `↳ reset_contexts` | `bool` Specifies whether to delete all contexts in the current session before the new ones are activated. |
| `↳ session_entity_types` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SessionEntityType>` Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session of this query. |
| `↳ payload` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` This field can be used to pass custom data to your webhook. Arbitrary JSON objects are supported. If supplied, the value is used to populate the `WebhookRequest.original_detect_intent_request.payload` field sent to your webhook. |
| `↳ sentiment_analysis_request_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SentimentAnalysisRequestConfig` Configures the type of sentiment analysis to perform. If not provided, sentiment analysis is not performed. |
| `↳ webhook_headers` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` This field can be used to pass HTTP headers for a webhook call. These headers will be sent to webhook along with the headers that have been configured through the Dialogflow web console. The headers defined within this field will overwrite the headers configured through the Dialogflow console if there is a conflict. Header names are case-insensitive. Google's specified headers are not allowed. Including: "Host", "Content-Length", "Connection", "From", "User-Agent", "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For", etc. |
| `↳ platform` | `string` The platform of the virtual agent response messages. If not empty, only emits messages from this platform in the response. Valid values are the enum names of [platform](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Intent.Message#_Google_Cloud_Dialogflow_V2_Intent_Message__getPlatform__). |

### getTimeZone

The time zone of this conversational query from the
[time zone database](https://www.iana.org/time-zones), e.g.,
America/New_York, Europe/Paris. If not provided, the time zone specified in
agent settings is used.

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

### setTimeZone

The time zone of this conversational query from the
[time zone database](https://www.iana.org/time-zones), e.g.,
America/New_York, Europe/Paris. If not provided, the time zone specified in
agent settings is used.

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

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

### getGeoLocation

The geo location of this conversational query.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.LatLng.html|null` |   |

### hasGeoLocation

### clearGeoLocation

### setGeoLocation

The geo location of this conversational query.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.LatLng.html` |

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

### getContexts

The collection of contexts to be activated before this query is
executed.

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

### setContexts

The collection of contexts to be activated before this query is
executed.

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

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

### getResetContexts

Specifies whether to delete all contexts in the current session
before the new ones are activated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setResetContexts

Specifies whether to delete all contexts in the current session
before the new ones are activated.

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

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

### getSessionEntityTypes

Additional session entity types to replace or extend developer
entity types with. The entity synonyms apply to all languages and persist
for the session of this query.

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

### setSessionEntityTypes

Additional session entity types to replace or extend developer
entity types with. The entity synonyms apply to all languages and persist
for the session of this query.

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

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

### getPayload

This field can be used to pass custom data to your webhook.

Arbitrary JSON objects are supported.
If supplied, the value is used to populate the
`WebhookRequest.original_detect_intent_request.payload`
field sent to your webhook.

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

### hasPayload

### clearPayload

### setPayload

This field can be used to pass custom data to your webhook.

Arbitrary JSON objects are supported.
If supplied, the value is used to populate the
`WebhookRequest.original_detect_intent_request.payload`
field sent to your webhook.

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

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

### getSentimentAnalysisRequestConfig

Configures the type of sentiment analysis to perform. If not
provided, sentiment analysis is not performed.

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

### hasSentimentAnalysisRequestConfig

### clearSentimentAnalysisRequestConfig

### setSentimentAnalysisRequestConfig

Configures the type of sentiment analysis to perform. If not
provided, sentiment analysis is not performed.

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

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

### getWebhookHeaders

This field can be used to pass HTTP headers for a webhook
call. These headers will be sent to webhook along with the headers that
have been configured through the Dialogflow web console. The headers
defined within this field will overwrite the headers configured through the
Dialogflow console if there is a conflict. Header names are
case-insensitive. Google's specified headers are not allowed. Including:
"Host", "Content-Length", "Connection", "From", "User-Agent",
"Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For",
etc.

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

### setWebhookHeaders

This field can be used to pass HTTP headers for a webhook
call. These headers will be sent to webhook along with the headers that
have been configured through the Dialogflow web console. The headers
defined within this field will overwrite the headers configured through the
Dialogflow console if there is a conflict. Header names are
case-insensitive. Google's specified headers are not allowed. Including:
"Host", "Content-Length", "Connection", "From", "User-Agent",
"Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded-For",
etc.

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

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

### getPlatform

The platform of the virtual agent response messages.

If not empty, only emits messages from this platform in the response.
Valid values are the enum names of
[platform](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Intent.Message#_Google_Cloud_Dialogflow_V2_Intent_Message__getPlatform__).

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

### setPlatform

The platform of the virtual agent response messages.

If not empty, only emits messages from this platform in the response.
Valid values are the enum names of
[platform](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Intent.Message#_Google_Cloud_Dialogflow_V2_Intent_Message__getPlatform__).

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

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