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 |
array
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. |
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\Internal\RepeatedField |
|
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 |
|