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 SummaryAccountSummaries {
  #[serde(rename = "accountTypeCode")]
  account_type_code: Option<String>,
  #[serde(rename = "accountTypeName")]
  account_type_name: Option<String>,
  #[serde(rename = "chg")]
  chg: Option<String>,
  #[serde(rename = "endVal")]
  end_val: Option<String>,
  #[serde(rename = "hasAccounts")]
  has_accounts: Option<bool>,
  #[serde(rename = "rtn")]
  rtn: Option<String>,
  #[serde(rename = "startVal")]
  start_val: Option<String>
}

impl SummaryAccountSummaries {
  pub fn new() -> SummaryAccountSummaries {
    SummaryAccountSummaries {
      account_type_code: None,
      account_type_name: None,
      chg: None,
      end_val: None,
      has_accounts: None,
      rtn: None,
      start_val: None
    }
  }

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

  pub fn with_account_type_code(mut self, account_type_code: String) -> SummaryAccountSummaries {
    self.account_type_code = Some(account_type_code);
    self
  }

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

  pub fn reset_account_type_code(&mut self) {
    self.account_type_code = None;
  }

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

  pub fn with_account_type_name(mut self, account_type_name: String) -> SummaryAccountSummaries {
    self.account_type_name = Some(account_type_name);
    self
  }

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

  pub fn reset_account_type_name(&mut self) {
    self.account_type_name = None;
  }

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

  pub fn with_chg(mut self, chg: String) -> SummaryAccountSummaries {
    self.chg = Some(chg);
    self
  }

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

  pub fn reset_chg(&mut self) {
    self.chg = None;
  }

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

  pub fn with_end_val(mut self, end_val: String) -> SummaryAccountSummaries {
    self.end_val = Some(end_val);
    self
  }

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

  pub fn reset_end_val(&mut self) {
    self.end_val = None;
  }

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

  pub fn with_has_accounts(mut self, has_accounts: bool) -> SummaryAccountSummaries {
    self.has_accounts = Some(has_accounts);
    self
  }

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

  pub fn reset_has_accounts(&mut self) {
    self.has_accounts = None;
  }

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

  pub fn with_rtn(mut self, rtn: String) -> SummaryAccountSummaries {
    self.rtn = Some(rtn);
    self
  }

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

  pub fn reset_rtn(&mut self) {
    self.rtn = None;
  }

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

  pub fn with_start_val(mut self, start_val: String) -> SummaryAccountSummaries {
    self.start_val = Some(start_val);
    self
  }

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

  pub fn reset_start_val(&mut self) {
    self.start_val = None;
  }

}