Class ChatRequest.Builder (0.21.0)

public static final class ChatRequest.Builder extends GeneratedMessage.Builder<ChatRequest.Builder> implements ChatRequestOrBuilder

Request for Chat.

Protobuf type google.cloud.geminidataanalytics.v1.ChatRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllMessages(Iterable<? extends Message> values)

public ChatRequest.Builder addAllMessages(Iterable<? extends Message> values)

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<? extends com.google.cloud.geminidataanalytics.v1.Message>
Returns
Type Description
ChatRequest.Builder

addMessages(Message value)

public ChatRequest.Builder addMessages(Message value)

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Message
Returns
Type Description
ChatRequest.Builder

addMessages(Message.Builder builderForValue)

public ChatRequest.Builder addMessages(Message.Builder builderForValue)

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Message.Builder
Returns
Type Description
ChatRequest.Builder

addMessages(int index, Message value)

public ChatRequest.Builder addMessages(int index, Message value)

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value Message
Returns
Type Description
ChatRequest.Builder

addMessages(int index, Message.Builder builderForValue)

public ChatRequest.Builder addMessages(int index, Message.Builder builderForValue)

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue Message.Builder
Returns
Type Description
ChatRequest.Builder

addMessagesBuilder()

public Message.Builder addMessagesBuilder()

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Message.Builder

addMessagesBuilder(int index)

public Message.Builder addMessagesBuilder(int index)

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
Message.Builder

build()

public ChatRequest build()
Returns
Type Description
ChatRequest

buildPartial()

public ChatRequest buildPartial()
Returns
Type Description
ChatRequest

clear()

public ChatRequest.Builder clear()
Returns
Type Description
ChatRequest.Builder
Overrides

clearClientManagedResourceContext()

public ChatRequest.Builder clearClientManagedResourceContext()

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.

.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ChatRequest.Builder

clearContextProvider()

public ChatRequest.Builder clearContextProvider()
Returns
Type Description
ChatRequest.Builder

clearConversationReference()

public ChatRequest.Builder clearConversationReference()

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

.google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ChatRequest.Builder

clearCredentials()

public ChatRequest.Builder clearCredentials()

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.

.google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ChatRequest.Builder

clearDataAgentContext()

public ChatRequest.Builder clearDataAgentContext()

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

.google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ChatRequest.Builder

clearDatasourceSettings()

public ChatRequest.Builder clearDatasourceSettings()
Returns
Type Description
ChatRequest.Builder

clearInlineContext()

public ChatRequest.Builder clearInlineContext()

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.

.google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ChatRequest.Builder

clearLookerSettings()

public ChatRequest.Builder clearLookerSettings()

Optional. Looker specific settings.

.google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ChatRequest.Builder

clearMessages()

public ChatRequest.Builder clearMessages()

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ChatRequest.Builder

clearModel()

public ChatRequest.Builder clearModel()

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.

.google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ChatRequest.Builder

This builder for chaining.

clearParent()

public ChatRequest.Builder clearParent()

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

string parent = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ChatRequest.Builder

This builder for chaining.

clearThinkingMode()

public ChatRequest.Builder clearThinkingMode()

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

.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ChatRequest.Builder

This builder for chaining.

getClientManagedResourceContext()

public ClientManagedResourceContext 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.

.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ClientManagedResourceContext

The clientManagedResourceContext.

getClientManagedResourceContextBuilder()

public ClientManagedResourceContext.Builder getClientManagedResourceContextBuilder()

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.

.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ClientManagedResourceContext.Builder

getClientManagedResourceContextOrBuilder()

public ClientManagedResourceContextOrBuilder getClientManagedResourceContextOrBuilder()

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.

.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ClientManagedResourceContextOrBuilder

getContextProviderCase()

public ChatRequest.ContextProviderCase getContextProviderCase()
Returns
Type Description
ChatRequest.ContextProviderCase

getConversationReference()

public ConversationReference getConversationReference()

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

.google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConversationReference

The conversationReference.

getConversationReferenceBuilder()

public ConversationReference.Builder getConversationReferenceBuilder()

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

.google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConversationReference.Builder

getConversationReferenceOrBuilder()

public ConversationReferenceOrBuilder getConversationReferenceOrBuilder()

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

.google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConversationReferenceOrBuilder

getCredentials()

public Credentials 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.

.google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Credentials

The credentials.

getCredentialsBuilder()

public Credentials.Builder getCredentialsBuilder()

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.

.google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Credentials.Builder

getCredentialsOrBuilder()

public CredentialsOrBuilder getCredentialsOrBuilder()

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.

.google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CredentialsOrBuilder

getDataAgentContext()

public DataAgentContext getDataAgentContext()

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

.google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DataAgentContext

The dataAgentContext.

getDataAgentContextBuilder()

public DataAgentContext.Builder getDataAgentContextBuilder()

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

.google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DataAgentContext.Builder

