namespace ProxyTunnel.Models
{
    /// <summary>
    /// User input types
    /// </summary>
    public enum UserInputType
    {
        NO_INPUT,
        TEXT,
        BASE64_ENCODED_G711_ULAW_WAV_FILE,
        USER_INPUT_ARCHIVED_AS_SPECIFIED,
        USER_ENDED_SESSION,
        AUTOMATED_TEXT,      // for things like "SOLICIT_WELCOME_PROMPT"---stimulate the bot without actual user input (based on CRM or script data for example)
        DTMF_AS_TEXT
    }

    public class BotExchangeBaseActionParameters
    {
        /// <summary>
        /// Textual input from a user instigating a bot interaction.  This may be sourced from a chat client, or transcribed from audio input, or from other medium inputs.
        /// If userInputType is 'BASE64_ENCODED_G711_ULAW_WAV_FILE', this attribute should be ignored, as the payload will be in the base64wavFile attribute
        /// </summary>
        /// <example>Men's basketball shoes</example>
        public string userInput { get; set; }

        /// <summary>
        /// Specifies the type of user input.  It can be either:
        ///  •NO_INPUT - No response was collected from the user (either from timeout or due to specification)
        ///  •TEXT (transcribed audio or user entered chat text in the 'userInput' field. This may also be detected DTMF digits in text form (12345))
        ///  •BASE64_ENCODED_G711_ULAW_WAV_FILE (entire utterance audio file---including the WAV header!!!).  This will be G.711 U-law 8 kHz 8 bit Mono.  The payload will be in the base64wavFile property of the actionRequest (not 'userInput' field)
        ///  •USER_INPUT_ARCHIVED_AS_SPECIFIED - Confirms that the user input has been archived to Storage Services as requested on the previous BotExchange
        ///  •USER_ENDED_SESSION - The user ended the bot session (hung up the phone, closed chat window, etc)
        ///  •AUTOMATED_TEXT - For things like Welcome messages (The user is wanting to start a bot session with the bot initiating the first prompt (rather than a script)).  Potentially can change bot states proactively
        /// </summary>
        public UserInputType userInputType { get; set; }

        /// <summary>
        /// Arbitrary and extensible data that can be passed from the inContact platform scripts to the BotProvider
        /// This can be things like DNIS, ANI, SIP Headers, CRM data, etc
        /// </summary>
        public object customPayload { get; set; }

        /// <summary>
        /// Any state data to be iteratively exchanged with a bot.  The platform will return this value throughout the 'GenericBotLoop'
        /// This should include at least enough data to identify an existing session, if not having the entire bot state embedded in it (this can allow for "state-less" bots)
        /// </summary>
        public object botSessionState { get; set; }

        /// <summary>
        /// Indicate the media type of the exchange.  inContact MediaServer will supply 'voip' for voice calls.  'chat' for inContact chat.  Future channels may include 'facebook', etc,
        /// </summary>
        public string mediaType { get; set; }
    }
}
