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 Body2 {
  /// 1 to activate, 0 to deactivate
  #[serde(rename = "alertActive")]
  alert_active: Option<i32>,
  /// alert id(order id)
  #[serde(rename = "alertId")]
  alert_id: Option<i32>
}

impl Body2 {
  pub fn new() -> Body2 {
    Body2 {
      alert_active: None,
      alert_id: 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) -> Body2 {
    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_id(&mut self, alert_id: i32) {
    self.alert_id = Some(alert_id);
  }

  pub fn with_alert_id(mut self, alert_id: i32) -> Body2 {
    self.alert_id = Some(alert_id);
    self
  }

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

  pub fn reset_alert_id(&mut self) {
    self.alert_id = None;
  }

}