Service Client: Google::Cloud::Ces::V1beta::SessionService::SessionServiceClient
Client stub representing the remote SessionService gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to ces.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Ces::V1beta::SessionService - Compiled Protocol Buffers messages for google/cloud/ces/v1beta/session_service.proto
SYNOPSIS
use Google::Cloud::Ces::V1beta::SessionService;
my $msg = Google::Cloud::Ces::V1beta::SessionService::MockConfig->new({
mocked_tool_calls => $mocked_tool_calls,
unmatched_tool_call_behavior => $unmatched_tool_call_behavior,
});
# Read or update a field
my $val = $msg->mocked_tool_calls();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Ces::V1beta::SessionService::MockConfig->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/ces/v1beta/session_service.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Ces::V1beta::SessionService::MockConfig
Mock tool calls configuration for the session.
Inherits from Protobuf::Message.
Accessors
$msg->mocked_tool_calls()/$msg->mocked_tool_calls($value)Type:
Message(Google::Cloud::Ces::V1beta::Mocks::MockedToolCall)Optional. All tool calls to mock for the duration of the session.
$msg->unmatched_tool_call_behavior()/$msg->unmatched_tool_call_behavior($value)Type:
Enum(Google::Cloud::Ces::V1beta::MockConfig::UnmatchedToolCallBehavior)Required. Beavhior for tool calls that don't match any args patterns in mocked_tool_calls.
Enum: MockConfig::UnmatchedToolCallBehavior
UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED=>0FAIL=>1PASS_THROUGH=>2
Google::Cloud::Ces::V1beta::SessionService::InputAudioConfig
InputAudioConfig configures how the CES agent should interpret the incoming audio data.
Inherits from Protobuf::Message.
Accessors
$msg->audio_encoding()/$msg->audio_encoding($value)Type:
Enum(Google::Cloud::Ces::V1beta::AudioEncoding)Required. The encoding of the input audio data.
$msg->sample_rate_hertz()/$msg->sample_rate_hertz($value)Type:
Int32Required. The sample rate (in Hertz) of the input audio data.
$msg->noise_suppression_level()/$msg->noise_suppression_level($value)Type:
StringOptional. Whether to enable noise suppression on the input audio. Available values are "low", "moderate", "high", "very_high".
Google::Cloud::Ces::V1beta::SessionService::OutputAudioConfig
OutputAudioConfig configures how the CES agent should synthesize outgoing audio responses.
Inherits from Protobuf::Message.
Accessors
$msg->audio_encoding()/$msg->audio_encoding($value)Type:
Enum(Google::Cloud::Ces::V1beta::AudioEncoding)Required. The encoding of the output audio data.
$msg->sample_rate_hertz()/$msg->sample_rate_hertz($value)Type:
Int32Required. The sample rate (in Hertz) of the output audio data.
Google::Cloud::Ces::V1beta::SessionService::SessionConfig
The configuration for the session.
Inherits from Protobuf::Message.
Accessors
$msg->session()/$msg->session($value)Type:
StringRequired. The unique identifier of the session. Format: `projects/{project}/locations/{location}/apps/{app}/sessions/{session}`
$msg->input_audio_config()/$msg->input_audio_config($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::InputAudioConfig)Optional. Configuration for processing the input audio.
$msg->output_audio_config()/$msg->output_audio_config($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::OutputAudioConfig)Optional. Configuration for generating the output audio.
$msg->historical_contexts()/$msg->historical_contexts($value)Type:
Message(Google::Cloud::Ces::V1beta::Example::Message)Optional. The historical context of the session, including user inputs, agent responses, and other messages. Typically, CES agent would manage session automatically so client doesn't need to explicitly populate this field. However, client can optionally override the historical contexts to force the session start from certain state.
$msg->entry_agent()/$msg->entry_agent($value)Type:
StringOptional. The entry agent to handle the session. If not specified, the session will be handled by the [root agent][google.cloud.ces.v1beta.App.root_agent] of the app. Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}`
$msg->deployment()/$msg->deployment($value)Type:
StringOptional. The deployment of the app to use for the session. Format: `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}`
$msg->time_zone()/$msg->time_zone($value)Type:
StringOptional. The time zone of the user. If provided, the agent will use the time zone for date and time related variables. Otherwise, the agent will use the time zone specified in the App.time_zone_settings.
The format is the IANA Time Zone Database time zone, e.g. "America/Los_Angeles".
$msg->use_tool_fakes()/$msg->use_tool_fakes($value)Type:
BoolOptional. Whether to use tool fakes for the session. If this field is set, the agent will attempt use tool fakes instead of calling the real tools.
$msg->remote_dialogflow_query_parameters()/$msg->remote_dialogflow_query_parameters($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::SessionConfig::RemoteDialogflowQueryParameters)Optional. [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters) to send to the remote [Dialogflow](https://cloud.google.com/dialogflow/cx/docs/concept/console-conversational-agents) agent when the session control is transferred to the remote agent.
$msg->enable_text_streaming()/$msg->enable_text_streaming($value)Type:
BoolOptional. Whether to stream text output from the model to the client incrementally as it is generated. Defaults to `false`.
* When disabled, the model's text output is buffered, and each text output sent to the client is a complete sentence. Clients can render each text output on a new line. * When enabled, each text output may contain only part of a sentence. Clients should concatenate consecutive text outputs to render the complete response.
NOTE: This is only supported for text (non-voice) sessions using [StreamRunSession][google.cloud.ces.v1beta.SessionService.StreamRunSession] or [BidiRunSession][google.cloud.ces.v1beta.SessionService.BidiRunSession].
$msg->include_llm_thought_summary()/$msg->include_llm_thought_summary($value)Type:
BoolOptional. Whether to include LLM thought summaries in the session outputs.
$msg->exclude_diagnostic_info()/$msg->exclude_diagnostic_info($value)Type:
BoolOptional. Whether to exclude diagnostic info from the session output.
$msg->include_progress_update()/$msg->include_progress_update($value)Type:
BoolOptional. Whether to include intermediate processing update to the client. If enabled, the update will be sent back in [SessionOutput.progress][google.cloud.ces.v1beta.SessionOutput.progress].
Google::Cloud::Ces::V1beta::SessionService::ToolCalls
Request for the client to execute the tools and return the execution results before continuing the session.
Inherits from Protobuf::Message.
Accessors
$msg->tool_calls()/$msg->tool_calls($value)Type:
Message(Google::Cloud::Ces::V1beta::Example::ToolCall)Optional. The list of tool calls to execute.
Google::Cloud::Ces::V1beta::SessionService::ToolResponses
Execution results for the requested tool calls from the client.
Inherits from Protobuf::Message.
Accessors
$msg->tool_responses()/$msg->tool_responses($value)Type:
Message(Google::Cloud::Ces::V1beta::Example::ToolResponse)Optional. The list of tool execution results.
Google::Cloud::Ces::V1beta::SessionService::Citations
Citations associated with the agent response.
Inherits from Protobuf::Message.
Accessors
$msg->cited_chunks()/$msg->cited_chunks($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::Citations::CitedChunk)List of cited pieces of information.
$msg->inline_citations()/$msg->inline_citations($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::Citations::InlineCitation)Optional. List of inline citations in the agent response.
Google::Cloud::Ces::V1beta::SessionService::Event
Event input.
Inherits from Protobuf::Message.
Accessors
$msg->event()/$msg->event($value)Type:
StringRequired. The name of the event.
$msg->variables()/$msg->variables($value)Type:
Message(Google::Protobuf::Struct::Struct)Optional. Additional variables associated with the event.
Google::Cloud::Ces::V1beta::SessionService::SessionInput
Input for the session.
Inherits from Protobuf::Message.
Accessors
$msg->text()/$msg->text($value)Type:
StringOptional. Text data from the end user.
$msg->dtmf()/$msg->dtmf($value)Type:
StringOptional. DTMF digits from the end user.
$msg->audio()/$msg->audio($value)Type:
BytesOptional. Audio data from the end user.
$msg->tool_responses()/$msg->tool_responses($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::ToolResponses)Optional. Execution results for the tool calls from the client.
$msg->image()/$msg->image($value)Type:
Message(Google::Cloud::Ces::V1beta::Example::Image)Optional. Image data from the end user.
$msg->blob()/$msg->blob($value)Type:
Message(Google::Cloud::Ces::V1beta::Example::Blob)Optional. Blob data from the end user.
$msg->variables()/$msg->variables($value)Type:
Message(Google::Protobuf::Struct::Struct)Optional. Contextual variables for the session, keyed by name. Only variables declared in the app will be used by the CES agent.
Unrecognized variables will still be sent to the [Dialogflow agent][Agent.RemoteDialogflowAgent] as additional session parameters.
$msg->event()/$msg->event($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::Event)Optional. Event input.
$msg->will_continue()/$msg->will_continue($value)Type:
BoolOptional. A flag to indicate if the current message is a fragment of a larger input in the bidi streaming session.
When set to `true`, the agent defers processing until it receives a subsequent message where `will_continue` is `false`, or until the system detects an endpoint in the audio input.
NOTE: This field does not apply to audio and DTMF inputs, as they are always processed automatically based on the endpointing signal.
$msg->recording_control()/$msg->recording_control($value)Type:
Enum(Google::Cloud::Ces::V1beta::SessionInput::RecordingControl)Optional. Whether the conversation may be recorded and logged from here on.
Use this when the app, rather than the agent, decides what may be kept: for example when the end user has to consent to being recorded before anything about the call can be stored.
The value stays in effect until the client sends a different one, so it only needs to be sent when the answer changes. Whatever is in effect when a turn completes decides that turn, both whether its audio reaches the recording bucket and whether its transcript reaches conversation history, BigQuery and Cloud Logging. It covers the agent's side of the turn as well as the end user's.
Turns that complete before the client first sends this are recorded according to the app's logging settings, as though the field did not exist.
If more than one input in the same request sets it, the last one wins.
Enum: SessionInput::RecordingControl
RECORDING_CONTROL_UNSPECIFIED=>0RECORDING_ENABLED=>1RECORDING_DISABLED=>2
Google::Cloud::Ces::V1beta::SessionService::SessionOutput
Output for the session.
Inherits from Protobuf::Message.
Accessors
$msg->text()/$msg->text($value)Type:
StringOutput text from the CES agent.
$msg->audio()/$msg->audio($value)Type:
BytesOutput audio from the CES agent.
$msg->tool_calls()/$msg->tool_calls($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::ToolCalls)Request for the client to execute the tools.
$msg->citations()/$msg->citations($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::Citations)Citations that provide the source information for the agent's generated text.
$msg->google_search_suggestions()/$msg->google_search_suggestions($value)Type:
Message(Google::Cloud::Ces::V1beta::SearchSuggestions::GoogleSearchSuggestions)The suggestions returned from Google Search as a result of invoking the [GoogleSearchTool][google.cloud.ces.v1beta.GoogleSearchTool].
$msg->end_session()/$msg->end_session($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::EndSession)Indicates the session has ended.
$msg->payload()/$msg->payload($value)Type:
Message(Google::Protobuf::Struct::Struct)Custom payload with structured output from the CES agent.
$msg->image()/$msg->image($value)Type:
Message(Google::Cloud::Ces::V1beta::Example::Image)Output image from the CES agent.
$msg->progress()/$msg->progress($value)Type:
StringIntermediate progress update from the CES agent.
$msg->turn_index()/$msg->turn_index($value)Type:
Int32Indicates the sequential order of conversation turn to which this output belongs to, starting from 1.
$msg->turn_completed()/$msg->turn_completed($value)Type:
BoolIf true, the CES agent has detected the end of the current conversation turn and will provide no further output for this turn.
$msg->diagnostic_info()/$msg->diagnostic_info($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::SessionOutput::DiagnosticInfo)Optional. Diagnostic information contains execution details during the processing of the input. Only populated in the last SessionOutput (with `turn_completed=true`) for each turn.
$msg->context()/$msg->context($value)Type:
Message(Google::Protobuf::Any::Any)Context messages for external supervision guardrails.
Google::Cloud::Ces::V1beta::SessionService::RecognitionResult
Speech recognition result for the audio input.
Inherits from Protobuf::Message.
Accessors
$msg->transcript()/$msg->transcript($value)Type:
StringOptional. Concatenated user speech segments captured during the current turn.
Google::Cloud::Ces::V1beta::SessionService::InterruptionSignal
Indicates the agent's audio response has been interrupted. The client should immediately stop any current audio playback (e.g., due to user barge-in or a new agent response being generated).
Inherits from Protobuf::Message.
Accessors
$msg->barge_in()/$msg->barge_in($value)Type:
BoolWhether the interruption is caused by a user barge-in event.
Google::Cloud::Ces::V1beta::SessionService::EndSession
Indicates the session has terminated, due to either successful completion (e.g. user says "Good bye!" ) or an agent escalation.
The agent will not process any further inputs after session is terminated and the client should half-close and disconnect after receiving all remaining responses from the agent.
Inherits from Protobuf::Message.
Accessors
$msg->metadata()/$msg->metadata($value)Type:
Message(Google::Protobuf::Struct::Struct)Optional. Provides additional information about the end session signal, such as the reason for ending the session.
Google::Cloud::Ces::V1beta::SessionService::GoAway
Indicates that the server will disconnect soon and the client should half-close and restart the connection.
Inherits from Protobuf::Message.
Google::Cloud::Ces::V1beta::SessionService::RunSessionRequest
Request message for [SessionService.RunSession][google.cloud.ces.v1beta.SessionService.RunSession].
Inherits from Protobuf::Message.
Accessors
$msg->config()/$msg->config($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::SessionConfig)Required. The configuration for the session.
$msg->inputs()/$msg->inputs($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::SessionInput)Required. Inputs for the session.
Google::Cloud::Ces::V1beta::SessionService::RunSessionResponse
Response message for [SessionService.RunSession][google.cloud.ces.v1beta.SessionService.RunSession].
Inherits from Protobuf::Message.
Accessors
$msg->outputs()/$msg->outputs($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::SessionOutput)Outputs for the session.
Google::Cloud::Ces::V1beta::SessionService::BidiSessionClientMessage
The top-level message sent by the client for the [SessionService.BidiRunSession][google.cloud.ces.v1beta.SessionService.BidiRunSession] method.
Inherits from Protobuf::Message.
Accessors
$msg->config()/$msg->config($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::SessionConfig)Optional. The initial config message for the session.
$msg->realtime_input()/$msg->realtime_input($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::SessionInput)Optional. Realtime input for the session.
Google::Cloud::Ces::V1beta::SessionService::BidiSessionServerMessage
The top-level message returned from [SessionService.BidiRunSession][google.cloud.ces.v1beta.SessionService.BidiRunSession] method.
Inherits from Protobuf::Message.
Accessors
$msg->session_output()/$msg->session_output($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::SessionOutput)Optional. Processing result from the CES agent.
$msg->recognition_result()/$msg->recognition_result($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::RecognitionResult)Optional. Realtime speech recognition result for the audio input.
$msg->interruption_signal()/$msg->interruption_signal($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::InterruptionSignal)Optional. Indicates the agent's audio response has been interrupted.
$msg->end_session()/$msg->end_session($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::EndSession)Optional. Indicates that the session has ended.
$msg->go_away()/$msg->go_away($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::GoAway)Optional. Indicates that the server will disconnect soon and the client should half-close and restart the connection.
Google::Cloud::Ces::V1beta::SessionService::StreamChatAiAssistantRequest
Request message for [SessionService.StreamChatAiAssistant][google.cloud.ces.v1beta.SessionService.StreamChatAiAssistant].
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The assistant session to be used to run the assistant. Format: `projects/{project}/locations/{location}/apps/{app}/assistantSessions/{assistant_session}`
$msg->message()/$msg->message($value)Type:
StringOptional. The message to send to the assistant agent. May be empty when `confirmation_response` is set (answering a pending confirmation without adding a new message); at least one of the two must be provided.
$msg->attached_gcs_uris()/$msg->attached_gcs_uris($value)Type:
StringOptional. Cloud Storage URIs for files uploaded by the user during this turn. Example: "gs://cxas-transient-uploads/uuid/prd.pdf"
$msg->context_token()/$msg->context_token($value)Type:
StringOptional. Opaque onboarding context token returned by [SessionService.GenerateOnboardingSuggestions][google.cloud.ces.v1beta.SessionService.GenerateOnboardingSuggestions]. When set and still fresh, the server reuses the onboarding snapshot computed for the zero state instead of recomputing it for the first conversation turn.
$msg->confirmation_response()/$msg->confirmation_response($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::AssistantConfirmationResponse)Optional. The user's answer to a pending [AssistantConfirmationRequest][google.cloud.ces.v1beta.AssistantConfirmationRequest]. When set, the server resumes the paused agent with this answer instead of (or in addition to) starting a new prompt turn.
$msg->client_capabilities()/$msg->client_capabilities($value)Type:
Enum(Google::Cloud::Ces::V1beta::StreamChatAiAssistantRequest::ClientCapability)Optional. Response features this client can render. The server only emits events that need a capability (e.g. `confirmation_request`) when the capability is declared, so older clients never receive events they would silently drop.
$msg->operation_completed_event()/$msg->operation_completed_event($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::OperationCompletedEvent)Optional. Resumes an assistant session paused waiting for a client-managed long-running operation to complete.
$msg->resume_from_sequence_number()/$msg->resume_from_sequence_number($value)Type:
Int64Optional. Optional cursor to resume and replay events from an in-flight or completed turn.
$msg->attach_only()/$msg->attach_only($value)Type:
BoolOptional. Optional flag to attach to an existing in-flight turn without submitting a new message.
Enum: StreamChatAiAssistantRequest::ClientCapability
CLIENT_CAPABILITY_UNSPECIFIED=>0CONFIRMATION_CARDS=>1CLIENT_MANAGED_LRO=>2
Google::Cloud::Ces::V1beta::SessionService::AssistantSuggestion
A single personalized onboarding suggestion chip for Arc's zero state.
Inherits from Protobuf::Message.
Accessors
$msg->seed_prompt()/$msg->seed_prompt($value)Type:
StringPrefill the composer with this text; the user reviews and sends.
$msg->load_session()/$msg->load_session($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::AssistantSuggestion::LoadSession)Open an existing assistant session.
$msg->send_message()/$msg->send_message($value)Type:
StringPrefill the composer with this text and submit immediately. Only used for quick-reply chips inside an active onboarding conversation.
$msg->suggestion_id()/$msg->suggestion_id($value)Type:
StringStable identifier for this suggestion, round-tripped by clients in interaction logging.
$msg->label()/$msg->label($value)Type:
StringChip label shown to the user (at most 60 characters).
$msg->rationale()/$msg->rationale($value)Type:
StringOptional short explanation of why this suggestion is shown (tooltip / rationale popover).
$msg->icon()/$msg->icon($value)Type:
Enum(Google::Cloud::Ces::V1beta::AssistantSuggestion::Icon)Icon hint for the chip.
$msg->source()/$msg->source($value)Type:
Enum(Google::Cloud::Ces::V1beta::AssistantSuggestion::Source)How this suggestion was produced.
$msg->candidate_type()/$msg->candidate_type($value)Type:
StringRule-table candidate type in kebab-case (e.g. "resume-pending-review"), for metrics.
Enum: AssistantSuggestion::Icon
ICON_UNSPECIFIED=>0RESUME=>1BUILD=>2EVALUATE=>3DEPLOY=>4EXPLORE=>5FIX=>6
Enum: AssistantSuggestion::Source
SOURCE_UNSPECIFIED=>0RULE=>1LLM_RANKED=>2
Google::Cloud::Ces::V1beta::SessionService::GenerateOnboardingSuggestionsRequest
Request message for [SessionService.GenerateOnboardingSuggestions][google.cloud.ces.v1beta.SessionService.GenerateOnboardingSuggestions].
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The app whose zero state is being rendered. Format: `projects/{project}/locations/{location}/apps/{app}`
$msg->max_suggestions()/$msg->max_suggestions($value)Type:
Int32Optional. Maximum number of suggestions to return. Defaults to 4 when unset.
Google::Cloud::Ces::V1beta::SessionService::GenerateOnboardingSuggestionsResponse
Response message for [SessionService.GenerateOnboardingSuggestions][google.cloud.ces.v1beta.SessionService.GenerateOnboardingSuggestions].
Inherits from Protobuf::Message.
Accessors
$msg->user_profile()/$msg->user_profile($value)Type:
Enum(Google::Cloud::Ces::V1beta::GenerateOnboardingSuggestionsResponse::UserProfile)Classification of the requesting user's history.
$msg->suggestions()/$msg->suggestions($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::AssistantSuggestion)Personalized suggestions, ranked most relevant first.
$msg->context_token()/$msg->context_token($value)Type:
StringOpaque token capturing the onboarding snapshot used to generate these suggestions. Clients echo it on the first [StreamChatAiAssistantRequest][google.cloud.ces.v1beta.StreamChatAiAssistantRequest] so the server can reuse the snapshot.
Enum: GenerateOnboardingSuggestionsResponse::UserProfile
USER_PROFILE_UNSPECIFIED=>0NEW=>1EXPLORING=>2RETURNING=>3
Google::Cloud::Ces::V1beta::SessionService::ArtifactChunk
A streamed fragment of a document artifact (e.g. a markdown TDD) that the assistant is generating. Content deltas stream while the document is being written so clients can render a live preview; the FINALIZED chunk carries the GCS URI once the file has been persisted.
Inherits from Protobuf::Message.
Accessors
$msg->artifact_id()/$msg->artifact_id($value)Type:
StringIdentifier of the artifact, stable across all chunks of one artifact within the stream.
$msg->display_name()/$msg->display_name($value)Type:
StringThe file name shown to the user, e.g. "hotel_booking_tdd.md". Set on STARTED (and repeated on FINALIZED).
$msg->mime_type()/$msg->mime_type($value)Type:
StringThe IANA media type of the artifact content, e.g. "text/markdown".
$msg->content_delta()/$msg->content_delta($value)Type:
StringIncremental artifact content. Set on DELTA chunks.
$msg->gcs_uri()/$msg->gcs_uri($value)Type:
StringThe GCS object the artifact was persisted to. Set on FINALIZED chunks.
$msg->state()/$msg->state($value)Type:
Enum(Google::Cloud::Ces::V1beta::ArtifactChunk::State)Lifecycle position of this chunk.
Enum: ArtifactChunk::State
STATE_UNSPECIFIED=>0STARTED=>1DELTA=>2FINALIZED=>3FAILED=>4CLOSED=>5
Google::Cloud::Ces::V1beta::SessionService::OptionQuestionsChunk
Structured clarification options the assistant asks the user to choose among, transduced server-side out of the model's turn (the option block is stripped from the streamed and persisted text). The console renders a keyboard-navigable option list docked above the composer.
Inherits from Protobuf::Message.
Accessors
$msg->questions()/$msg->questions($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::OptionQuestionsChunk::Question)The questions asked this turn. More than one entry drives the console's "1 of N" pager.
Google::Cloud::Ces::V1beta::SessionService::AssistantConfirmationRequest
A blocking question or confirmation the assistant needs answered before an agent action can proceed. The requesting agent is paused and resumes only when the answer arrives on a later [StreamChatAiAssistantRequest.confirmation_response][google.cloud.ces.v1beta.StreamChatAiAssistantRequest.confirmation_response].
Inherits from Protobuf::Message.
Accessors
$msg->confirmation_id()/$msg->confirmation_id($value)Type:
StringIdentifier correlating this request with its response. Opaque to clients; must be echoed verbatim on the answering request.
$msg->context()/$msg->context($value)Type:
StringContext describing what is being confirmed (e.g. the action the agent wants to take, or the question it needs answered). Rendered as plain text, not Markdown.
$msg->positive_label()/$msg->positive_label($value)Type:
StringLabel for the approving action of a binary confirmation (e.g. "Publish"). Unset when `questions` is populated.
$msg->negative_label()/$msg->negative_label($value)Type:
StringLabel for the declining action of a binary confirmation (e.g. "Not yet"). Unset when `questions` is populated.
$msg->questions()/$msg->questions($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::OptionQuestionsChunk::Question)Multi-choice form of the confirmation. When populated, the card renders a selectable option list and the chosen option's submit_text (or free-form user text) is returned as [AssistantConfirmationResponse.answer_text][google.cloud.ces.v1beta.AssistantConfirmationResponse.answer_text].
$msg->tool()/$msg->tool($value)Type:
StringName of the tool call the agent paused on (e.g. "update_app"), for the card header. Unset for pure questions.
$msg->agent_name()/$msg->agent_name($value)Type:
StringDisplay label of the agent that raised the confirmation (e.g. `"Contract Architect"`), for the card header.
$msg->expire_time()/$msg->expire_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Time after which this confirmation can no longer be answered. An expired card renders as inactive, and the server declines the confirmation on the next turn so the paused agent does not wait indefinitely.
Google::Cloud::Ces::V1beta::SessionService::AssistantConfirmationResponse
The user's answer to an [AssistantConfirmationRequest][google.cloud.ces.v1beta.AssistantConfirmationRequest], sent on the next [SessionService.StreamChatAiAssistant][google.cloud.ces.v1beta.SessionService.StreamChatAiAssistant] call to resume the paused agent.
Inherits from Protobuf::Message.
Accessors
$msg->confirmed()/$msg->confirmed($value)Type:
BoolBinary answer: true approves the paused action, false declines it.
$msg->answer_text()/$msg->answer_text($value)Type:
StringThe chosen option's submit_text, or free-form user text. The paused action is cancelled and the text is handed to the agent to act on.
$msg->confirmation_id()/$msg->confirmation_id($value)Type:
StringThe [AssistantConfirmationRequest.confirmation_id][google.cloud.ces.v1beta.AssistantConfirmationRequest.confirmation_id] being answered.
Google::Cloud::Ces::V1beta::SessionService::OperationCompletedEvent
Event sent by the client or background worker to resume an assistant session after an asynchronous Long-Running Operation (LRO) completes.
Inherits from Protobuf::Message.
Accessors
$msg->operation_name()/$msg->operation_name($value)Type:
StringThe operation resource name (e.g. `operations/{op}`).
$msg->target_resource_name()/$msg->target_resource_name($value)Type:
StringThe primary resource targeted or produced by the operation (e.g. evaluation run ID, app ID, dataset ID).
$msg->operation_type()/$msg->operation_type($value)Type:
StringThe operation type or tool name (e.g. "run_evaluation", "copy_app", "export_app").
$msg->status()/$msg->status($value)Type:
StringStatus of the operation run (e.g. "SUCCEEDED", "FAILED", "CANCELLED").
$msg->deduplication_token()/$msg->deduplication_token($value)Type:
StringOptional deduplication token (e.g. UUID) to prevent duplicate turn execution from concurrent browser tabs.
$msg->error()/$msg->error($value)Type:
Message(Google::Rpc::Status::Status)Optional canonical error status if the operation failed.
$msg->metadata()/$msg->metadata($value)Type:
Message(Google::Protobuf::Struct::Struct)Optional structured result metadata (e.g. pass_rate, total_examples, export_uri).
Google::Cloud::Ces::V1beta::SessionService::TurnMetadata
Turn-level metadata and intent categorization.
Inherits from Protobuf::Message.
Accessors
$msg->contract_related()/$msg->contract_related($value)Type:
BoolIndicates whether this assistant turn was contract-related (e.g. contract drafting, alignment, extraction, or revision).
$msg->contract_finalized()/$msg->contract_finalized($value)Type:
BoolSet on the final artifact event of a turn whose contract draft was published (a revision was activated). Terminal for the clarification flow of this draft: contract_progress is authoritative and complete.
$msg->contract_streaming_phase()/$msg->contract_streaming_phase($value)Type:
Enum(Google::Cloud::Ces::V1beta::TurnMetadata::ContractStreamingPhase)Set only on in-flight progress estimates emitted while a contract artifact fence is streaming, and on the revision-turn-start event. Unset on authoritative payloads.
$msg->contract_draft_complete()/$msg->contract_draft_complete($value)Type:
BoolSet on the terminal event of a contract draft whose every placeholder is resolved (contract_progress is 100%), whether or not the draft was published. Clients complete and dismiss the contract progress display on it; publication is reported separately by contract_finalized.
Enum: TurnMetadata::ContractStreamingPhase
CONTRACT_STREAMING_PHASE_UNSPECIFIED=>0DRAFTING=>1REVISING=>2
Google::Cloud::Ces::V1beta::SessionService::StreamChatAiAssistantResponse
Response message for [SessionService.StreamChatAiAssistant][google.cloud.ces.v1beta.SessionService.StreamChatAiAssistant].
Inherits from Protobuf::Message.
Accessors
$msg->text_chunk()/$msg->text_chunk($value)Type:
StringText Token (for streaming Gemini responses word-by-word).
$msg->status()/$msg->status($value)Type:
Message(Google::Rpc::Status::Status)Simple status update.
$msg->thought_chunk()/$msg->thought_chunk($value)Type:
StringThought text chunk (agent's reasoning before generating response).
$msg->tool_call()/$msg->tool_call($value)Type:
Message(Google::Cloud::Ces::V1beta::Example::ToolCall)Tool call execution event.
$msg->tool_response()/$msg->tool_response($value)Type:
Message(Google::Cloud::Ces::V1beta::Example::ToolResponse)Tool call response event.
$msg->artifact_chunk()/$msg->artifact_chunk($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::ArtifactChunk)Generated-document artifact event (live preview deltas + final GCS pointer).
$msg->option_questions_chunk()/$msg->option_questions_chunk($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::OptionQuestionsChunk)Structured clarification options parsed out of the model turn. The console renders these as a selectable option list instead of raw text.
$msg->confirmation_request()/$msg->confirmation_request($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::AssistantConfirmationRequest)A blocking confirmation the agent paused on. The agent resumes when the answer arrives on a later request's `confirmation_response`. Only sent to clients that declared the CONFIRMATION_CARDS capability on the request.
$msg->session_checkpoint()/$msg->session_checkpoint($value)Type:
Message(Google::Cloud::Ces::V1beta::Common::SessionCheckpoint)Session checkpoint/compaction recap event containing user intent and rolling summary.
$msg->resume_snapshot()/$msg->resume_snapshot($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::TurnResumeSnapshot)A compacted replay of an in-flight turn, sent as the first event of every attach or resume before any live event. The client replaces any locally rendered state for this turn with the snapshot's contents.
$msg->handoff()/$msg->handoff($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::TurnHandoffEvent)Tells the client to silently reconnect with resume_from_sequence_number: the task serving this stream is going away and the turn will continue elsewhere. Not an error; the stream completes normally after this event.
$msg->turn_completed()/$msg->turn_completed($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::TurnCompletedEvent)The turn has ended. Sent as the last event of every turn, on the original stream and on every attached or resumed stream, so clients can end the turn on an explicit signal instead of inferring it from stream closure.
$msg->event_id()/$msg->event_id($value)Type:
StringUnique identifier for the event.
$msg->event_time()/$msg->event_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Timestamp when the event occurred.
$msg->ui_event()/$msg->ui_event($value)Type:
Message(Google::Cloud::Ces::V1beta::Common::UiEvent)Optional. UI event payload.
$msg->turn_metadata()/$msg->turn_metadata($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::TurnMetadata)Optional. Turn-level metadata and intent categorization.
$msg->sequence_number()/$msg->sequence_number($value)Type:
Int64Optional. Monotonically increasing sequence number for this session turn.
$msg->turn_in_progress()/$msg->turn_in_progress($value)Type:
BoolOptional. Indicates whether the turn is still actively running in the background.
Google::Cloud::Ces::V1beta::SessionService::CancelAssistantTurnRequest
Request to cancel an assistant session's in-flight turn.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The assistant session whose in-flight turn to cancel.
$msg->turn_id()/$msg->turn_id($value)Type:
StringOptional. The turn to cancel; empty cancels whichever turn is running. A cancel naming a turn that is no longer the running one is a no-op.
Google::Cloud::Ces::V1beta::SessionService::CancelAssistantTurnResponse
Response for CancelAssistantTurn.
Inherits from Protobuf::Message.
Accessors
$msg->cancelled()/$msg->cancelled($value)Type:
BoolWhether an in-flight turn was found and asked to stop (directly on this task, or through an epoch preemption for a turn hosted elsewhere).
Google::Cloud::Ces::V1beta::SessionService::TurnResumeSnapshot
A compacted replay of an in-flight turn: everything needed to render the turn's visible output so far, plus the position live events continue from.
Inherits from Protobuf::Message.
Accessors
$msg->turn_id()/$msg->turn_id($value)Type:
StringIdentifies the turn being attached to.
$msg->resolved_sequence_number()/$msg->resolved_sequence_number($value)Type:
Int64The position this snapshot represents. Live events follow with sequence_number strictly greater than this. When lower than the resume_from_sequence_number the client requested, flushed progress lags what the client already rendered: the client must discard its rendered content of this turn beyond this position before applying the snapshot.
$msg->events()/$msg->events($value)Type:
Message(Google::Cloud::Ces::V1beta::SessionService::StreamChatAiAssistantResponse)Compacted events reconstructing the turn's visible output, in render order, using the same event shapes as live streaming.
$msg->orphan_deadline_time()/$msg->orphan_deadline_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)When the turn will be wound down if no client remains attached.
Google::Cloud::Ces::V1beta::SessionService::TurnHandoffEvent
Emitted before this task stops serving the stream mid-turn (e.g. a server restart). The turn's state is persisted; a reconnect carrying resume_from_sequence_number continues it on another task.
Inherits from Protobuf::Message.
Accessors
$msg->turn_id()/$msg->turn_id($value)Type:
StringIdentifies the turn to resume.
$msg->reason()/$msg->reason($value)Type:
Enum(Google::Cloud::Ces::V1beta::TurnHandoffEvent::Reason)Why the stream is handing off.
Enum: TurnHandoffEvent::Reason
REASON_UNSPECIFIED=>0SERVER_RESTART=>1
Google::Cloud::Ces::V1beta::SessionService::TurnCompletedEvent
Terminal event of a turn (see StreamChatAiAssistantResponse.turn_completed).
Inherits from Protobuf::Message.
Accessors
$msg->turn_id()/$msg->turn_id($value)Type:
StringIdentifier of the turn that ended; matches TurnResumeSnapshot.turn_id and ActiveTurnInfo.turn_id.
$msg->reason()/$msg->reason($value)Type:
Enum(Google::Cloud::Ces::V1beta::TurnCompletedEvent::Reason)Why the turn ended.
$msg->final_sequence_number()/$msg->final_sequence_number($value)Type:
Int64Sequence number of the last event the turn produced. A client whose cursor is lower missed content and should reload the session to see it.
Enum: TurnCompletedEvent::Reason
REASON_UNSPECIFIED=>0COMPLETED=>1ABANDONED=>2RESUME_UNAVAILABLE=>3
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Ces::V1beta::SessionService::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.