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

## Implements

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

## Methods

### getContext()

    public abstract QueryDataContext getContext()

Required. The context for the data query, including the data sources to
use.

`
.google.cloud.geminidataanalytics.v1beta.QueryDataContext context = 3 [(.google.api.field_behavior) = REQUIRED];
`

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

### getContextOrBuilder()

    public abstract QueryDataContextOrBuilder getContextOrBuilder()

Required. The context for the data query, including the data sources to
use.

`
.google.cloud.geminidataanalytics.v1beta.QueryDataContext context = 3 [(.google.api.field_behavior) = REQUIRED];
`

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

### getGenerationOptions()

    public abstract GenerationOptions getGenerationOptions()

Optional. Options to control query generation and execution behavior.

`
.google.cloud.geminidataanalytics.v1beta.GenerationOptions generation_options = 4 [(.google.api.field_behavior) = OPTIONAL];
`

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

### getGenerationOptionsOrBuilder()

    public abstract GenerationOptionsOrBuilder getGenerationOptionsOrBuilder()

Optional. Options to control query generation and execution behavior.

`
.google.cloud.geminidataanalytics.v1beta.GenerationOptions generation_options = 4 [(.google.api.field_behavior) = OPTIONAL];
`

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

### getParent()

    public abstract String getParent()

Required. The parent resource to generate the query for.
Format: projects/{project}/locations/{location}

`
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
`

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

### getParentBytes()

    public abstract ByteString getParentBytes()

Required. The parent resource to generate the query for.
Format: projects/{project}/locations/{location}

`
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
`

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

### getPrompt()

    public abstract String getPrompt()

Required. The natural language query for which to generate query.
Example: "What are the top 5 best selling products this month?"

`string prompt = 2 [(.google.api.field_behavior) = REQUIRED];`

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

### getPromptBytes()

    public abstract ByteString getPromptBytes()

Required. The natural language query for which to generate query.
Example: "What are the top 5 best selling products this month?"

`string prompt = 2 [(.google.api.field_behavior) = REQUIRED];`

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

### hasContext()

    public abstract boolean hasContext()

Required. The context for the data query, including the data sources to
use.

`
.google.cloud.geminidataanalytics.v1beta.QueryDataContext context = 3 [(.google.api.field_behavior) = REQUIRED];
`

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

### hasGenerationOptions()

    public abstract boolean hasGenerationOptions()

Optional. Options to control query generation and execution behavior.

`
.google.cloud.geminidataanalytics.v1beta.GenerationOptions generation_options = 4 [(.google.api.field_behavior) = OPTIONAL];
`

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