NAME

Google::Actions::Sdk::V2::Interactionmodel::ConditionalEvent - Compiled Protocol Buffers messages for google/actions/sdk/v2/interactionmodel/conditional_event.proto

SYNOPSIS

use Google::Actions::Sdk::V2::Interactionmodel::ConditionalEvent;

my $msg = Google::Actions::Sdk::V2::Interactionmodel::ConditionalEvent::ConditionalEvent->new({
    condition => $condition,
    transition_to_scene => $transition_to_scene,
    handler => $handler,
});

# Read or update a field
my $val = $msg->condition();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Actions::Sdk::V2::Interactionmodel::ConditionalEvent::ConditionalEvent->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/actions/sdk/v2/interactionmodel/conditional_event.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Actions::Sdk::V2::Interactionmodel::ConditionalEvent::ConditionalEvent

Registers events that trigger as the result of a true condition.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. Filter condition for this event to trigger. If condition is evaluated to true then the associated `handler` will be triggered. The following variable references are supported: `$session` - To reference data in session storage. `$user` - To reference data in user storage. The following boolean operators are supported (with examples): `&&` - `session.params.counter > 0 && session.params.counter < 100` `||` - `session.params.foo == "John" || session.params.counter == "Adam"` `!` - `!(session.params.counter == 5)` The following comparisons are supported: `==`, `!=`, `<`, `>`, `<=`, `>=` The following list and string operators are supported (with examples): `in` - "Watermelon" in `session.params.fruitList` `size` - `size(session.params.fruitList) > 2` `substring` - `session.params.fullName.contains("John")`

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

    Type: String

    Optional. Destination scene which the conversation should jump to when the associated condition is evaluated to true. The state of the current scene is destroyed on the transition.

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

    Type: Message (Google::Actions::Sdk::V2::Interactionmodel::EventHandler::EventHandler)

    Optional. Event handler which is triggered when the associated condition is evaluated to `true`. Should execute before transitioning to the destination scene. Useful to generate Prompts in response to events.

SEE ALSO

Protobuf, Protobuf::Message, Google::Actions::Sdk::V2::Interactionmodel::ConditionalEvent::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.