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

Context for the chat request using a data agent.

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

## Namespace

Google \\ Cloud \\ GeminiDataAnalytics \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ data_agent` | `string` Required. The name of the data agent resource. |
| `↳ credentials` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Credentials` Optional. Deprecated: Use credentials in ChatRequest. The credentials to use when calling the Looker data source. Currently supports both OAuth token and API key-based credentials, as described in [Authentication with an SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk). |
| `↳ context_version` | `int` Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED) |

### getDataAgent

Required. The name of the data agent resource.

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

### setDataAgent

Required. The name of the data agent resource.

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

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

### getCredentials

Optional. Deprecated: Use credentials in ChatRequest.

The credentials to use when calling the Looker data source.
Currently supports both OAuth token and API key-based credentials, as
described in
[Authentication with an
SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).

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

### hasCredentials

### clearCredentials

### setCredentials

Optional. Deprecated: Use credentials in ChatRequest.

The credentials to use when calling the Looker data source.
Currently supports both OAuth token and API key-based credentials, as
described in
[Authentication with an
SDK](https://cloud.google.com/looker/docs/api-auth#authentication_with_an_sdk).

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

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

### getContextVersion

Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED)

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ContextVersion](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.DataAgentContext.ContextVersion). |

### setContextVersion

Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ContextVersion](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.DataAgentContext.ContextVersion). |

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