Struct google_api_proto::google::cloud::dialogflow::cx::v3::Flow
source · pub struct Flow {
pub name: String,
pub display_name: String,
pub description: String,
pub transition_routes: Vec<TransitionRoute>,
pub event_handlers: Vec<EventHandler>,
pub transition_route_groups: Vec<String>,
pub nlu_settings: Option<NluSettings>,
pub advanced_settings: Option<AdvancedSettings>,
pub knowledge_connector_settings: Option<KnowledgeConnectorSettings>,
pub multi_language_settings: Option<MultiLanguageSettings>,
pub locked: bool,
}
Expand description
Flows represents the conversation flows when you build your chatbot agent.
A flow consists of many pages connected by the transition routes. Conversations always start with the built-in Start Flow (with an all-0 ID). Transition routes can direct the conversation session from the current flow (parent flow) to another flow (sub flow). When the sub flow is finished, Dialogflow will bring the session back to the parent flow, where the sub flow is started.
Usually, when a transition route is followed by a matched intent, the intent will be “consumed”. This means the intent won’t activate more transition routes. However, when the followed transition route moves the conversation session into a different flow, the matched intent can be carried over and to be consumed in the target flow.
Fields§
§name: String
The unique identifier of the flow.
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>
.
display_name: String
Required. The human-readable name of the flow.
description: String
The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected.
transition_routes: Vec<TransitionRoute>
A flow’s transition routes serve two purposes:
- They are responsible for matching the user’s first utterances in the flow.
- They are inherited by every page’s [transition routes][Page.transition_routes] and can support use cases such as the user saying “help” or “can I talk to a human?”, which can be handled in a common way regardless of the current page. Transition routes defined in the page have higher priority than those defined in the flow.
TransitionRoutes are evalauted in the following order:
- TransitionRoutes with intent specified.
- TransitionRoutes with only condition specified.
TransitionRoutes with intent specified are inherited by pages in the flow.
event_handlers: Vec<EventHandler>
A flow’s event handlers serve two purposes:
- They are responsible for handling events (e.g. no match, webhook errors) in the flow.
- They are inherited by every page’s [event handlers][Page.event_handlers], which can be used to handle common events regardless of the current page. Event handlers defined in the page have higher priority than those defined in the flow.
Unlike [transition_routes][google.cloud.dialogflow.cx.v3.Flow.transition_routes], these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored.
transition_route_groups: Vec<String>
A flow’s transition route group serve two purposes:
- They are responsible for matching the user’s first utterances in the flow.
- They are inherited by every page’s [transition route groups][Page.transition_route_groups]. Transition route groups defined in the page have higher priority than those defined in the flow.
Format:projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>
or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/transitionRouteGroups/<TransitionRouteGroup ID>
for agent-level
groups.
nlu_settings: Option<NluSettings>
NLU related settings of the flow.
advanced_settings: Option<AdvancedSettings>
Hierarchical advanced settings for this flow. The settings exposed at the lower level overrides the settings exposed at the higher level.
knowledge_connector_settings: Option<KnowledgeConnectorSettings>
Optional. Knowledge connector configuration.
multi_language_settings: Option<MultiLanguageSettings>
Optional. Multi-lingual agent settings for this flow.
locked: bool
Indicates whether the flow is locked for changes. If the flow is locked, modifications to the flow will be rejected.
Trait Implementations§
source§impl Message for Flow
impl Message for Flow
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Flow
impl PartialEq for Flow
impl StructuralPartialEq for Flow
Auto Trait Implementations§
impl Freeze for Flow
impl RefUnwindSafe for Flow
impl Send for Flow
impl Sync for Flow
impl Unpin for Flow
impl UnwindSafe for Flow
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request