/*
 * Watson Assistant v2
 *
 * The IBM Watson&trade; Assistant service combines machine learning, natural language understanding, and an integrated dialog editor to create conversation flows between your apps and your users.  The Assistant v2 API provides runtime methods your client application can use to send user input to an assistant and receive a response.
 *
 * The version of the OpenAPI document: 2.0
 * 
 * Generated by: https://openapi-generator.tech
 */



#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(tag = "responsetype")]
pub enum RuntimeResponseGeneric {
    #[serde(rename="channel_transfer")]
    RuntimeResponseTypeChannelTransfer {
        /// The message to display to the user when initiating a channel transfer.
        #[serde(rename = "message_to_user")]
        message_to_user: String,
        #[serde(rename = "transfer_info")]
        transfer_info: Box<crate::models::ChannelTransferInfo>,
        /// An array of objects specifying channels for which the response is intended. If **channels** is present, the response is intended for a built-in integration and should not be handled by an API client.
        #[serde(rename = "channels", skip_serializing_if = "Option::is_none")]
        channels: Option<Vec<crate::models::ResponseGenericChannel>>,
    },
    #[serde(rename="connect_to_agent")]
    RuntimeResponseTypeConnectToAgent {
        /// A message to be sent to the human agent who will be taking over the conversation.
        #[serde(rename = "message_to_human_agent", skip_serializing_if = "Option::is_none")]
        message_to_human_agent: Option<String>,
        #[serde(rename = "agent_available", skip_serializing_if = "Option::is_none")]
        agent_available: Option<Box<crate::models::AgentAvailabilityMessage>>,
        #[serde(rename = "agent_unavailable", skip_serializing_if = "Option::is_none")]
        agent_unavailable: Option<Box<crate::models::AgentAvailabilityMessage>>,
        #[serde(rename = "transfer_info", skip_serializing_if = "Option::is_none")]
        transfer_info: Option<Box<crate::models::DialogNodeOutputConnectToAgentTransferInfo>>,
        /// A label identifying the topic of the conversation, derived from the **title** property of the relevant node or the **topic** property of the dialog node response.
        #[serde(rename = "topic", skip_serializing_if = "Option::is_none")]
        topic: Option<String>,
        /// An array of objects specifying channels for which the response is intended. If **channels** is present, the response is intended for a built-in integration and should not be handled by an API client.
        #[serde(rename = "channels", skip_serializing_if = "Option::is_none")]
        channels: Option<Vec<crate::models::ResponseGenericChannel>>,
    },
    #[serde(rename="image")]
    RuntimeResponseTypeImage {
        /// The URL of the image.
        #[serde(rename = "source")]
        source: String,
        /// The title to show before the response.
        #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
        title: Option<String>,
        /// The description to show with the the response.
        #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
        description: Option<String>,
        /// An array of objects specifying channels for which the response is intended. If **channels** is present, the response is intended for a built-in integration and should not be handled by an API client.
        #[serde(rename = "channels", skip_serializing_if = "Option::is_none")]
        channels: Option<Vec<crate::models::ResponseGenericChannel>>,
    },
    #[serde(rename="option")]
    RuntimeResponseTypeOption {
        /// The title or introductory text to show before the response.
        #[serde(rename = "title")]
        title: String,
        /// The description to show with the the response.
        #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
        description: Option<String>,
        /// The preferred type of control to display.
        #[serde(rename = "preference", skip_serializing_if = "Option::is_none")]
        preference: Option<Preference>,
        /// An array of objects describing the options from which the user can choose.
        #[serde(rename = "options")]
        options: Vec<crate::models::DialogNodeOutputOptionsElement>,
        /// An array of objects specifying channels for which the response is intended. If **channels** is present, the response is intended for a built-in integration and should not be handled by an API client.
        #[serde(rename = "channels", skip_serializing_if = "Option::is_none")]
        channels: Option<Vec<crate::models::ResponseGenericChannel>>,
    },
    #[serde(rename="pause")]
    RuntimeResponseTypePause {
        /// How long to pause, in milliseconds.
        #[serde(rename = "time")]
        time: i32,
        /// Whether to send a \"user is typing\" event during the pause.
        #[serde(rename = "typing", skip_serializing_if = "Option::is_none")]
        typing: Option<bool>,
        /// An array of objects specifying channels for which the response is intended. If **channels** is present, the response is intended for a built-in integration and should not be handled by an API client.
        #[serde(rename = "channels", skip_serializing_if = "Option::is_none")]
        channels: Option<Vec<crate::models::ResponseGenericChannel>>,
    },
    #[serde(rename="search")]
    RuntimeResponseTypeSearch {
        /// The title or introductory text to show before the response. This text is defined in the search skill configuration.
        #[serde(rename = "header")]
        header: String,
        /// An array of objects that contains the search results to be displayed in the initial response to the user.
        #[serde(rename = "primary_results")]
        primary_results: Vec<crate::models::SearchResult>,
        /// An array of objects that contains additional search results that can be displayed to the user upon request.
        #[serde(rename = "additional_results")]
        additional_results: Vec<crate::models::SearchResult>,
        /// An array of objects specifying channels for which the response is intended. If **channels** is present, the response is intended for a built-in integration and should not be handled by an API client.
        #[serde(rename = "channels", skip_serializing_if = "Option::is_none")]
        channels: Option<Vec<crate::models::ResponseGenericChannel>>,
    },
    #[serde(rename="suggestion")]
    RuntimeResponseTypeSuggestion {
        /// The title or introductory text to show before the response.
        #[serde(rename = "title")]
        title: String,
        /// An array of objects describing the possible matching dialog nodes from which the user can choose.
        #[serde(rename = "suggestions")]
        suggestions: Vec<crate::models::DialogSuggestion>,
        /// An array of objects specifying channels for which the response is intended. If **channels** is present, the response is intended for a built-in integration and should not be handled by an API client.
        #[serde(rename = "channels", skip_serializing_if = "Option::is_none")]
        channels: Option<Vec<crate::models::ResponseGenericChannel>>,
    },
    #[serde(rename="text")]
    RuntimeResponseTypeText {
        /// The text of the response.
        #[serde(rename = "text")]
        text: String,
        /// An array of objects specifying channels for which the response is intended. If **channels** is present, the response is intended for a built-in integration and should not be handled by an API client.
        #[serde(rename = "channels", skip_serializing_if = "Option::is_none")]
        channels: Option<Vec<crate::models::ResponseGenericChannel>>,
    },
    #[serde(rename="user_defined")]
    RuntimeResponseTypeUserDefined {
        /// An object containing any properties for the user-defined response type.
        #[serde(rename = "user_defined")]
        user_defined: ::std::collections::HashMap<String, serde_json::Value>,
        /// An array of objects specifying channels for which the response is intended. If **channels** is present, the response is intended for a built-in integration and should not be handled by an API client.
        #[serde(rename = "channels", skip_serializing_if = "Option::is_none")]
        channels: Option<Vec<crate::models::ResponseGenericChannel>>,
    },
}



/// The preferred type of control to display.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Preference {
    #[serde(rename = "dropdown")]
    Dropdown,
    #[serde(rename = "button")]
    Button,
}

