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 ExampleQuery.

Example of relevant and commonly used SQL query and its corresponding natural
language queries optionally present. Currently only used for BigQuery data
sources.

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

## Namespace

Google \\ Cloud \\ GeminiDataAnalytics \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ sql_query` | `string` 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'" Must be at most 50,000 bytes (approx. 50,000 characters). |
| `↳ natural_language_question` | `string` Optional. A natural language question that a user might ask. For example: "How many orders were placed last month?" Must be at most 2,000 bytes (approx. 2,000 characters). |
| `↳ parameters` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.QueryParameter>` 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. |

### 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'"
Must be at most 50,000 bytes (approx. 50,000 characters).

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

### hasSqlQuery

### setSqlQuery

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'"
Must be at most 50,000 bytes (approx. 50,000 characters).

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

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

### getNaturalLanguageQuestion

Optional. A natural language question that a user might ask.

For example: "How many orders were placed last month?"
Must be at most 2,000 bytes (approx. 2,000 characters).

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

### setNaturalLanguageQuestion

Optional. A natural language question that a user might ask.

For example: "How many orders were placed last month?"
Must be at most 2,000 bytes (approx. 2,000 characters).

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

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

### getParameters

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.QueryParameter>` |   |

### setParameters

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.

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

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

### getQuery

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