Service Client: Google::Cloud::Ces::V1::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::V1::SessionService - Compiled Protocol Buffers messages for google/cloud/ces/v1/session_service.proto
SYNOPSIS
use Google::Cloud::Ces::V1::SessionService;
my $msg = Google::Cloud::Ces::V1::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::V1::SessionService::MockConfig->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/ces/v1/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::V1::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::V1::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::V1::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::V1::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::V1::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::V1::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::V1::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::V1::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::V1::SessionService::InputAudioConfig)Optional. Configuration for processing the input audio.
$msg->output_audio_config()/$msg->output_audio_config($value)Type:
Message(Google::Cloud::Ces::V1::SessionService::OutputAudioConfig)Optional. Configuration for generating the output audio.
$msg->historical_contexts()/$msg->historical_contexts($value)Type:
Message(Google::Cloud::Ces::V1::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.v1.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::V1::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 enable streaming text outputs from the model. By default, text outputs from the model are collected before sending to the client. NOTE: This is only supported for text (non-voice) sessions via [StreamRunSession][google.cloud.ces.v1.SessionService.StreamRunSession] or [BidiRunSession][google.cloud.ces.v1.SessionService.BidiRunSession].
Google::Cloud::Ces::V1::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::V1::Example::ToolCall)Optional. The list of tool calls to execute.
Google::Cloud::Ces::V1::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::V1::Example::ToolResponse)Optional. The list of tool execution results.
Google::Cloud::Ces::V1::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::V1::SessionService::Citations::CitedChunk)List of cited pieces of information.
Google::Cloud::Ces::V1::SessionService::Event
Event input.
Inherits from Protobuf::Message.
Accessors
$msg->event()/$msg->event($value)Type:
StringRequired. The name of the event.
Google::Cloud::Ces::V1::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::V1::SessionService::ToolResponses)Optional. Execution results for the tool calls from the client.
$msg->image()/$msg->image($value)Type:
Message(Google::Cloud::Ces::V1::Example::Image)Optional. Image data from the end user.
$msg->blob()/$msg->blob($value)Type:
Message(Google::Cloud::Ces::V1::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::V1::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.
Google::Cloud::Ces::V1::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::V1::SessionService::ToolCalls)Request for the client to execute the tools.
$msg->citations()/$msg->citations($value)Type:
Message(Google::Cloud::Ces::V1::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::V1::SearchSuggestions::GoogleSearchSuggestions)The suggestions returned from Google Search as a result of invoking the [GoogleSearchTool][google.cloud.ces.v1.GoogleSearchTool].
$msg->end_session()/$msg->end_session($value)Type:
Message(Google::Cloud::Ces::V1::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->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::V1::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::V1::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::V1::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::V1::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::V1::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::V1::SessionService::RunSessionRequest
Request message for [SessionService.RunSession][google.cloud.ces.v1.SessionService.RunSession].
Inherits from Protobuf::Message.
Accessors
$msg->config()/$msg->config($value)Type:
Message(Google::Cloud::Ces::V1::SessionService::SessionConfig)Required. The configuration for the session.
$msg->inputs()/$msg->inputs($value)Type:
Message(Google::Cloud::Ces::V1::SessionService::SessionInput)Required. Inputs for the session.
Google::Cloud::Ces::V1::SessionService::RunSessionResponse
Response message for [SessionService.RunSession][google.cloud.ces.v1.SessionService.RunSession].
Inherits from Protobuf::Message.
Accessors
$msg->outputs()/$msg->outputs($value)Type:
Message(Google::Cloud::Ces::V1::SessionService::SessionOutput)Outputs for the session.
Google::Cloud::Ces::V1::SessionService::BidiSessionClientMessage
The top-level message sent by the client for the [SessionService.BidiRunSession][google.cloud.ces.v1.SessionService.BidiRunSession] method.
Inherits from Protobuf::Message.
Accessors
$msg->config()/$msg->config($value)Type:
Message(Google::Cloud::Ces::V1::SessionService::SessionConfig)Optional. The initial config message for the session.
$msg->realtime_input()/$msg->realtime_input($value)Type:
Message(Google::Cloud::Ces::V1::SessionService::SessionInput)Optional. Realtime input for the session.
Google::Cloud::Ces::V1::SessionService::BidiSessionServerMessage
The top-level message returned from [SessionService.BidiRunSession][google.cloud.ces.v1.SessionService.BidiRunSession] method.
Inherits from Protobuf::Message.
Accessors
$msg->session_output()/$msg->session_output($value)Type:
Message(Google::Cloud::Ces::V1::SessionService::SessionOutput)Optional. Processing result from the CES agent.
$msg->recognition_result()/$msg->recognition_result($value)Type:
Message(Google::Cloud::Ces::V1::SessionService::RecognitionResult)Optional. Realtime speech recognition result for the audio input.
$msg->interruption_signal()/$msg->interruption_signal($value)Type:
Message(Google::Cloud::Ces::V1::SessionService::InterruptionSignal)Optional. Indicates the agent's audio response has been interrupted.
$msg->end_session()/$msg->end_session($value)Type:
Message(Google::Cloud::Ces::V1::SessionService::EndSession)Optional. Indicates that the session has ended.
$msg->go_away()/$msg->go_away($value)Type:
Message(Google::Cloud::Ces::V1::SessionService::GoAway)Optional. Indicates that the server will disconnect soon and the client should half-close and restart the connection.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Ces::V1::SessionService::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.