getDataAgentContextOrBuilder()

public DataAgentContextOrBuilder getDataAgentContextOrBuilder()

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

.google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DataAgentContextOrBuilder

getDatasourceSettingsCase()

public ChatRequest.DatasourceSettingsCase getDatasourceSettingsCase()
Returns
Type Description
ChatRequest.DatasourceSettingsCase

getDefaultInstanceForType()

public ChatRequest getDefaultInstanceForType()
Returns
Type Description
ChatRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getInlineContext()

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

.google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Context

The inlineContext.

getInlineContextBuilder()

public Context.Builder getInlineContextBuilder()

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.

.google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Context.Builder

getInlineContextOrBuilder()

public ContextOrBuilder getInlineContextOrBuilder()

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.

.google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ContextOrBuilder

getLookerSettings()

public LookerSettings getLookerSettings()

Optional. Looker specific settings.

.google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LookerSettings

The lookerSettings.

getLookerSettingsBuilder()

public LookerSettings.Builder getLookerSettingsBuilder()

Optional. Looker specific settings.

.google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LookerSettings.Builder

getLookerSettingsOrBuilder()

public LookerSettingsOrBuilder getLookerSettingsOrBuilder()

Optional. Looker specific settings.

.google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LookerSettingsOrBuilder

getMessages(int index)

public Message getMessages(int index)

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
Message

getMessagesBuilder(int index)

public Message.Builder getMessagesBuilder(int index)

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
Message.Builder

getMessagesBuilderList()

public List<Message.Builder> getMessagesBuilderList()

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Builder>

getMessagesCount()

public int getMessagesCount()

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getMessagesList()

public List<Message> getMessagesList()

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Message>

getMessagesOrBuilder(int index)

public MessageOrBuilder getMessagesOrBuilder(int index)

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
MessageOrBuilder

getMessagesOrBuilderList()

public List<? extends MessageOrBuilder> getMessagesOrBuilderList()

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<? extends com.google.cloud.geminidataanalytics.v1.MessageOrBuilder>

getModel()

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

.google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ChatRequest.Model

The model.

getModelValue()

public int getModelValue()

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.

.google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for model.

getParent()

public String getParent()

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

string parent = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

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

string parent = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for parent.

getThinkingMode()

public ChatRequest.ThinkingMode getThinkingMode()

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

.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ChatRequest.ThinkingMode

The thinkingMode.

getThinkingModeValue()

public int getThinkingModeValue()

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

.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for thinkingMode.

hasClientManagedResourceContext()

public boolean hasClientManagedResourceContext()

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.

.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the clientManagedResourceContext field is set.

hasConversationReference()

public boolean hasConversationReference()

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

.google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the conversationReference field is set.

hasCredentials()

public boolean hasCredentials()

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.

.google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the credentials field is set.

hasDataAgentContext()

public boolean hasDataAgentContext()

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

.google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the dataAgentContext field is set.

hasInlineContext()

public boolean hasInlineContext()

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.

.google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the inlineContext field is set.

hasLookerSettings()

public boolean hasLookerSettings()

Optional. Looker specific settings.

.google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the lookerSettings field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeClientManagedResourceContext(ClientManagedResourceContext value)

public ChatRequest.Builder mergeClientManagedResourceContext(ClientManagedResourceContext value)

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.

.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ClientManagedResourceContext
Returns
Type Description
ChatRequest.Builder

mergeConversationReference(ConversationReference value)

public ChatRequest.Builder mergeConversationReference(ConversationReference value)

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

.google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ConversationReference
Returns
Type Description
ChatRequest.Builder

mergeCredentials(Credentials value)

public ChatRequest.Builder mergeCredentials(Credentials value)

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.

.google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Credentials
Returns
Type Description
ChatRequest.Builder

mergeDataAgentContext(DataAgentContext value)

public ChatRequest.Builder mergeDataAgentContext(DataAgentContext value)

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

.google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value DataAgentContext
Returns
Type Description
ChatRequest.Builder

mergeFrom(ChatRequest other)

public ChatRequest.Builder mergeFrom(ChatRequest other)
Parameter
Name Description
other ChatRequest
Returns
Type Description
ChatRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ChatRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ChatRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ChatRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ChatRequest.Builder
Overrides

mergeInlineContext(Context value)

public ChatRequest.Builder mergeInlineContext(Context value)

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.

.google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Context
Returns
Type Description
ChatRequest.Builder

mergeLookerSettings(LookerSettings value)

public ChatRequest.Builder mergeLookerSettings(LookerSettings value)

Optional. Looker specific settings.

.google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value LookerSettings
Returns
Type Description
ChatRequest.Builder

removeMessages(int index)

public ChatRequest.Builder removeMessages(int index)

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
ChatRequest.Builder

setClientManagedResourceContext(ClientManagedResourceContext value)

