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
 */

/// FuturesInner : future contract information

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

#[derive(Debug, Serialize, Deserialize)]
pub struct FuturesInner {
  /// conid of the future contract
  #[serde(rename = "conid")]
  conid: Option<i32>,
  #[serde(rename = "expirationDate")]
  expiration_date: Option<String>,
  /// last trading day
  #[serde(rename = "ltd")]
  ltd: Option<String>,
  #[serde(rename = "symbol")]
  symbol: Option<String>,
  #[serde(rename = "underlyingConid")]
  underlying_conid: Option<i32>
}

impl FuturesInner {
  /// future contract information
  pub fn new() -> FuturesInner {
    FuturesInner {
      conid: None,
      expiration_date: None,
      ltd: None,
      symbol: None,
      underlying_conid: None
    }
  }

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

  pub fn with_conid(mut self, conid: i32) -> FuturesInner {
    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_expiration_date(&mut self, expiration_date: String) {
    self.expiration_date = Some(expiration_date);
  }

  pub fn with_expiration_date(mut self, expiration_date: String) -> FuturesInner {
    self.expiration_date = Some(expiration_date);
    self
  }

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

  pub fn reset_expiration_date(&mut self) {
    self.expiration_date = None;
  }

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

  pub fn with_ltd(mut self, ltd: String) -> FuturesInner {
    self.ltd = Some(ltd);
    self
  }

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

  pub fn reset_ltd(&mut self) {
    self.ltd = None;
  }

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

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

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

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

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

  pub fn with_underlying_conid(mut self, underlying_conid: i32) -> FuturesInner {
    self.underlying_conid = Some(underlying_conid);
    self
  }

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

  pub fn reset_underlying_conid(&mut self) {
    self.underlying_conid = None;
  }

}