0.16.0 (latest) 0.15.0 0.14.1 0.11.1 0.10.0 0.9.0 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.1 0.2.0 0.1.1

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Gemini Data Analytics V1beta Client class QueryDataResponse.

Response containing the generated query and related information.

Generated from protobuf message `google.cloud.geminidataanalytics.v1beta.QueryDataResponse`

## Namespace

Google \\ Cloud \\ GeminiDataAnalytics \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ generated_query` | `string` Generated query for the given user prompt. |
| `↳ intent_explanation` | `string` A natural language explanation of the generated query. Populated if options.generate_explanation was true in the request. |
| `↳ query_result` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.ExecutedQueryResult` The result of executing the query. Populated if options.generate_query_result or options.generate_natural_language_answer was true in the request, and execution was successful or attempted. |
| `↳ natural_language_answer` | `string` A natural language answer to the query, based on the query_result. Populated if options.generate_natural_language_answer was true in the request and query execution was successful based in the response from executeSql API. |
| `↳ disambiguation_question` | `string[]` If ambiguity was detected in the natural language query and options.generate_disambiguation_question was true, this field contains a question to the user for clarification. The returned represents the service's best effort based on the ambiguous input. |
| `↳ pipeline_debug_info` | `Google\Protobuf\Struct` Detailed step-by-step pipeline execution information. Populated only if generation_options.generate_debug_info was true. Provided for debugging and transparency purposes only. The structure and content of this object is not guaranteed and may change at any time without notice. Do not write production code or business logic depending on the fields in this object. |
| `↳ token_usage` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.TokenUsage` Overall token usage for the request. |

### getGeneratedQuery

Generated query for the given user prompt.

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

### setGeneratedQuery

Generated query for the given user prompt.

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

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

### getIntentExplanation

A natural language explanation of the generated query.

Populated if options.generate_explanation was true in the request.

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

### setIntentExplanation

A natural language explanation of the generated query.

Populated if options.generate_explanation was true in the request.

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

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

### getQueryResult

The result of executing the query.

Populated if options.generate_query_result or
options.generate_natural_language_answer was true in the request, and
execution was successful or attempted.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.ExecutedQueryResult|null` |   |

### hasQueryResult

### clearQueryResult

### setQueryResult

The result of executing the query.

Populated if options.generate_query_result or
options.generate_natural_language_answer was true in the request, and
execution was successful or attempted.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.ExecutedQueryResult` |

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

### getNaturalLanguageAnswer

A natural language answer to the query, based on the query_result.

Populated if options.generate_natural_language_answer was true in the
request and query execution was successful based in the response from
executeSql API.

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

### setNaturalLanguageAnswer

A natural language answer to the query, based on the query_result.

Populated if options.generate_natural_language_answer was true in the
request and query execution was successful based in the response from
executeSql API.

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

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

### getDisambiguationQuestion

If ambiguity was detected in the natural language query and
options.generate_disambiguation_question was true, this field contains a
question to the user for clarification. The returned represents the
service's best effort based on the ambiguous input.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setDisambiguationQuestion

If ambiguity was detected in the natural language query and
options.generate_disambiguation_question was true, this field contains a
question to the user for clarification. The returned represents the
service's best effort based on the ambiguous input.

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

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

### getPipelineDebugInfo

Detailed step-by-step pipeline execution information.

Populated only if generation_options.generate_debug_info was true.
Provided for debugging and transparency purposes only.
The structure and content of this object is not guaranteed and may
change at any time without notice. Do not write production code or
business logic depending on the fields in this object.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Struct|null` |   |

### hasPipelineDebugInfo

### clearPipelineDebugInfo

### setPipelineDebugInfo

Detailed step-by-step pipeline execution information.

Populated only if generation_options.generate_debug_info was true.
Provided for debugging and transparency purposes only.
The structure and content of this object is not guaranteed and may
change at any time without notice. Do not write production code or
business logic depending on the fields in this object.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Struct` |

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

### getTokenUsage

Overall token usage for the request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.TokenUsage|null` |   |

### hasTokenUsage

### clearTokenUsage

### setTokenUsage

Overall token usage for the request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.TokenUsage` |

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