public ChatRequest.Builder setClientManagedResourceContext(ClientManagedResourceContext value)

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.

.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ClientManagedResourceContext
Returns
Type Description
ChatRequest.Builder

setClientManagedResourceContext(ClientManagedResourceContext.Builder builderForValue)

public ChatRequest.Builder setClientManagedResourceContext(ClientManagedResourceContext.Builder builderForValue)

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.

.google.cloud.geminidataanalytics.v1.ClientManagedResourceContext client_managed_resource_context = 105 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue ClientManagedResourceContext.Builder
Returns
Type Description
ChatRequest.Builder

setConversationReference(ConversationReference value)

public ChatRequest.Builder setConversationReference(ConversationReference value)

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

.google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ConversationReference
Returns
Type Description
ChatRequest.Builder

setConversationReference(ConversationReference.Builder builderForValue)

public ChatRequest.Builder setConversationReference(ConversationReference.Builder builderForValue)

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

.google.cloud.geminidataanalytics.v1.ConversationReference conversation_reference = 103 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue ConversationReference.Builder
Returns
Type Description
ChatRequest.Builder

setCredentials(Credentials value)

public ChatRequest.Builder setCredentials(Credentials value)

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.

.google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Credentials
Returns
Type Description
ChatRequest.Builder

setCredentials(Credentials.Builder builderForValue)

public ChatRequest.Builder setCredentials(Credentials.Builder builderForValue)

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.

.google.cloud.geminidataanalytics.v1.Credentials credentials = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Credentials.Builder
Returns
Type Description
ChatRequest.Builder

setDataAgentContext(DataAgentContext value)

public ChatRequest.Builder setDataAgentContext(DataAgentContext value)

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

.google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value DataAgentContext
Returns
Type Description
ChatRequest.Builder

setDataAgentContext(DataAgentContext.Builder builderForValue)

public ChatRequest.Builder setDataAgentContext(DataAgentContext.Builder builderForValue)

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

.google.cloud.geminidataanalytics.v1.DataAgentContext data_agent_context = 104 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue DataAgentContext.Builder
Returns
Type Description
ChatRequest.Builder

setInlineContext(Context value)

public ChatRequest.Builder setInlineContext(Context value)

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.

.google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Context
Returns
Type Description
ChatRequest.Builder

setInlineContext(Context.Builder builderForValue)

public ChatRequest.Builder setInlineContext(Context.Builder builderForValue)

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.

.google.cloud.geminidataanalytics.v1.Context inline_context = 101 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Context.Builder
Returns
Type Description
ChatRequest.Builder

setLookerSettings(LookerSettings value)

public ChatRequest.Builder setLookerSettings(LookerSettings value)

Optional. Looker specific settings.

.google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value LookerSettings
Returns
Type Description
ChatRequest.Builder

setLookerSettings(LookerSettings.Builder builderForValue)

public ChatRequest.Builder setLookerSettings(LookerSettings.Builder builderForValue)

Optional. Looker specific settings.

.google.cloud.geminidataanalytics.v1.LookerSettings looker_settings = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue LookerSettings.Builder
Returns
Type Description
ChatRequest.Builder

setMessages(int index, Message value)

public ChatRequest.Builder setMessages(int index, Message value)

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value Message
Returns
Type Description
ChatRequest.Builder

setMessages(int index, Message.Builder builderForValue)

public ChatRequest.Builder setMessages(int index, Message.Builder builderForValue)

Required. Content of current conversation.

repeated .google.cloud.geminidataanalytics.v1.Message messages = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue Message.Builder
Returns
Type Description
ChatRequest.Builder

setModel(ChatRequest.Model value)

public ChatRequest.Builder setModel(ChatRequest.Model value)

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.

.google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ChatRequest.Model

The model to set.

Returns
Type Description
ChatRequest.Builder

This builder for chaining.

setModelValue(int value)

public ChatRequest.Builder setModelValue(int value)

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.

.google.cloud.geminidataanalytics.v1.ChatRequest.Model model = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for model to set.

Returns
Type Description
ChatRequest.Builder

This builder for chaining.

setParent(String value)

public ChatRequest.Builder setParent(String value)

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

string parent = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
ChatRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public ChatRequest.Builder setParentBytes(ByteString value)

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

string parent = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
ChatRequest.Builder

This builder for chaining.

setThinkingMode(ChatRequest.ThinkingMode value)

public ChatRequest.Builder setThinkingMode(ChatRequest.ThinkingMode value)

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

.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ChatRequest.ThinkingMode

The thinkingMode to set.

Returns
Type Description
ChatRequest.Builder

This builder for chaining.

setThinkingModeValue(int value)

public ChatRequest.Builder setThinkingModeValue(int value)

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

.google.cloud.geminidataanalytics.v1.ChatRequest.ThinkingMode thinking_mode = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for thinkingMode to set.

Returns
Type Description
ChatRequest.Builder

This builder for chaining.