ib 3.0.0

A Rust client to the Interactive Brokers HTTP REST API
Documentation
/* 
 * Client Portal Web API
 *
 * Client Poral Web API
 *
 * OpenAPI spec version: 1.0.0
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */


#[allow(unused_imports)]
use serde_json::Value;

#[derive(Debug, Serialize, Deserialize)]
pub struct InlineResponse20013 {
  /// account id
  #[serde(rename = "account")]
  account: Option<String>,
  /// Value can only be 0 or 1, 1 means active
  #[serde(rename = "alert_active")]
  alert_active: Option<i32>,
  #[serde(rename = "alert_name")]
  alert_name: Option<String>,
  /// whether the alert can be repeatable or not, value can be 1 or 0. 1 means true
  #[serde(rename = "alert_repeatable")]
  alert_repeatable: Option<i32>,
  /// whether the alert has been triggered or not
  #[serde(rename = "alert_triggered")]
  alert_triggered: Option<bool>,
  #[serde(rename = "order_id")]
  order_id: Option<i32>,
  /// format, YYYYMMDD-HH:mm:ss, the time when you created the alert 
  #[serde(rename = "order_time")]
  order_time: Option<String>
}

impl InlineResponse20013 {
  pub fn new() -> InlineResponse20013 {
    InlineResponse20013 {
      account: None,
      alert_active: None,
      alert_name: None,
      alert_repeatable: None,
      alert_triggered: None,
      order_id: None,
      order_time: None
    }
  }

  pub fn set_account(&mut self, account: String) {
    self.account = Some(account);
  }

  pub fn with_account(mut self, account: String) -> InlineResponse20013 {
    self.account = Some(account);
    self
  }

  pub fn account(&self) -> Option<&String> {
    self.account.as_ref()
  }

  pub fn reset_account(&mut self) {
    self.account = None;
  }

  pub fn set_alert_active(&mut self, alert_active: i32) {
    self.alert_active = Some(alert_active);
  }

  pub fn with_alert_active(mut self, alert_active: i32) -> InlineResponse20013 {
    self.alert_active = Some(alert_active);
    self
  }

  pub fn alert_active(&self) -> Option<&i32> {
    self.alert_active.as_ref()
  }

  pub fn reset_alert_active(&mut self) {
    self.alert_active = None;
  }

  pub fn set_alert_name(&mut self, alert_name: String) {
    self.alert_name = Some(alert_name);
  }

  pub fn with_alert_name(mut self, alert_name: String) -> InlineResponse20013 {
    self.alert_name = Some(alert_name);
    self
  }

  pub fn alert_name(&self) -> Option<&String> {
    self.alert_name.as_ref()
  }

  pub fn reset_alert_name(&mut self) {
    self.alert_name = None;
  }

  pub fn set_alert_repeatable(&mut self, alert_repeatable: i32) {
    self.alert_repeatable = Some(alert_repeatable);
  }

  pub fn with_alert_repeatable(mut self, alert_repeatable: i32) -> InlineResponse20013 {
    self.alert_repeatable = Some(alert_repeatable);
    self
  }

  pub fn alert_repeatable(&self) -> Option<&i32> {
    self.alert_repeatable.as_ref()
  }

  pub fn reset_alert_repeatable(&mut self) {
    self.alert_repeatable = None;
  }

  pub fn set_alert_triggered(&mut self, alert_triggered: bool) {
    self.alert_triggered = Some(alert_triggered);
  }

  pub fn with_alert_triggered(mut self, alert_triggered: bool) -> InlineResponse20013 {
    self.alert_triggered = Some(alert_triggered);
    self
  }

  pub fn alert_triggered(&self) -> Option<&bool> {
    self.alert_triggered.as_ref()
  }

  pub fn reset_alert_triggered(&mut self) {
    self.alert_triggered = None;
  }

  pub fn set_order_id(&mut self, order_id: i32) {
    self.order_id = Some(order_id);
  }

  pub fn with_order_id(mut self, order_id: i32) -> InlineResponse20013 {
    self.order_id = Some(order_id);
    self
  }

  pub fn order_id(&self) -> Option<&i32> {
    self.order_id.as_ref()
  }

  pub fn reset_order_id(&mut self) {
    self.order_id = None;
  }

  pub fn set_order_time(&mut self, order_time: String) {
    self.order_time = Some(order_time);
  }

  pub fn with_order_time(mut self, order_time: String) -> InlineResponse20013 {
    self.order_time = Some(order_time);
    self
  }

  pub fn order_time(&self) -> Option<&String> {
    self.order_time.as_ref()
  }

  pub fn reset_order_time(&mut self) {
    self.order_time = None;
  }

}