GoogleCloudDialogflowCxV3ResponseMessage

Struct GoogleCloudDialogflowCxV3ResponseMessage 

Source
pub struct GoogleCloudDialogflowCxV3ResponseMessage {
    pub channel: Option<String>,
    pub conversation_success: Option<GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess>,
    pub end_interaction: Option<GoogleCloudDialogflowCxV3ResponseMessageEndInteraction>,
    pub knowledge_info_card: Option<GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard>,
    pub live_agent_handoff: Option<GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff>,
    pub mixed_audio: Option<GoogleCloudDialogflowCxV3ResponseMessageMixedAudio>,
    pub output_audio_text: Option<GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText>,
    pub payload: Option<HashMap<String, Value>>,
    pub play_audio: Option<GoogleCloudDialogflowCxV3ResponseMessagePlayAudio>,
    pub response_type: Option<String>,
    pub telephony_transfer_call: Option<GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall>,
    pub text: Option<GoogleCloudDialogflowCxV3ResponseMessageText>,
}
Expand description

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.

This type is not used in any activity, and only used as part of another schema.

Fields§

§channel: Option<String>

The channel which the response is associated with. Clients can specify the channel via QueryParameters.channel, and only associated channel response will be returned.

§conversation_success: Option<GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess>

Indicates that the conversation succeeded.

§end_interaction: Option<GoogleCloudDialogflowCxV3ResponseMessageEndInteraction>

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.

§knowledge_info_card: Option<GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard>

Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger.

§live_agent_handoff: Option<GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff>

Hands off conversation to a human agent.

§mixed_audio: Option<GoogleCloudDialogflowCxV3ResponseMessageMixedAudio>

Output only. An audio response message composed of both the synthesized Dialogflow agent responses and responses defined via play_audio. This message is generated by Dialogflow only and not supposed to be defined by the user.

§output_audio_text: Option<GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText>

A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message.

§payload: Option<HashMap<String, Value>>

Returns a response containing a custom, platform-specific payload.

§play_audio: Option<GoogleCloudDialogflowCxV3ResponseMessagePlayAudio>

Signal that the client should play an audio clip hosted at a client-specific URI. Dialogflow uses this to construct mixed_audio. However, Dialogflow itself does not try to read or process the URI in any way.

§response_type: Option<String>

Response type.

§telephony_transfer_call: Option<GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall>

A signal that the client should transfer the phone call connected to this agent to a third-party endpoint.

§text: Option<GoogleCloudDialogflowCxV3ResponseMessageText>

Returns a text response.

Trait Implementations§

Source§

impl Clone for GoogleCloudDialogflowCxV3ResponseMessage

Source§

fn clone(&self) -> GoogleCloudDialogflowCxV3ResponseMessage

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GoogleCloudDialogflowCxV3ResponseMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GoogleCloudDialogflowCxV3ResponseMessage

Source§

fn default() -> GoogleCloudDialogflowCxV3ResponseMessage

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for GoogleCloudDialogflowCxV3ResponseMessage

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for GoogleCloudDialogflowCxV3ResponseMessage

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Part for GoogleCloudDialogflowCxV3ResponseMessage

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,