/// Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. /// Settings exposed at lower level overrides the settings exposed at higher /// level. /// /// Hierarchy: Agent->Flow->Page->Fulfillment/Parameter. #[derive(Clone, PartialEq, ::prost::Message)] pub struct AdvancedSettings { /// Settings for logging. /// Settings for Dialogflow History, Contact Center messages, StackDriver logs, /// and speech logging. /// Exposed at the following levels: /// - Agent level. #[prost(message, optional, tag = "6")] pub logging_settings: ::core::option::Option, } /// Nested message and enum types in `AdvancedSettings`. pub mod advanced_settings { /// Define behaviors on logging. #[derive(Clone, PartialEq, ::prost::Message)] pub struct LoggingSettings { /// If true, StackDriver logging is currently enabled. #[prost(bool, tag = "2")] pub enable_stackdriver_logging: bool, /// If true, DF Interaction logging is currently enabled. #[prost(bool, tag = "3")] pub enable_interaction_logging: bool, } } /// Represents a response message that can be returned by a conversational agent. /// /// Response messages are also used for output audio synthesis. The approach is /// as follows: /// /// * If at least one OutputAudioText response is present, then all /// OutputAudioText responses are linearly concatenated, and the result is used /// for output audio synthesis. /// * If the OutputAudioText responses are a mixture of text and SSML, then the /// concatenated result is treated as SSML; otherwise, the result is treated as /// either text or SSML as appropriate. The agent designer should ideally use /// either text or SSML consistently throughout the bot design. /// * Otherwise, all Text responses are linearly concatenated, and the result is /// used for output audio synthesis. /// /// This approach allows for more sophisticated user experience scenarios, where /// the text displayed to the user may differ from what is heard. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResponseMessage { /// Required. The rich response message. #[prost(oneof = "response_message::Message", tags = "1, 2, 9, 8, 10, 11, 12, 13")] pub message: ::core::option::Option, } /// Nested message and enum types in `ResponseMessage`. pub mod response_message { /// The text response message. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Text { /// Required. A collection of text responses. #[prost(string, repeated, tag = "1")] pub text: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// Output only. Whether the playback of this message can be interrupted by the end /// user's speech and the client can then starts the next Dialogflow /// request. #[prost(bool, tag = "2")] pub allow_playback_interruption: bool, } /// Indicates that the conversation should be handed off to a live agent. /// /// Dialogflow only uses this to determine which conversations were handed off /// to a human agent for measurement purposes. What else to do with this signal /// is up to you and your handoff procedures. /// /// You may set this, for example: /// * In the \[entry_fulfillment][google.cloud.dialogflow.cx.v3beta1.Page.entry_fulfillment\] of a \[Page][google.cloud.dialogflow.cx.v3beta1.Page\] if /// entering the page indicates something went extremely wrong in the /// conversation. /// * In a webhook response when you determine that the customer issue can only /// be handled by a human. #[derive(Clone, PartialEq, ::prost::Message)] pub struct LiveAgentHandoff { /// Custom metadata for your handoff procedure. Dialogflow doesn't impose /// any structure on this. #[prost(message, optional, tag = "1")] pub metadata: ::core::option::Option<::prost_types::Struct>, } /// Indicates that the conversation succeeded, i.e., the bot handled the issue /// that the customer talked to it about. /// /// Dialogflow only uses this to determine which conversations should be /// counted as successful and doesn't process the metadata in this message in /// any way. Note that Dialogflow also considers conversations that get to the /// conversation end page as successful even if they don't return /// \[ConversationSuccess][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess\]. /// /// You may set this, for example: /// * In the \[entry_fulfillment][google.cloud.dialogflow.cx.v3beta1.Page.entry_fulfillment\] of a \[Page][google.cloud.dialogflow.cx.v3beta1.Page\] if /// entering the page indicates that the conversation succeeded. /// * In a webhook response when you determine that you handled the customer /// issue. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConversationSuccess { /// Custom metadata. Dialogflow doesn't impose any structure on this. #[prost(message, optional, tag = "1")] pub metadata: ::core::option::Option<::prost_types::Struct>, } /// A text or ssml response that is preferentially used for TTS output audio /// synthesis, as described in the comment on the ResponseMessage message. #[derive(Clone, PartialEq, ::prost::Message)] pub struct OutputAudioText { /// Output only. Whether the playback of this message can be interrupted by the end /// user's speech and the client can then starts the next Dialogflow /// request. #[prost(bool, tag = "3")] pub allow_playback_interruption: bool, /// The source, which is either plain text or SSML. #[prost(oneof = "output_audio_text::Source", tags = "1, 2")] pub source: ::core::option::Option, } /// Nested message and enum types in `OutputAudioText`. pub mod output_audio_text { /// The source, which is either plain text or SSML. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Source { /// The raw text to be synthesized. #[prost(string, tag = "1")] Text(::prost::alloc::string::String), /// The SSML text to be synthesized. For more information, see /// \[SSML\](/speech/text-to-speech/docs/ssml). #[prost(string, tag = "2")] Ssml(::prost::alloc::string::String), } } /// Indicates that interaction with the Dialogflow agent has ended. /// This message is generated by Dialogflow only and not supposed to be /// defined by the user. #[derive(Clone, PartialEq, ::prost::Message)] pub struct EndInteraction {} /// Specifies an audio clip to be played by the client as part of the response. #[derive(Clone, PartialEq, ::prost::Message)] pub struct PlayAudio { /// Required. URI of the audio clip. Dialogflow does not impose any validation on this /// value. It is specific to the client that reads it. #[prost(string, tag = "1")] pub audio_uri: ::prost::alloc::string::String, /// Output only. Whether the playback of this message can be interrupted by the end /// user's speech and the client can then starts the next Dialogflow /// request. #[prost(bool, tag = "2")] pub allow_playback_interruption: bool, } /// Represents an audio message that is composed of both segments /// synthesized from the Dialogflow agent prompts and ones hosted externally /// at the specified URIs. /// The external URIs are specified via /// \[play_audio][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.play_audio\]. /// This message is generated by Dialogflow only and not supposed to be /// defined by the user. #[derive(Clone, PartialEq, ::prost::Message)] pub struct MixedAudio { /// Segments this audio response is composed of. #[prost(message, repeated, tag = "1")] pub segments: ::prost::alloc::vec::Vec, } /// Nested message and enum types in `MixedAudio`. pub mod mixed_audio { /// Represents one segment of audio. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Segment { /// Output only. Whether the playback of this segment can be interrupted by the end /// user's speech and the client should then start the next Dialogflow /// request. #[prost(bool, tag = "3")] pub allow_playback_interruption: bool, /// Content of the segment. #[prost(oneof = "segment::Content", tags = "1, 2")] pub content: ::core::option::Option, } /// Nested message and enum types in `Segment`. pub mod segment { /// Content of the segment. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Content { /// Raw audio synthesized from the Dialogflow agent's response using /// the output config specified in the request. #[prost(bytes, tag = "1")] Audio(::prost::alloc::vec::Vec), /// Client-specific URI that points to an audio clip accessible to the /// client. Dialogflow does not impose any validation on it. #[prost(string, tag = "2")] Uri(::prost::alloc::string::String), } } } /// Required. The rich response message. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Message { /// Returns a text response. #[prost(message, tag = "1")] Text(Text), /// Returns a response containing a custom, platform-specific payload. #[prost(message, tag = "2")] Payload(::prost_types::Struct), /// Indicates that the conversation succeeded. #[prost(message, tag = "9")] ConversationSuccess(ConversationSuccess), /// A text or ssml response that is preferentially used for TTS output audio /// synthesis, as described in the comment on the ResponseMessage message. #[prost(message, tag = "8")] OutputAudioText(OutputAudioText), /// Hands off conversation to a human agent. #[prost(message, tag = "10")] LiveAgentHandoff(LiveAgentHandoff), /// Output only. A signal that indicates the interaction with the Dialogflow agent has /// ended. /// This message is generated by Dialogflow only when the conversation /// reaches `END_SESSION` page. It is not supposed to be defined by the user. /// /// It's guaranteed that there is at most one such message in each response. #[prost(message, tag = "11")] EndInteraction(EndInteraction), /// Signal that the client should play an audio clip hosted at a /// client-specific URI. Dialogflow uses this to construct /// \[mixed_audio][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.mixed_audio\]. However, Dialogflow itself /// does not try to read or process the URI in any way. #[prost(message, tag = "12")] PlayAudio(PlayAudio), /// Output only. An audio response message composed of both the synthesized Dialogflow /// agent responses and responses defined via /// \[play_audio][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.play_audio\]. /// This message is generated by Dialogflow only and not supposed to be /// defined by the user. #[prost(message, tag = "13")] MixedAudio(MixedAudio), } } /// A fulfillment can do one or more of the following actions at the same time: /// /// * Generate rich message responses. /// * Set parameter values. /// * Call the webhook. /// /// Fulfillments can be called at various stages in the \[Page][google.cloud.dialogflow.cx.v3beta1.Page\] or /// \[Form][google.cloud.dialogflow.cx.v3beta1.Form\] lifecycle. For example, when a \[DetectIntentRequest][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest\] drives a /// session to enter a new page, the page's entry fulfillment can add a static /// response to the \[QueryResult][google.cloud.dialogflow.cx.v3beta1.QueryResult\] in the returning \[DetectIntentResponse][google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse\], /// call the webhook (for example, to load user data from a database), or both. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Fulfillment { /// The list of rich message responses to present to the user. #[prost(message, repeated, tag = "1")] pub messages: ::prost::alloc::vec::Vec, /// The webhook to call. /// Format: `projects//locations//agents//webhooks/`. #[prost(string, tag = "2")] pub webhook: ::prost::alloc::string::String, /// Whether Dialogflow should return currently queued fulfillment response /// messages in streaming APIs. If a webhook is specified, it happens before /// Dialogflow invokes webhook. /// Warning: /// 1) This flag only affects streaming API. Responses are still queued /// and returned once in non-streaming API. /// 2) The flag can be enabled in any fulfillment but only the first 3 partial /// responses will be returned. You may only want to apply it to fulfillments /// that have slow webhooks. #[prost(bool, tag = "8")] pub return_partial_responses: bool, /// The tag used by the webhook to identify which fulfillment is being called. /// This field is required if `webhook` is specified. #[prost(string, tag = "3")] pub tag: ::prost::alloc::string::String, /// Set parameter values before executing the webhook. #[prost(message, repeated, tag = "4")] pub set_parameter_actions: ::prost::alloc::vec::Vec, /// Conditional cases for this fulfillment. #[prost(message, repeated, tag = "5")] pub conditional_cases: ::prost::alloc::vec::Vec, } /// Nested message and enum types in `Fulfillment`. pub mod fulfillment { /// Setting a parameter value. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetParameterAction { /// Display name of the parameter. #[prost(string, tag = "1")] pub parameter: ::prost::alloc::string::String, /// The new value of the parameter. A null value clears the parameter. #[prost(message, optional, tag = "2")] pub value: ::core::option::Option<::prost_types::Value>, } /// A list of cascading if-else conditions. Cases are mutually exclusive. /// The first one with a matching condition is selected, all the rest ignored. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConditionalCases { /// A list of cascading if-else conditions. #[prost(message, repeated, tag = "1")] pub cases: ::prost::alloc::vec::Vec, } /// Nested message and enum types in `ConditionalCases`. pub mod conditional_cases { /// Each case has a Boolean condition. When it is evaluated to be True, the /// corresponding messages will be selected and evaluated recursively. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Case { /// The condition to activate and select this case. Empty means the /// condition is always true. The condition is evaluated against [form /// parameters]\[Form.parameters\] or [session /// parameters]\[SessionInfo.parameters\]. /// /// See the [conditions /// reference](). #[prost(string, tag = "1")] pub condition: ::prost::alloc::string::String, /// A list of case content. #[prost(message, repeated, tag = "2")] pub case_content: ::prost::alloc::vec::Vec, } /// Nested message and enum types in `Case`. pub mod case { /// The list of messages or conditional cases to activate for this case. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CaseContent { /// Either a message is returned or additional cases to be evaluated. #[prost(oneof = "case_content::CasesOrMessage", tags = "1, 2")] pub cases_or_message: ::core::option::Option, } /// Nested message and enum types in `CaseContent`. pub mod case_content { /// Either a message is returned or additional cases to be evaluated. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum CasesOrMessage { /// Returned message. #[prost(message, tag = "1")] Message(super::super::super::super::ResponseMessage), /// Additional cases to be evaluated. #[prost(message, tag = "2")] AdditionalCases(super::super::super::ConditionalCases), } } } } } /// A Dialogflow CX conversation (session) can be described and visualized as a /// state machine. The states of a CX session are represented by pages. /// /// For each flow, you define many pages, where your combined pages can handle a /// complete conversation on the topics the flow is designed for. At any given /// moment, exactly one page is the current page, the current page is considered /// active, and the flow associated with that page is considered active. Every /// flow has a special start page. When a flow initially becomes active, the /// start page page becomes the current page. For each conversational turn, the /// current page will either stay the same or transition to another page. /// /// You configure each page to collect information from the end-user that is /// relevant for the conversational state represented by the page. /// /// For more information, see the /// [Page guide](). #[derive(Clone, PartialEq, ::prost::Message)] pub struct Page { /// The unique identifier of the page. /// Required for the \[Pages.UpdatePage][google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePage\] method. \[Pages.CreatePage][google.cloud.dialogflow.cx.v3beta1.Pages.CreatePage\] /// populates the name automatically. /// Format: `projects//locations//agents//flows//pages/`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// Required. The human-readable name of the page, unique within the agent. #[prost(string, tag = "2")] pub display_name: ::prost::alloc::string::String, /// The fulfillment to call when the session is entering the page. #[prost(message, optional, tag = "7")] pub entry_fulfillment: ::core::option::Option, /// The form associated with the page, used for collecting parameters /// relevant to the page. #[prost(message, optional, tag = "4")] pub form: ::core::option::Option
, /// Ordered list of \[`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup\] associated /// with the page. Transition route groups must be unique within a page. /// /// * If multiple transition routes within a page scope refer to the same /// intent, then the precedence order is: page's transition route -> page's /// transition route group -> flow's transition routes. /// /// * If multiple transition route groups within a page contain the same /// intent, then the first group in the ordered list takes precedence. /// /// Format:`projects//locations//agents//flows//transitionRouteGroups/`. #[prost(string, repeated, tag = "11")] pub transition_route_groups: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// A list of transitions for the transition rules of this page. /// They route the conversation to another page in the same flow, or another /// flow. /// /// When we are in a certain page, the TransitionRoutes are evalauted in the /// following order: /// /// * TransitionRoutes defined in the page with intent specified. /// * TransitionRoutes defined in the /// [transition route groups]\[google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups\] with intent /// specified. /// * TransitionRoutes defined in flow with intent specified. /// * TransitionRoutes defined in the /// [transition route groups]\[google.cloud.dialogflow.cx.v3beta1.Flow.transition_route_groups\] with intent /// specified. /// * TransitionRoutes defined in the page with only condition specified. /// * TransitionRoutes defined in the /// [transition route groups]\[google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups\] with only /// condition specified. #[prost(message, repeated, tag = "9")] pub transition_routes: ::prost::alloc::vec::Vec, /// Handlers associated with the page to handle events such as webhook errors, /// no match or no input. #[prost(message, repeated, tag = "10")] pub event_handlers: ::prost::alloc::vec::Vec, } /// A form is a data model that groups related parameters that can be collected /// from the user. The process in which the agent prompts the user and collects /// parameter values from the user is called form filling. A form can be added to /// a \[page][google.cloud.dialogflow.cx.v3beta1.Page\]. When form filling is done, the filled parameters will be /// written to the \[session][google.cloud.dialogflow.cx.v3beta1.SessionInfo.parameters\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Form { /// Parameters to collect from the user. #[prost(message, repeated, tag = "1")] pub parameters: ::prost::alloc::vec::Vec, } /// Nested message and enum types in `Form`. pub mod form { /// Represents a form parameter. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Parameter { /// Required. The human-readable name of the parameter, unique within the /// form. #[prost(string, tag = "1")] pub display_name: ::prost::alloc::string::String, /// Indicates whether the parameter is required. Optional parameters will not /// trigger prompts; however, they are filled if the user specifies them. /// Required parameters must be filled before form filling concludes. #[prost(bool, tag = "2")] pub required: bool, /// Required. The entity type of the parameter. /// Format: `projects/-/locations/-/agents/-/entityTypes/` for system entity types (for example, /// `projects/-/locations/-/agents/-/entityTypes/sys.date`), or /// `projects//locations//agents//entityTypes/` for developer entity types. #[prost(string, tag = "3")] pub entity_type: ::prost::alloc::string::String, /// Indicates whether the parameter represents a list of values. #[prost(bool, tag = "4")] pub is_list: bool, /// Required. Defines fill behavior for the parameter. #[prost(message, optional, tag = "7")] pub fill_behavior: ::core::option::Option, /// The default value of an optional parameter. If the parameter is required, /// the default value will be ignored. #[prost(message, optional, tag = "9")] pub default_value: ::core::option::Option<::prost_types::Value>, /// Indicates whether the parameter content should be redacted in log. If /// redaction is enabled, the parameter content will be replaced by parameter /// name during logging. /// Note: the parameter content is subject to redaction if either parameter /// level redaction or [entity type level redaction]\[google.cloud.dialogflow.cx.v3beta1.EntityType.redact\] is /// enabled. #[prost(bool, tag = "11")] pub redact: bool, } /// Nested message and enum types in `Parameter`. pub mod parameter { /// Configuration for how the filling of a parameter should be handled. #[derive(Clone, PartialEq, ::prost::Message)] pub struct FillBehavior { /// Required. The fulfillment to provide the initial prompt that the agent /// can present to the user in order to fill the parameter. #[prost(message, optional, tag = "3")] pub initial_prompt_fulfillment: ::core::option::Option, /// The handlers for parameter-level events, used to provide reprompt for /// the parameter or transition to a different page/flow. The supported /// events are: /// * `sys.no-match-`, where N can be from 1 to 6 /// * `sys.no-match-default` /// * `sys.no-input-`, where N can be from 1 to 6 /// * `sys.no-input-default` /// * `sys.invalid-parameter` /// /// `initial_prompt_fulfillment` provides the first prompt for the /// parameter. /// /// If the user's response does not fill the parameter, a /// no-match/no-input event will be triggered, and the fulfillment /// associated with the `sys.no-match-1`/`sys.no-input-1` handler (if /// defined) will be called to provide a prompt. The /// `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond to /// the next no-match/no-input event, and so on. /// /// A `sys.no-match-default` or `sys.no-input-default` handler will be used /// to handle all following no-match/no-input events after all numbered /// no-match/no-input handlers for the parameter are consumed. /// /// A `sys.invalid-parameter` handler can be defined to handle the case /// where the parameter values have been `invalidated` by webhook. For /// example, if the user's response fill the parameter, however the /// parameter was invalidated by webhook, the fulfillment associated with /// the `sys.invalid-parameter` handler (if defined) will be called to /// provide a prompt. /// /// If the event handler for the corresponding event can't be found on the /// parameter, `initial_prompt_fulfillment` will be re-prompted. #[prost(message, repeated, tag = "5")] pub reprompt_event_handlers: ::prost::alloc::vec::Vec, } } } /// An event handler specifies an \[event][google.cloud.dialogflow.cx.v3beta1.EventHandler.event\] that can be handled /// during a session. When the specified event happens, the following actions are /// taken in order: /// /// * If there is a /// \[`trigger_fulfillment`][google.cloud.dialogflow.cx.v3beta1.EventHandler.trigger_fulfillment\] associated with /// the event, it will be called. /// * If there is a \[`target_page`][google.cloud.dialogflow.cx.v3beta1.EventHandler.target_page\] associated /// with the event, the session will transition into the specified page. /// * If there is a \[`target_flow`][google.cloud.dialogflow.cx.v3beta1.EventHandler.target_flow\] associated /// with the event, the session will transition into the specified flow. #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventHandler { /// Output only. The unique identifier of this event handler. #[prost(string, tag = "6")] pub name: ::prost::alloc::string::String, /// Required. The name of the event to handle. #[prost(string, tag = "4")] pub event: ::prost::alloc::string::String, /// The fulfillment to call when the event occurs. /// Handling webhook errors with a fulfillment enabled with webhook could /// cause infinite loop. It is invalid to specify such fulfillment for a /// handler handling webhooks. #[prost(message, optional, tag = "5")] pub trigger_fulfillment: ::core::option::Option, /// The target to transition to, either a page in the same host flow (the flow /// that owns this \[TransitionRoute][google.cloud.dialogflow.cx.v3beta1.TransitionRoute\]), or another flow in the same agent. #[prost(oneof = "event_handler::Target", tags = "2, 3")] pub target: ::core::option::Option, } /// Nested message and enum types in `EventHandler`. pub mod event_handler { /// The target to transition to, either a page in the same host flow (the flow /// that owns this \[TransitionRoute][google.cloud.dialogflow.cx.v3beta1.TransitionRoute\]), or another flow in the same agent. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Target { /// The target page to transition to. /// Format: `projects//locations//agents//flows//pages/`. #[prost(string, tag = "2")] TargetPage(::prost::alloc::string::String), /// The target flow to transition to. /// Format: `projects//locations//agents//flows/`. #[prost(string, tag = "3")] TargetFlow(::prost::alloc::string::String), } } /// A transition route specifies a \[intent][google.cloud.dialogflow.cx.v3beta1.Intent\] that can be matched and/or a /// data condition that can be evaluated during a session. When a specified /// transition is matched, the following actions are taken in order: /// /// * If there is a /// \[`trigger_fulfillment`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.trigger_fulfillment\] associated with /// the transition, it will be called. /// * If there is a \[`target_page`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.target_page\] associated /// with the transition, the session will transition into the specified page. /// * If there is a \[`target_flow`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.target_flow\] associated /// with the transition, the session will transition into the specified flow. #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransitionRoute { /// Output only. The unique identifier of this transition route. #[prost(string, tag = "6")] pub name: ::prost::alloc::string::String, /// The unique identifier of an \[Intent][google.cloud.dialogflow.cx.v3beta1.Intent\]. /// Format: `projects//locations//agents//intents/`. /// Indicates that the transition can only happen when the given intent is /// matched. /// At least one of `intent` or `condition` must be specified. When both /// `intent` and `condition` are specified, the transition can only happen /// when both are fulfilled. #[prost(string, tag = "1")] pub intent: ::prost::alloc::string::String, /// The condition to evaluate against [form parameters]\[google.cloud.dialogflow.cx.v3beta1.Form.parameters\] or /// [session parameters]\[google.cloud.dialogflow.cx.v3beta1.SessionInfo.parameters\]. /// /// See the [conditions /// reference](). /// At least one of `intent` or `condition` must be specified. When both /// `intent` and `condition` are specified, the transition can only happen /// when both are fulfilled. #[prost(string, tag = "2")] pub condition: ::prost::alloc::string::String, /// The fulfillment to call when the condition is satisfied. At least one of /// `trigger_fulfillment` and `target` must be specified. When both are /// defined, `trigger_fulfillment` is executed first. #[prost(message, optional, tag = "3")] pub trigger_fulfillment: ::core::option::Option, /// The target to transition to, either a page in the same host flow (the flow /// that owns this \[TransitionRoute][google.cloud.dialogflow.cx.v3beta1.TransitionRoute\]), or another flow in the same agent. #[prost(oneof = "transition_route::Target", tags = "4, 5")] pub target: ::core::option::Option, } /// Nested message and enum types in `TransitionRoute`. pub mod transition_route { /// The target to transition to, either a page in the same host flow (the flow /// that owns this \[TransitionRoute][google.cloud.dialogflow.cx.v3beta1.TransitionRoute\]), or another flow in the same agent. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Target { /// The target page to transition to. /// Format: `projects//locations//agents//flows//pages/`. #[prost(string, tag = "4")] TargetPage(::prost::alloc::string::String), /// The target flow to transition to. /// Format: `projects//locations//agents//flows/`. #[prost(string, tag = "5")] TargetFlow(::prost::alloc::string::String), } } /// The request message for \[Pages.ListPages][google.cloud.dialogflow.cx.v3beta1.Pages.ListPages\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListPagesRequest { /// Required. The flow to list all pages for. /// Format: `projects//locations//agents//flows/`. #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, /// The language to list pages for. The following fields are language /// dependent: /// /// * `Page.entry_fulfillment.messages` /// * `Page.entry_fulfillment.conditional_cases` /// * `Page.event_handlers.trigger_fulfillment.messages` /// * `Page.event_handlers.trigger_fulfillment.conditional_cases` /// * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` /// * /// `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` /// * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` /// * /// `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` /// * `Page.transition_routes.trigger_fulfillment.messages` /// * `Page.transition_routes.trigger_fulfillment.conditional_cases` /// /// If not specified, the agent's default language is used. /// [Many /// languages]() /// are supported. /// Note: languages must be enabled in the agent before they can be used. #[prost(string, tag = "2")] pub language_code: ::prost::alloc::string::String, /// The maximum number of items to return in a single page. By default 100 and /// at most 1000. #[prost(int32, tag = "3")] pub page_size: i32, /// The next_page_token value returned from a previous list request. #[prost(string, tag = "4")] pub page_token: ::prost::alloc::string::String, } /// The response message for \[Pages.ListPages][google.cloud.dialogflow.cx.v3beta1.Pages.ListPages\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListPagesResponse { /// The list of pages. There will be a maximum number of items returned based /// on the page_size field in the request. #[prost(message, repeated, tag = "1")] pub pages: ::prost::alloc::vec::Vec, /// Token to retrieve the next page of results, or empty if there are no more /// results in the list. #[prost(string, tag = "2")] pub next_page_token: ::prost::alloc::string::String, } /// The request message for \[Pages.GetPage][google.cloud.dialogflow.cx.v3beta1.Pages.GetPage\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetPageRequest { /// Required. The name of the page. /// Format: `projects//locations//agents//flows//pages/`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// The language to retrieve the page for. The following fields are language /// dependent: /// /// * `Page.entry_fulfillment.messages` /// * `Page.entry_fulfillment.conditional_cases` /// * `Page.event_handlers.trigger_fulfillment.messages` /// * `Page.event_handlers.trigger_fulfillment.conditional_cases` /// * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` /// * /// `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` /// * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` /// * /// `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` /// * `Page.transition_routes.trigger_fulfillment.messages` /// * `Page.transition_routes.trigger_fulfillment.conditional_cases` /// /// If not specified, the agent's default language is used. /// [Many /// languages]() /// are supported. /// Note: languages must be enabled in the agent before they can be used. #[prost(string, tag = "2")] pub language_code: ::prost::alloc::string::String, } /// The request message for \[Pages.CreatePage][google.cloud.dialogflow.cx.v3beta1.Pages.CreatePage\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreatePageRequest { /// Required. The flow to create a page for. /// Format: `projects//locations//agents//flows/`. #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, /// Required. The page to create. #[prost(message, optional, tag = "2")] pub page: ::core::option::Option, /// The language of the following fields in `page`: /// /// * `Page.entry_fulfillment.messages` /// * `Page.entry_fulfillment.conditional_cases` /// * `Page.event_handlers.trigger_fulfillment.messages` /// * `Page.event_handlers.trigger_fulfillment.conditional_cases` /// * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` /// * /// `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` /// * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` /// * /// `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` /// * `Page.transition_routes.trigger_fulfillment.messages` /// * `Page.transition_routes.trigger_fulfillment.conditional_cases` /// /// If not specified, the agent's default language is used. /// [Many /// languages]() /// are supported. /// Note: languages must be enabled in the agent before they can be used. #[prost(string, tag = "3")] pub language_code: ::prost::alloc::string::String, } /// The request message for \[Pages.UpdatePage][google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePage\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdatePageRequest { /// Required. The page to update. #[prost(message, optional, tag = "1")] pub page: ::core::option::Option, /// The language of the following fields in `page`: /// /// * `Page.entry_fulfillment.messages` /// * `Page.entry_fulfillment.conditional_cases` /// * `Page.event_handlers.trigger_fulfillment.messages` /// * `Page.event_handlers.trigger_fulfillment.conditional_cases` /// * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` /// * /// `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` /// * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` /// * /// `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` /// * `Page.transition_routes.trigger_fulfillment.messages` /// * `Page.transition_routes.trigger_fulfillment.conditional_cases` /// /// If not specified, the agent's default language is used. /// [Many /// languages]() /// are supported. /// Note: languages must be enabled in the agent before they can be used. #[prost(string, tag = "2")] pub language_code: ::prost::alloc::string::String, /// The mask to control which fields get updated. If the mask is not present, /// all fields will be updated. #[prost(message, optional, tag = "3")] pub update_mask: ::core::option::Option<::prost_types::FieldMask>, } /// The request message for \[Pages.DeletePage][google.cloud.dialogflow.cx.v3beta1.Pages.DeletePage\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeletePageRequest { /// Required. The name of the page to delete. /// Format: `projects//locations//agents//Flows//pages/`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// This field has no effect for pages with no incoming transitions. /// For pages with incoming transitions: /// /// * If `force` is set to false, an error will be returned with message /// indicating the incoming transitions. /// * If `force` is set to true, Dialogflow will remove the page, as well as /// any transitions to the page (i.e. [Target /// page]\[EventHandler.target_page\] in event handlers or [Target /// page]\[TransitionRoute.target_page\] in transition routes that point to /// this page will be cleared). #[prost(bool, tag = "2")] pub force: bool, } #[doc = r" Generated client implementations."] pub mod pages_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; #[doc = " Service for managing [Pages][google.cloud.dialogflow.cx.v3beta1.Page]."] #[derive(Debug, Clone)] pub struct PagesClient { inner: tonic::client::Grpc, } impl PagesClient where T: tonic::client::GrpcService, T::ResponseBody: Body + Send + 'static, T::Error: Into, ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_interceptor( inner: T, interceptor: F, ) -> PagesClient> where F: tonic::service::Interceptor, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, >>::Error: Into + Send + Sync, { PagesClient::new(InterceptedService::new(inner, interceptor)) } #[doc = r" Compress requests with `gzip`."] #[doc = r""] #[doc = r" This requires the server to support it otherwise it might respond with an"] #[doc = r" error."] pub fn send_gzip(mut self) -> Self { self.inner = self.inner.send_gzip(); self } #[doc = r" Enable decompressing responses with `gzip`."] pub fn accept_gzip(mut self) -> Self { self.inner = self.inner.accept_gzip(); self } #[doc = " Returns the list of all pages in the specified flow."] pub async fn list_pages( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Pages/ListPages", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Retrieves the specified page."] pub async fn get_page( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Pages/GetPage", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Creates a page in the specified flow."] pub async fn create_page( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Pages/CreatePage", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Updates the specified page."] pub async fn update_page( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Pages/UpdatePage", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Deletes the specified page."] pub async fn delete_page( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Pages/DeletePage", ); self.inner.unary(request.into_request(), path, codec).await } } } /// Agent/flow validation message. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidationMessage { /// The type of the resources where the message is found. #[prost(enumeration = "validation_message::ResourceType", tag = "1")] pub resource_type: i32, /// The names of the resources where the message is found. #[deprecated] #[prost(string, repeated, tag = "2")] pub resources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// The resource names of the resources where the message is found. #[prost(message, repeated, tag = "6")] pub resource_names: ::prost::alloc::vec::Vec, /// Indicates the severity of the message. #[prost(enumeration = "validation_message::Severity", tag = "3")] pub severity: i32, /// The message detail. #[prost(string, tag = "4")] pub detail: ::prost::alloc::string::String, } /// Nested message and enum types in `ValidationMessage`. pub mod validation_message { /// Resource types. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ResourceType { /// Unspecified. Unspecified = 0, /// Agent. Agent = 1, /// Intent. Intent = 2, /// Intent training phrase. IntentTrainingPhrase = 8, /// Intent parameter. IntentParameter = 9, /// Multiple intents. Intents = 10, /// Multiple training phrases. IntentTrainingPhrases = 11, /// Entity type. EntityType = 3, /// Multiple entity types. EntityTypes = 12, /// Webhook. Webhook = 4, /// Flow. Flow = 5, /// Page. Page = 6, /// Multiple pages. Pages = 13, /// Transition route group. TransitionRouteGroup = 7, } /// Severity level. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum Severity { /// Unspecified. Unspecified = 0, /// The agent doesn't follow Dialogflow best practices. Info = 1, /// The agent may not behave as expected. Warning = 2, /// The agent may experience failures. Error = 3, } } /// Resource name and display name. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResourceName { /// Name. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// Display name. #[prost(string, tag = "2")] pub display_name: ::prost::alloc::string::String, } /// Settings related to NLU. #[derive(Clone, PartialEq, ::prost::Message)] pub struct NluSettings { /// Indicates the type of NLU model. #[prost(enumeration = "nlu_settings::ModelType", tag = "1")] pub model_type: i32, /// To filter out false positive results and still get variety in matched /// natural language inputs for your agent, you can tune the machine learning /// classification threshold. If the returned score value is less than the /// threshold value, then a no-match event will be triggered. The score values /// range from 0.0 (completely uncertain) to 1.0 (completely certain). If set /// to 0.0, the default of 0.3 is used. #[prost(float, tag = "3")] pub classification_threshold: f32, /// Indicates NLU model training mode. #[prost(enumeration = "nlu_settings::ModelTrainingMode", tag = "4")] pub model_training_mode: i32, } /// Nested message and enum types in `NluSettings`. pub mod nlu_settings { /// NLU model type. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ModelType { /// Not specified. `MODEL_TYPE_STANDARD` will be used. Unspecified = 0, /// Use standard NLU model. Standard = 1, /// Use advanced NLU model. Advanced = 3, } /// NLU model training mode. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ModelTrainingMode { /// Not specified. `MODEL_TRAINING_MODE_AUTOMATIC` will be used. Unspecified = 0, /// NLU model training is automatically triggered when a flow gets modified. /// User can also manually trigger model training in this mode. Automatic = 1, /// User needs to manually trigger NLU model training. Best for large flows /// whose models take long time to train. Manual = 2, } } /// 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. #[derive(Clone, PartialEq, ::prost::Message)] pub struct Flow { /// The unique identifier of the flow. /// Format: `projects//locations//agents//flows/`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// Required. The human-readable name of the flow. #[prost(string, tag = "2")] pub display_name: ::prost::alloc::string::String, /// The description of the flow. The maximum length is 500 characters. If /// exceeded, the request is rejected. #[prost(string, tag = "3")] pub description: ::prost::alloc::string::String, /// 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. #[prost(message, repeated, tag = "4")] pub transition_routes: ::prost::alloc::vec::Vec, /// 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.v3beta1.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. #[prost(message, repeated, tag = "10")] pub event_handlers: ::prost::alloc::vec::Vec, /// 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//locations//agents//flows//transitionRouteGroups/`. #[prost(string, repeated, tag = "15")] pub transition_route_groups: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// NLU related settings of the flow. #[prost(message, optional, tag = "11")] pub nlu_settings: ::core::option::Option, } /// The request message for \[Flows.CreateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlow\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateFlowRequest { /// Required. The agent to create a flow for. /// Format: `projects//locations//agents/`. #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, /// Required. The flow to create. #[prost(message, optional, tag = "2")] pub flow: ::core::option::Option, /// The language of the following fields in `flow`: /// /// * `Flow.event_handlers.trigger_fulfillment.messages` /// * `Flow.event_handlers.trigger_fulfillment.conditional_cases` /// * `Flow.transition_routes.trigger_fulfillment.messages` /// * `Flow.transition_routes.trigger_fulfillment.conditional_cases` /// /// If not specified, the agent's default language is used. /// [Many /// languages]() /// are supported. /// Note: languages must be enabled in the agent before they can be used. #[prost(string, tag = "3")] pub language_code: ::prost::alloc::string::String, } /// The request message for \[Flows.DeleteFlow][google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlow\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteFlowRequest { /// Required. The name of the flow to delete. /// Format: `projects//locations//agents//flows/`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// This field has no effect for flows with no incoming transitions. /// For flows with incoming transitions: /// /// * If `force` is set to false, an error will be returned with message /// indicating the incoming transitions. /// * If `force` is set to true, Dialogflow will remove the flow, as well as /// any transitions to the flow (i.e. [Target /// flow]\[EventHandler.target_flow\] in event handlers or [Target /// flow]\[TransitionRoute.target_flow\] in transition routes that point to /// this flow will be cleared). #[prost(bool, tag = "2")] pub force: bool, } /// The request message for \[Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListFlowsRequest { /// Required. The agent containing the flows. /// Format: `projects//locations//agents/`. #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, /// The maximum number of items to return in a single page. By default 100 and /// at most 1000. #[prost(int32, tag = "2")] pub page_size: i32, /// The next_page_token value returned from a previous list request. #[prost(string, tag = "3")] pub page_token: ::prost::alloc::string::String, /// The language to list flows for. The following fields are language /// dependent: /// /// * `Flow.event_handlers.trigger_fulfillment.messages` /// * `Flow.event_handlers.trigger_fulfillment.conditional_cases` /// * `Flow.transition_routes.trigger_fulfillment.messages` /// * `Flow.transition_routes.trigger_fulfillment.conditional_cases` /// /// If not specified, the agent's default language is used. /// [Many /// languages]() /// are supported. /// Note: languages must be enabled in the agent before they can be used. #[prost(string, tag = "4")] pub language_code: ::prost::alloc::string::String, } /// The response message for \[Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListFlowsResponse { /// The list of flows. There will be a maximum number of items returned based /// on the page_size field in the request. #[prost(message, repeated, tag = "1")] pub flows: ::prost::alloc::vec::Vec, /// Token to retrieve the next page of results, or empty if there are no more /// results in the list. #[prost(string, tag = "2")] pub next_page_token: ::prost::alloc::string::String, } /// The response message for \[Flows.GetFlow][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlow\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetFlowRequest { /// Required. The name of the flow to get. /// Format: `projects//locations//agents//flows/`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// The language to retrieve the flow for. The following fields are language /// dependent: /// /// * `Flow.event_handlers.trigger_fulfillment.messages` /// * `Flow.event_handlers.trigger_fulfillment.conditional_cases` /// * `Flow.transition_routes.trigger_fulfillment.messages` /// * `Flow.transition_routes.trigger_fulfillment.conditional_cases` /// /// If not specified, the agent's default language is used. /// [Many /// languages]() /// are supported. /// Note: languages must be enabled in the agent before they can be used. #[prost(string, tag = "2")] pub language_code: ::prost::alloc::string::String, } /// The request message for \[Flows.UpdateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlow\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateFlowRequest { /// Required. The flow to update. #[prost(message, optional, tag = "1")] pub flow: ::core::option::Option, /// The mask to control which fields get updated. If the mask is not present, /// all fields will be updated. #[prost(message, optional, tag = "2")] pub update_mask: ::core::option::Option<::prost_types::FieldMask>, /// The language of the following fields in `flow`: /// /// * `Flow.event_handlers.trigger_fulfillment.messages` /// * `Flow.event_handlers.trigger_fulfillment.conditional_cases` /// * `Flow.transition_routes.trigger_fulfillment.messages` /// * `Flow.transition_routes.trigger_fulfillment.conditional_cases` /// /// If not specified, the agent's default language is used. /// [Many /// languages]() /// are supported. /// Note: languages must be enabled in the agent before they can be used. #[prost(string, tag = "3")] pub language_code: ::prost::alloc::string::String, } /// The request message for \[Flows.TrainFlow][google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlow\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrainFlowRequest { /// Required. The flow to train. /// Format: `projects//locations//agents//flows/`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } /// The request message for \[Flows.ValidateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlow\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidateFlowRequest { /// Required. The flow to validate. /// Format: `projects//locations//agents//flows/`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// If not specified, the agent's default language is used. #[prost(string, tag = "2")] pub language_code: ::prost::alloc::string::String, } /// The request message for \[Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetFlowValidationResultRequest { /// Required. The flow name. /// Format: `projects//locations//agents//flows//validationResult`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// If not specified, the agent's default language is used. #[prost(string, tag = "2")] pub language_code: ::prost::alloc::string::String, } /// The response message for \[Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct FlowValidationResult { /// The unique identifier of the flow validation result. /// Format: `projects//locations//agents//flows//validationResult`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// Contains all validation messages. #[prost(message, repeated, tag = "2")] pub validation_messages: ::prost::alloc::vec::Vec, /// Last time the flow was validated. #[prost(message, optional, tag = "3")] pub update_time: ::core::option::Option<::prost_types::Timestamp>, } /// The request message for \[Flows.ImportFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlow\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImportFlowRequest { /// Required. The agent to import the flow into. /// Format: `projects//locations//agents/`. #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, /// Flow import mode. If not specified, `KEEP` is assumed. #[prost(enumeration = "import_flow_request::ImportOption", tag = "4")] pub import_option: i32, /// Required. The flow to import. #[prost(oneof = "import_flow_request::Flow", tags = "2, 3")] pub flow: ::core::option::Option, } /// Nested message and enum types in `ImportFlowRequest`. pub mod import_flow_request { /// Import option. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ImportOption { /// Unspecified. Treated as `KEEP`. Unspecified = 0, /// Always respect settings in exported flow content. It may cause a /// import failure if some settings (e.g. custom NLU) are not supported in /// the agent to import into. Keep = 1, /// Fallback to default settings if some settings are not supported in the /// agent to import into. E.g. Standard NLU will be used if custom NLU is /// not available. Fallback = 2, } /// Required. The flow to import. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Flow { /// The [Google Cloud Storage]() URI /// to import flow from. The format of this URI must be /// `gs:///`. #[prost(string, tag = "2")] FlowUri(::prost::alloc::string::String), /// Uncompressed raw byte content for flow. #[prost(bytes, tag = "3")] FlowContent(::prost::alloc::vec::Vec), } } /// The response message for \[Flows.ImportFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlow\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImportFlowResponse { /// The unique identifier of the new flow. /// Format: `projects//locations//agents//flows/`. #[prost(string, tag = "1")] pub flow: ::prost::alloc::string::String, } /// The request message for \[Flows.ExportFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlow\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportFlowRequest { /// Required. The name of the flow to export. /// Format: `projects//locations//agents//flows/`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// Optional. The [Google Cloud Storage]() URI to /// export the flow to. The format of this URI must be /// `gs:///`. /// If left unspecified, the serialized flow is returned inline. #[prost(string, tag = "2")] pub flow_uri: ::prost::alloc::string::String, /// Optional. Whether to export flows referenced by the specified flow. #[prost(bool, tag = "4")] pub include_referenced_flows: bool, } /// The response message for \[Flows.ExportFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlow\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExportFlowResponse { /// The exported flow. #[prost(oneof = "export_flow_response::Flow", tags = "1, 2")] pub flow: ::core::option::Option, } /// Nested message and enum types in `ExportFlowResponse`. pub mod export_flow_response { /// The exported flow. #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Flow { /// The URI to a file containing the exported flow. This field is populated /// only if `flow_uri` is specified in \[ExportFlowRequest][google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest\]. #[prost(string, tag = "1")] FlowUri(::prost::alloc::string::String), /// Uncompressed raw byte content for flow. #[prost(bytes, tag = "2")] FlowContent(::prost::alloc::vec::Vec), } } #[doc = r" Generated client implementations."] pub mod flows_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; #[doc = " Service for managing [Flows][google.cloud.dialogflow.cx.v3beta1.Flow]."] #[derive(Debug, Clone)] pub struct FlowsClient { inner: tonic::client::Grpc, } impl FlowsClient where T: tonic::client::GrpcService, T::ResponseBody: Body + Send + 'static, T::Error: Into, ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_interceptor( inner: T, interceptor: F, ) -> FlowsClient> where F: tonic::service::Interceptor, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, >>::Error: Into + Send + Sync, { FlowsClient::new(InterceptedService::new(inner, interceptor)) } #[doc = r" Compress requests with `gzip`."] #[doc = r""] #[doc = r" This requires the server to support it otherwise it might respond with an"] #[doc = r" error."] pub fn send_gzip(mut self) -> Self { self.inner = self.inner.send_gzip(); self } #[doc = r" Enable decompressing responses with `gzip`."] pub fn accept_gzip(mut self) -> Self { self.inner = self.inner.accept_gzip(); self } #[doc = " Creates a flow in the specified agent."] #[doc = ""] #[doc = " Note: You should always train a flow prior to sending it queries. See the"] #[doc = " [training"] #[doc = " documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training)."] pub async fn create_flow( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Flows/CreateFlow", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Deletes a specified flow."] pub async fn delete_flow( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Flows/DeleteFlow", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Returns the list of all flows in the specified agent."] pub async fn list_flows( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Flows/ListFlows", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Retrieves the specified flow."] pub async fn get_flow( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Flows/GetFlow", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Updates the specified flow."] #[doc = ""] #[doc = " Note: You should always train a flow prior to sending it queries. See the"] #[doc = " [training"] #[doc = " documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training)."] pub async fn update_flow( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Flows/UpdateFlow", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Trains the specified flow. Note that only the flow in 'draft' environment"] #[doc = " is trained."] #[doc = ""] #[doc = " This method is a [long-running"] #[doc = " operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation)."] #[doc = " The returned `Operation` type has the following method-specific fields:"] #[doc = ""] #[doc = " - `metadata`: An empty [Struct"] #[doc = " message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)"] #[doc = " - `response`: An [Empty"] #[doc = " message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)"] #[doc = ""] #[doc = " Note: You should always train a flow prior to sending it queries. See the"] #[doc = " [training"] #[doc = " documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training)."] pub async fn train_flow( &mut self, request: impl tonic::IntoRequest, ) -> Result< tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Flows/TrainFlow", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Validates the specified flow and creates or updates validation results."] #[doc = " Please call this API after the training is completed to get the complete"] #[doc = " validation results."] pub async fn validate_flow( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Flows/ValidateFlow", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Gets the latest flow validation result. Flow validation is performed"] #[doc = " when ValidateFlow is called."] pub async fn get_flow_validation_result( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Flows/GetFlowValidationResult", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Imports the specified flow to the specified agent from a binary file."] #[doc = ""] #[doc = " This method is a [long-running"] #[doc = " operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation)."] #[doc = " The returned `Operation` type has the following method-specific fields:"] #[doc = ""] #[doc = " - `metadata`: An empty [Struct"] #[doc = " message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)"] #[doc = " - `response`: [ImportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse]"] #[doc = ""] #[doc = " Note: You should always train a flow prior to sending it queries. See the"] #[doc = " [training"] #[doc = " documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training)."] pub async fn import_flow( &mut self, request: impl tonic::IntoRequest, ) -> Result< tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Flows/ImportFlow", ); self.inner.unary(request.into_request(), path, codec).await } #[doc = " Exports the specified flow to a binary file."] #[doc = ""] #[doc = " This method is a [long-running"] #[doc = " operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation)."] #[doc = " The returned `Operation` type has the following method-specific fields:"] #[doc = ""] #[doc = " - `metadata`: An empty [Struct"] #[doc = " message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)"] #[doc = " - `response`: [ExportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse]"] #[doc = ""] #[doc = " Note that resources (e.g. intents, entities, webhooks) that the flow"] #[doc = " references will also be exported."] pub async fn export_flow( &mut self, request: impl tonic::IntoRequest, ) -> Result< tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/google.cloud.dialogflow.cx.v3beta1.Flows/ExportFlow", ); self.inner.unary(request.into_request(), path, codec).await } } } /// The request message for \[SecuritySettingsService.GetSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.GetSecuritySettings\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSecuritySettingsRequest { /// Required. Resource name of the settings. /// Format: `projects//locations//securitySettings/`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } /// The request message for \[SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateSecuritySettingsRequest { /// Required. \[SecuritySettings\] object that contains values for each of the /// fields to update. #[prost(message, optional, tag = "1")] pub security_settings: ::core::option::Option, /// Required. The mask to control which fields get updated. If the mask is not present, /// all fields will be updated. #[prost(message, optional, tag = "2")] pub update_mask: ::core::option::Option<::prost_types::FieldMask>, } /// The request message for \[SecuritySettings.ListSecuritySettings][\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSecuritySettingsRequest { /// Required. The location to list all security settings for. /// Format: `projects//locations/`. #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, /// The maximum number of items to return in a single page. By default 20 and /// at most 100. #[prost(int32, tag = "2")] pub page_size: i32, /// The next_page_token value returned from a previous list request. #[prost(string, tag = "3")] pub page_token: ::prost::alloc::string::String, } /// The response message for \[SecuritySettings.ListSecuritySettings][\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSecuritySettingsResponse { /// The list of security settings. #[prost(message, repeated, tag = "1")] pub security_settings: ::prost::alloc::vec::Vec, /// Token to retrieve the next page of results, or empty if there are no more /// results in the list. #[prost(string, tag = "2")] pub next_page_token: ::prost::alloc::string::String, } /// The request message for \[SecuritySettings.CreateSecuritySettings][\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSecuritySettingsRequest { /// Required. The location to create an \[SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings\] for. /// Format: `projects//locations/`. #[prost(string, tag = "1")] pub parent: ::prost::alloc::string::String, /// Required. The security settings to create. #[prost(message, optional, tag = "2")] pub security_settings: ::core::option::Option, } /// The request message for \[SecuritySettings.DeleteSecuritySettings][\]. #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSecuritySettingsRequest { /// Required. The name of the \[SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings\] to delete. /// Format: `projects//locations//securitySettings/`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } /// Represents the settings related to security issues, such as data redaction /// and data retention. It may take hours for updates on the settings to /// propagate to all the related components and take effect. #[derive(Clone, PartialEq, ::prost::Message)] pub struct SecuritySettings { /// Resource name of the settings. /// Required for the \[SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings\] method. /// \[SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettings\] populates the name /// automatically. /// Format: `projects//locations//securitySettings/`. #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, /// Required. The human-readable name of the security settings, unique within the /// location. #[prost(string, tag = "2")] pub display_name: ::prost::alloc::string::String, /// Strategy that defines how we do redaction. #[prost(enumeration = "security_settings::RedactionStrategy", tag = "3")] pub redaction_strategy: i32, /// Defines the data for which Dialogflow applies redaction. Dialogflow does /// not redact data that it does not have access to – for example, Cloud /// logging. #[prost(enumeration = "security_settings::RedactionScope", tag = "4")] pub redaction_scope: i32, /// \[DLP\]() inspect template name. Use this /// template to define inspect base settings. /// /// The `DLP Inspect Templates Reader` role is needed on the Dialogflow /// service identity service account (has the form /// `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) /// for your agent's project. /// /// If empty, we use the default DLP inspect config. /// /// The template name will have one of the following formats: /// `projects//locations//inspectTemplates/