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 IbcustentityinfoAddress {
  #[serde(rename = "city")]
  city: Option<String>,
  #[serde(rename = "compact")]
  compact: Option<String>,
  #[serde(rename = "country")]
  country: Option<String>,
  #[serde(rename = "countryCode")]
  country_code: Option<String>,
  #[serde(rename = "postalCode")]
  postal_code: Option<String>,
  #[serde(rename = "state")]
  state: Option<String>,
  #[serde(rename = "street")]
  street: Option<String>,
  #[serde(rename = "street2")]
  street2: Option<String>
}

impl IbcustentityinfoAddress {
  pub fn new() -> IbcustentityinfoAddress {
    IbcustentityinfoAddress {
      city: None,
      compact: None,
      country: None,
      country_code: None,
      postal_code: None,
      state: None,
      street: None,
      street2: None
    }
  }

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

  pub fn with_city(mut self, city: String) -> IbcustentityinfoAddress {
    self.city = Some(city);
    self
  }

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

  pub fn reset_city(&mut self) {
    self.city = None;
  }

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

  pub fn with_compact(mut self, compact: String) -> IbcustentityinfoAddress {
    self.compact = Some(compact);
    self
  }

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

  pub fn reset_compact(&mut self) {
    self.compact = None;
  }

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

  pub fn with_country(mut self, country: String) -> IbcustentityinfoAddress {
    self.country = Some(country);
    self
  }

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

  pub fn reset_country(&mut self) {
    self.country = None;
  }

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

  pub fn with_country_code(mut self, country_code: String) -> IbcustentityinfoAddress {
    self.country_code = Some(country_code);
    self
  }

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

  pub fn reset_country_code(&mut self) {
    self.country_code = None;
  }

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

  pub fn with_postal_code(mut self, postal_code: String) -> IbcustentityinfoAddress {
    self.postal_code = Some(postal_code);
    self
  }

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

  pub fn reset_postal_code(&mut self) {
    self.postal_code = None;
  }

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

  pub fn with_state(mut self, state: String) -> IbcustentityinfoAddress {
    self.state = Some(state);
    self
  }

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

  pub fn reset_state(&mut self) {
    self.state = None;
  }

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

  pub fn with_street(mut self, street: String) -> IbcustentityinfoAddress {
    self.street = Some(street);
    self
  }

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

  pub fn reset_street(&mut self) {
    self.street = None;
  }

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

  pub fn with_street2(mut self, street2: String) -> IbcustentityinfoAddress {
    self.street2 = Some(street2);
    self
  }

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

  pub fn reset_street2(&mut self) {
    self.street2 = None;
  }

}