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 StocksInnerContracts {
  /// conid of the stock contract
  #[serde(rename = "conid")]
  conid: Option<i32>,
  #[serde(rename = "exchange")]
  exchange: Option<String>
}

impl StocksInnerContracts {
  pub fn new() -> StocksInnerContracts {
    StocksInnerContracts {
      conid: None,
      exchange: None
    }
  }

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

  pub fn with_conid(mut self, conid: i32) -> StocksInnerContracts {
    self.conid = Some(conid);
    self
  }

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

  pub fn reset_conid(&mut self) {
    self.conid = None;
  }

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

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

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

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

}