0.16.0 (latest) 0.15.0 0.14.1 0.11.1 0.10.0 0.9.0 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.1 0.2.0 0.1.1

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Gemini Data Analytics V1beta Client class QueryDataRequest.

Request to query data from a natural language query.

Generated from protobuf message `google.cloud.geminidataanalytics.v1beta.QueryDataRequest`

## Namespace

Google \\ Cloud \\ GeminiDataAnalytics \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The parent resource to generate the query for. Format: projects/{project}/locations/{location} |
| `↳ prompt` | `string` Required. The natural language query for which to generate query. Example: "What are the top 5 best selling products this month?" |
| `↳ context` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.QueryDataContext` Required. The context for the data query, including the data sources to use. |
| `↳ generation_options` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.GenerationOptions` Optional. Options to control query generation and execution behavior. |

### getParent

Required. The parent resource to generate the query for.

Format: projects/{project}/locations/{location}

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setParent

Required. The parent resource to generate the query for.

Format: projects/{project}/locations/{location}

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPrompt

Required. The natural language query for which to generate query.

Example: "What are the top 5 best selling products this month?"

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setPrompt

Required. The natural language query for which to generate query.

Example: "What are the top 5 best selling products this month?"

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getContext

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.QueryDataContext|null` |   |

### hasContext

### clearContext

### setContext

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.QueryDataContext` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getGenerationOptions

Optional. Options to control query generation and execution behavior.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.GenerationOptions|null` |   |

### hasGenerationOptions

### clearGenerationOptions

### setGenerationOptions

Optional. Options to control query generation and execution behavior.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.GenerationOptions` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |