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 IserversecdefsearchSections {
  /// Listing Exchange
  #[serde(rename = "exchange")]
  exchange: Option<String>,
  /// For combo's defines the asset class for each leg
  #[serde(rename = "legSecType")]
  leg_sec_type: Option<String>,
  /// List of expiration month(s) and year(s) in MMMYY format separated by semicolon
  #[serde(rename = "months")]
  months: Option<String>,
  /// Asset Class
  #[serde(rename = "secType")]
  sec_type: Option<String>,
  /// Underlying symbol
  #[serde(rename = "symbol")]
  symbol: Option<String>
}

impl IserversecdefsearchSections {
  pub fn new() -> IserversecdefsearchSections {
    IserversecdefsearchSections {
      exchange: None,
      leg_sec_type: None,
      months: None,
      sec_type: None,
      symbol: None
    }
  }

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

  pub fn with_exchange(mut self, exchange: String) -> IserversecdefsearchSections {
    self.exchange = Some(exchange);
    self
  }

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

  pub fn reset_exchange(&mut self) {
    self.exchange = None;
  }

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

  pub fn with_leg_sec_type(mut self, leg_sec_type: String) -> IserversecdefsearchSections {
    self.leg_sec_type = Some(leg_sec_type);
    self
  }

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

  pub fn reset_leg_sec_type(&mut self) {
    self.leg_sec_type = None;
  }

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

  pub fn with_months(mut self, months: String) -> IserversecdefsearchSections {
    self.months = Some(months);
    self
  }

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

  pub fn reset_months(&mut self) {
    self.months = None;
  }

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

  pub fn with_sec_type(mut self, sec_type: String) -> IserversecdefsearchSections {
    self.sec_type = Some(sec_type);
    self
  }

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

  pub fn reset_sec_type(&mut self) {
    self.sec_type = None;
  }

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

  pub fn with_symbol(mut self, symbol: String) -> IserversecdefsearchSections {
    self.symbol = Some(symbol);
    self
  }

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

  pub fn reset_symbol(&mut self) {
    self.symbol = None;
  }

}