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 \ V1betaMethods
__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 |
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 |
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 |
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 |
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 |
TokenUsage|null |
|
hasTokenUsage
clearTokenUsage
setTokenUsage
Overall token usage for the request.
| Parameter | |
|---|---|
| Name | Description |
var |
TokenUsage
|
| Returns | |
|---|---|
| Type | Description |
$this |
|