# Interface ExampleQueryOrBuilder (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 ExampleQueryOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getNaturalLanguageQuestion()

    public abstract String getNaturalLanguageQuestion()

Optional. A natural language question that a user might ask.
For example: "How many orders were placed last month?"

`string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL];`

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

### getNaturalLanguageQuestionBytes()

    public abstract ByteString getNaturalLanguageQuestionBytes()

Optional. A natural language question that a user might ask.
For example: "How many orders were placed last month?"

`string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL];`

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

### getParameters(int index)

    public abstract QueryParameter getParameters(int index)

Optional. The list of query parameters.
Example: The parameterized SQL query
"SELECT \* FROM my_table WHERE id = @id" can be matched with any value of
id.

`
repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

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

### getParametersCount()

    public abstract int getParametersCount()

Optional. The list of query parameters.
Example: The parameterized SQL query
"SELECT \* FROM my_table WHERE id = @id" can be matched with any value of
id.

`
repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
`

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

### getParametersList()

    public abstract List<QueryParameter> getParametersList()

Optional. The list of query parameters.
Example: The parameterized SQL query
"SELECT \* FROM my_table WHERE id = @id" can be matched with any value of
id.

`
repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.QueryParameter>` |   |

### getParametersOrBuilder(int index)

    public abstract QueryParameterOrBuilder getParametersOrBuilder(int index)

Optional. The list of query parameters.
Example: The parameterized SQL query
"SELECT \* FROM my_table WHERE id = @id" can be matched with any value of
id.

`
repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

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

### getParametersOrBuilderList()

    public abstract List<? extends QueryParameterOrBuilder> getParametersOrBuilderList()

Optional. The list of query parameters.
Example: The parameterized SQL query
"SELECT \* FROM my_table WHERE id = @id" can be matched with any value of
id.

`
repeated .google.cloud.geminidataanalytics.v1.QueryParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.cloud.geminidataanalytics.v1.QueryParameterOrBuilder>` |   |

### getQueryCase()

    public abstract ExampleQuery.QueryCase getQueryCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.ExampleQuery.QueryCase` |   |

### getSqlQuery()

    public abstract String getSqlQuery()

Optional. The SQL query that should be generated to answer the natural
language question. For example: "SELECT COUNT(\*) FROM orders WHERE
order_date BETWEEN '2024-01-01' AND '2024-01-31'"

`string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL];`

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

### getSqlQueryBytes()

    public abstract ByteString getSqlQueryBytes()

Optional. The SQL query that should be generated to answer the natural
language question. For example: "SELECT COUNT(\*) FROM orders WHERE
order_date BETWEEN '2024-01-01' AND '2024-01-31'"

`string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL];`

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

### hasSqlQuery()

    public abstract boolean hasSqlQuery()

Optional. The SQL query that should be generated to answer the natural
language question. For example: "SELECT COUNT(\*) FROM orders WHERE
order_date BETWEEN '2024-01-01' AND '2024-01-31'"

`string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL];`

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