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

Request for Chat.

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

## Namespace

Google \\ Cloud \\ GeminiDataAnalytics \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ inline_context` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Context` Optional. Inline context for the chat request. Use this to chat statelessly (without managed conversation persistence and without an Agent) by passing all context inline. |
| `↳ conversation_reference` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.ConversationReference` Optional. Reference to a persisted conversation and agent context. Use this to chat with an Agent using managed conversation persistence. |
| `↳ data_agent_context` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.DataAgentContext` Optional. Context for the chat request. Use this to chat with an Agent statelessly, without managed conversation persistence. |
| `↳ client_managed_resource_context` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.ClientManagedResourceContext` Optional. Context with client managed resources. Some clients may not use GDA managed resources including conversations and agents, instead they create and manage their own conversations and agents resources. |
| `↳ looker_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.LookerSettings` Optional. Looker specific settings. |
| `↳ project` | `string` Optional. Deprecated: Use `parent` field instead. The Google Cloud project to be used for quota and billing. |
| `↳ parent` | `string` Required. The parent value for chat request. Pattern: `projects/{project}/locations/{location}` |
| `↳ messages` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Message>` Required. Content of current conversation. |
| `↳ credentials` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Credentials` Optional. The credentials to use when calling the data source(s) specified in the context. This field can be used to provide credentials for various data sources. For example, when connecting to Looker, it 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). |
| `↳ thinking_mode` | `int` Optional. The thinking mode to use for the agent loop. Defaults to THINKING_MODE_UNSPECIFIED if not specified. |
| `↳ model` | `int` Optional. The model to use for the agent loop when processing the request. This setting only has an effect when context.options.model is not set. |

### getInlineContext

Optional. Inline context for the chat request. Use this to chat
statelessly (without managed conversation persistence and without an
Agent) by passing all context inline.

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

### hasInlineContext

### setInlineContext

Optional. Inline context for the chat request. Use this to chat
statelessly (without managed conversation persistence and without an
Agent) by passing all context inline.

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

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

### getConversationReference

Optional. Reference to a persisted conversation and agent context.

Use this to chat with an Agent using managed conversation persistence.

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

### hasConversationReference

### setConversationReference

Optional. Reference to a persisted conversation and agent context.

Use this to chat with an Agent using managed conversation persistence.

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

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

### getDataAgentContext

Optional. Context for the chat request. Use this to chat with an Agent
statelessly, without managed conversation persistence.

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

### hasDataAgentContext

### setDataAgentContext

Optional. Context for the chat request. Use this to chat with an Agent
statelessly, without managed conversation persistence.

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

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

### getClientManagedResourceContext

Optional. Context with client managed resources.

Some clients may not use GDA managed resources including
conversations and agents, instead they create and manage their own
conversations and agents resources.

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

### hasClientManagedResourceContext

### setClientManagedResourceContext

Optional. Context with client managed resources.

Some clients may not use GDA managed resources including
conversations and agents, instead they create and manage their own
conversations and agents resources.

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

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

### getLookerSettings

Optional. Looker specific settings.

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

### hasLookerSettings

### setLookerSettings

Optional. Looker specific settings.

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

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

### getProject

Optional. Deprecated: Use `parent` field instead.

The Google Cloud project to be used for quota and billing.

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

### setProject

Optional. Deprecated: Use `parent` field instead.

The Google Cloud project to be used for quota and billing.

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

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

### getParent

Required. The parent value for chat request.

Pattern: `projects/{project}/locations/{location}`

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

### setParent

Required. The parent value for chat request.

Pattern: `projects/{project}/locations/{location}`

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

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

### getMessages

Required. Content of current conversation.

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

### setMessages

Required. Content of current conversation.

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

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

### getCredentials

Optional. The credentials to use when calling the data source(s) specified
in the context.

This field can be used to provide credentials for various data sources.
For example, when connecting to Looker, it 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. The credentials to use when calling the data source(s) specified
in the context.

This field can be used to provide credentials for various data sources.
For example, when connecting to Looker, it 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` |   |

### getThinkingMode

Optional. The thinking mode to use for the agent loop.

Defaults to THINKING_MODE_UNSPECIFIED if not specified.

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

### setThinkingMode

Optional. The thinking mode to use for the agent loop.

Defaults to THINKING_MODE_UNSPECIFIED if not specified.

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

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

### getModel

Optional. The model to use for the agent loop when processing the request.

This setting only has an effect when context.options.model is not set.

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

### setModel

Optional. The model to use for the agent loop when processing the request.

This setting only has an effect when context.options.model is not set.

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

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

### getContextProvider

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

### getDatasourceSettings

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