2.1.0 (latest) 2.0.0 1.1.0 1.0.0

    public sealed class ChatRequest : IMessage<ChatRequest>, IEquatable<ChatRequest>, IDeepCloneable<ChatRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Data Analytics API with Gemini v1 API class ChatRequest.

Request for Chat.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ChatRequest

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ChatRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ChatRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ChatRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.GeminiDataAnalytics.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1)

## Assembly

Google.Cloud.GeminiDataAnalytics.V1.dll

## Constructors

### ChatRequest()

    public ChatRequest()

### ChatRequest(ChatRequest)

    public ChatRequest(ChatRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequest` |

## Properties

### ClientManagedResourceContext

    public ClientManagedResourceContext ClientManagedResourceContext { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ClientManagedResourceContext` |   |

### ContextProviderCase

    public ChatRequest.ContextProviderOneofCase ContextProviderCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequest.ContextProviderOneofCase` |   |

### ConversationReference

    public ConversationReference ConversationReference { get; set; }

Optional. Reference to a persisted conversation and agent context.
Use this to chat with an Agent using managed conversation persistence.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ConversationReference` |   |

### Credentials

    public Credentials Credentials { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.Credentials` |   |

### DataAgentContext

    public DataAgentContext DataAgentContext { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.DataAgentContext` |   |

### DatasourceSettingsCase

    public ChatRequest.DatasourceSettingsOneofCase DatasourceSettingsCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequest.DatasourceSettingsOneofCase` |   |

### InlineContext

    public Context InlineContext { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.Context` |   |

### LookerSettings

    public LookerSettings LookerSettings { get; set; }

Optional. Looker specific settings.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.LookerSettings` |   |

### Messages

    public RepeatedField<Message> Messages { get; }

Required. Content of current conversation.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.Message` |   |

### Model

    public ChatRequest.Types.Model Model { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequest.Types.Model` |   |

### Parent

    public string Parent { get; set; }

Required. The parent value for chat request.
Pattern: `projects/{project}/locations/{location}`

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ThinkingMode

    public ChatRequest.Types.ThinkingMode ThinkingMode { get; set; }

Optional. The thinking mode to use for the agent loop.
Defaults to THINKING_MODE_UNSPECIFIED if not specified.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GeminiDataAnalytics.V1/latest/Google.Cloud.GeminiDataAnalytics.V1.ChatRequest.Types.ThinkingMode` |   |