# Interface QueryDataResponseOrBuilder (0.21.0)

0.21.0 (latest) 0.19.0 0.16.0 0.15.0 0.13.0 0.11.0 0.10.0 0.9.0 0.8.0 0.6.0 0.4.0 0.3.0 0.2.0 0.1.0

    public interface QueryDataResponseOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getDisambiguationQuestion(int index)

    public abstract String getDisambiguationQuestion(int index)

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.

`repeated string disambiguation_question = 5;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The disambiguationQuestion at the given index. |

### getDisambiguationQuestionBytes(int index)

    public abstract ByteString getDisambiguationQuestionBytes(int index)

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.

`repeated string disambiguation_question = 5;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the disambiguationQuestion at the given index. |

### getDisambiguationQuestionCount()

    public abstract int getDisambiguationQuestionCount()

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.

`repeated string disambiguation_question = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of disambiguationQuestion. |

### getDisambiguationQuestionList()

    public abstract List<String> getDisambiguationQuestionList()

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.

`repeated string disambiguation_question = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the disambiguationQuestion. |

### getGeneratedQuery()

    public abstract String getGeneratedQuery()

Generated query for the given user prompt.

`string generated_query = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The generatedQuery. |

### getGeneratedQueryBytes()

    public abstract ByteString getGeneratedQueryBytes()

Generated query for the given user prompt.

`string generated_query = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for generatedQuery. |

### getIntentExplanation()

    public abstract String getIntentExplanation()

A natural language explanation of the generated query.
Populated if options.generate_explanation was true in the request.

`string intent_explanation = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The intentExplanation. |

### getIntentExplanationBytes()

    public abstract ByteString getIntentExplanationBytes()

A natural language explanation of the generated query.
Populated if options.generate_explanation was true in the request.

`string intent_explanation = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for intentExplanation. |

### getNaturalLanguageAnswer()

    public abstract String 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.

`string natural_language_answer = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The naturalLanguageAnswer. |

### getNaturalLanguageAnswerBytes()

    public abstract ByteString getNaturalLanguageAnswerBytes()

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.

`string natural_language_answer = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for naturalLanguageAnswer. |

### getQueryResult()

    public abstract ExecutedQueryResult 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.

`.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult query_result = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult` | The queryResult. |

### getQueryResultOrBuilder()

    public abstract ExecutedQueryResultOrBuilder getQueryResultOrBuilder()

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.

`.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult query_result = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResultOrBuilder` |   |

### hasQueryResult()

    public abstract boolean hasQueryResult()

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.

`.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult query_result = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the queryResult field is set. |