/*
 * Client Portal Web API
 *
 * Client Portal Web API
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct AlertResponse {
    /// account id
    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
    pub account: Option<String>,
    #[serde(rename = "order_id", skip_serializing_if = "Option::is_none")]
    pub order_id: Option<i32>,
    /// name of alert
    #[serde(rename = "alert_name", skip_serializing_if = "Option::is_none")]
    pub alert_name: Option<String>,
    /// The message you want to receive via email or text message
    #[serde(rename = "alert_message", skip_serializing_if = "Option::is_none")]
    pub alert_message: Option<String>,
    /// whether alert is active or not, so value can only be 0 or 1
    #[serde(rename = "alert_active", skip_serializing_if = "Option::is_none")]
    pub alert_active: Option<i32>,
    /// whether alert is repeatable or not, so value can only be 0 or 1
    #[serde(rename = "alert_repeatable", skip_serializing_if = "Option::is_none")]
    pub alert_repeatable: Option<i32>,
    /// email address to receive alert
    #[serde(rename = "alert_email", skip_serializing_if = "Option::is_none")]
    pub alert_email: Option<String>,
    /// whether allowing to send email or not, so value can only be 0 or 1, 
    #[serde(rename = "alert_send_message", skip_serializing_if = "Option::is_none")]
    pub alert_send_message: Option<i32>,
    /// time in force, can only be GTC or GTD
    #[serde(rename = "tif", skip_serializing_if = "Option::is_none")]
    pub tif: Option<String>,
    /// format, YYYYMMDD-HH:mm:ss 
    #[serde(rename = "expire_time", skip_serializing_if = "Option::is_none")]
    pub expire_time: Option<String>,
    /// status of alert
    #[serde(rename = "order_status", skip_serializing_if = "Option::is_none")]
    pub order_status: Option<String>,
    /// value can only be 0 or 1, set to 1 if the alert can be triggered outside regular trading hours. 
    #[serde(rename = "outsideRth", skip_serializing_if = "Option::is_none")]
    pub outside_rth: Option<i32>,
    /// value can only be 0 or 1, set to 1 to enable the alert only in IBKR mobile 
    #[serde(rename = "itws_orders_only", skip_serializing_if = "Option::is_none")]
    pub itws_orders_only: Option<i32>,
    /// value can only be 0 or 1, set to 1 to allow to show alert in pop-ups
    #[serde(rename = "alert_show_popup", skip_serializing_if = "Option::is_none")]
    pub alert_show_popup: Option<i32>,
    /// whether the alert has been triggered
    #[serde(rename = "alert_triggered", skip_serializing_if = "Option::is_none")]
    pub alert_triggered: Option<bool>,
    /// whether the alert can be edited
    #[serde(rename = "order_not_editable", skip_serializing_if = "Option::is_none")]
    pub order_not_editable: Option<bool>,
    /// for MTA alert only, each user has a unique toolId and it will stay the same, do not send for normal alert 
    #[serde(rename = "tool_id", skip_serializing_if = "Option::is_none")]
    pub tool_id: Option<i32>,
    /// audio message to play when alert is triggered
    #[serde(rename = "alert_play_audio", skip_serializing_if = "Option::is_none")]
    pub alert_play_audio: Option<String>,
    /// MTA alert only
    #[serde(rename = "alert_mta_currency", skip_serializing_if = "Option::is_none")]
    pub alert_mta_currency: Option<String>,
    /// MTA alert only
    #[serde(rename = "alert_mta_defaults", skip_serializing_if = "Option::is_none")]
    pub alert_mta_defaults: Option<String>,
    /// MTA alert only
    #[serde(rename = "time_zone", skip_serializing_if = "Option::is_none")]
    pub time_zone: Option<String>,
    /// MTA alert only
    #[serde(rename = "alert_default_type", skip_serializing_if = "Option::is_none")]
    pub alert_default_type: Option<String>,
    /// size of conditions array
    #[serde(rename = "condition_size", skip_serializing_if = "Option::is_none")]
    pub condition_size: Option<i32>,
    /// whether allowing the condition can be triggered outside of regular trading hours, 1 means allow
    #[serde(rename = "condition_outside_rth", skip_serializing_if = "Option::is_none")]
    pub condition_outside_rth: Option<i32>,
    #[serde(rename = "conditions", skip_serializing_if = "Option::is_none")]
    pub conditions: Option<Vec<crate::models::AlertResponseConditions>>,
}

impl AlertResponse {
    pub fn new() -> AlertResponse {
        AlertResponse {
            account: None,
            order_id: None,
            alert_name: None,
            alert_message: None,
            alert_active: None,
            alert_repeatable: None,
            alert_email: None,
            alert_send_message: None,
            tif: None,
            expire_time: None,
            order_status: None,
            outside_rth: None,
            itws_orders_only: None,
            alert_show_popup: None,
            alert_triggered: None,
            order_not_editable: None,
            tool_id: None,
            alert_play_audio: None,
            alert_mta_currency: None,
            alert_mta_defaults: None,
            time_zone: None,
            alert_default_type: None,
            condition_size: None,
            condition_outside_rth: None,
            conditions: None,
        }
    }
}


