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

A collection of context to apply to this conversation

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

## Namespace

Google \\ Cloud \\ GeminiDataAnalytics \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ system_instruction` | `string` Optional. The basic entry point for data owners creating domain knowledge for Agent. Why: Business jargon (e.g., YTD revenue is calculated as..., Retirement Age is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate) can help the model understand the business context around a user question. Must be at most 250,000 bytes (approx. 250,000 characters for English text). |
| `↳ datasource_references` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.DatasourceReferences` Required. Data sources that are available for answering the question. |
| `↳ options` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.ConversationOptions` Optional. Additional options for the conversation. |
| `↳ example_queries` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.ExampleQuery>` Optional. A list of example queries, providing examples of relevant and commonly used SQL queries and their corresponding natural language queries optionally present. Currently only used for BigQuery data sources and databases (alloydb, cloudsql, spanner) data sources. |
| `↳ looker_golden_queries` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.LookerGoldenQuery>` Optional. A list of golden queries, providing examples of relevant and commonly used Looker queries and their corresponding natural language queries optionally present. Only supported for Looker data sources. |
| `↳ glossary_terms` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.GlossaryTerm>` Optional. Term definitions (currently, only user authored) Not supported for databases (alloydb, cloudsql, spanner) data sources. |
| `↳ schema_relationships` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Context.SchemaRelationship>` Optional. Relationships between table schema, including referencing and referenced columns. |
| `↳ user_functions` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.UserFunctions` Optional. A collection of user functions to be included in context. |

### getSystemInstruction

Optional. The basic entry point for data owners creating domain knowledge
for Agent.

Why: Business jargon (e.g., YTD revenue is calculated as..., Retirement Age
is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate)
can help the model understand the business context around a user question.
Must be at most 250,000 bytes (approx. 250,000 characters for English
text).

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

### setSystemInstruction

Optional. The basic entry point for data owners creating domain knowledge
for Agent.

Why: Business jargon (e.g., YTD revenue is calculated as..., Retirement Age
is 65 in the USA, etc) and system instructions (e.g., answer like a Pirate)
can help the model understand the business context around a user question.
Must be at most 250,000 bytes (approx. 250,000 characters for English
text).

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

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

### getDatasourceReferences

Required. Data sources that are available for answering the question.

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

### hasDatasourceReferences

### clearDatasourceReferences

### setDatasourceReferences

Required. Data sources that are available for answering the question.

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

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

### getOptions

Optional. Additional options for the conversation.

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

### hasOptions

### clearOptions

### setOptions

Optional. Additional options for the conversation.

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

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

### getExampleQueries

Optional. A list of example queries, providing examples of relevant and
commonly used SQL queries and their corresponding natural language queries
optionally present. Currently only used for BigQuery data sources and
databases (alloydb, cloudsql, spanner) data sources.

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

### setExampleQueries

Optional. A list of example queries, providing examples of relevant and
commonly used SQL queries and their corresponding natural language queries
optionally present. Currently only used for BigQuery data sources and
databases (alloydb, cloudsql, spanner) data sources.

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

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

### getLookerGoldenQueries

Optional. A list of golden queries, providing examples of relevant and
commonly used Looker queries and their corresponding natural language
queries optionally present. Only supported for Looker data sources.

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

### setLookerGoldenQueries

Optional. A list of golden queries, providing examples of relevant and
commonly used Looker queries and their corresponding natural language
queries optionally present. Only supported for Looker data sources.

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

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

### getGlossaryTerms

Optional. Term definitions (currently, only user authored)
Not supported for databases (alloydb, cloudsql, spanner) data sources.

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

### setGlossaryTerms

Optional. Term definitions (currently, only user authored)
Not supported for databases (alloydb, cloudsql, spanner) data sources.

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

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

### getSchemaRelationships

Optional. Relationships between table schema, including referencing and
referenced columns.

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

### setSchemaRelationships

Optional. Relationships between table schema, including referencing and
referenced columns.

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

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

### getUserFunctions

Optional. A collection of user functions to be included in context.

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

### hasUserFunctions

### clearUserFunctions

### setUserFunctions

Optional. A collection of user functions to be included in context.

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

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