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

Enum: MockConfig::UnmatchedToolCallBehavior

  • UNMATCHED_TOOL_CALL_BEHAVIOR_UNSPECIFIED => 0

  • FAIL => 1

  • PASS_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: Int32

    Required. The sample rate (in Hertz) of the input audio data.

  • $msg->noise_suppression_level() / $msg->noise_suppression_level($value)

    Type: String

    Optional. 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: Int32

    Required. 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: String

    Required. 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: String

    Optional. 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: String

    Optional. 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: String

    Optional. 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: Bool

    Optional. 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: Bool

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

Google::Cloud::Ces::V1::SessionService::ToolResponses

Execution results for the requested tool calls from the client.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Ces::V1::SessionService::Citations

Citations associated with the agent response.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Ces::V1::SessionService::Event

Event input.

Inherits from Protobuf::Message.

Accessors

  • $msg->event() / $msg->event($value)

    Type: String

    Required. 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: String

    Optional. Text data from the end user.

  • $msg->dtmf() / $msg->dtmf($value)

    Type: String

    Optional. DTMF digits from the end user.

  • $msg->audio() / $msg->audio($value)

    Type: Bytes

    Optional. 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: Bool

    Optional. 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: String

    Output text from the CES agent.

  • $msg->audio() / $msg->audio($value)

    Type: Bytes

    Output 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: Int32

    Indicates the sequential order of conversation turn to which this output belongs to, starting from 1.

  • $msg->turn_completed() / $msg->turn_completed($value)

    Type: Bool

    If 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: String

    Optional. 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: Bool

    Whether 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

Google::Cloud::Ces::V1::SessionService::RunSessionResponse

Response message for [SessionService.RunSession][google.cloud.ces.v1.SessionService.RunSession].

Inherits from Protobuf::Message.

Accessors

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

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

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.