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 SummaryTotal {
  /// total change amount
  #[serde(rename = "chg")]
  chg: Option<String>,
  #[serde(rename = "endVal")]
  end_val: Option<String>,
  /// set to true if any external account data is not available for starting or ending date, resulting in potentially unusual total values.
  #[serde(rename = "incompleteData")]
  incomplete_data: Option<bool>,
  /// change percent
  #[serde(rename = "rtn")]
  rtn: Option<String>,
  #[serde(rename = "startVal")]
  start_val: Option<String>
}

impl SummaryTotal {
  pub fn new() -> SummaryTotal {
    SummaryTotal {
      chg: None,
      end_val: None,
      incomplete_data: None,
      rtn: None,
      start_val: None
    }
  }

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

  pub fn with_chg(mut self, chg: String) -> SummaryTotal {
    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) -> SummaryTotal {
    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_incomplete_data(&mut self, incomplete_data: bool) {
    self.incomplete_data = Some(incomplete_data);
  }

  pub fn with_incomplete_data(mut self, incomplete_data: bool) -> SummaryTotal {
    self.incomplete_data = Some(incomplete_data);
    self
  }

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

  pub fn reset_incomplete_data(&mut self) {
    self.incomplete_data = None;
  }

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

  pub fn with_rtn(mut self, rtn: String) -> SummaryTotal {
    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) -> SummaryTotal {
    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;
  }

}