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

/// AllocationInnerSectorShort : short positions allocation

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

#[derive(Debug, Serialize, Deserialize)]
pub struct AllocationInnerSectorShort {
  #[serde(rename = "Consumer")]
  consumer: Option<f32>,
  #[serde(rename = "Diversified")]
  diversified: Option<f32>,
  #[serde(rename = "Industrial")]
  industrial: Option<f32>
}

impl AllocationInnerSectorShort {
  /// short positions allocation
  pub fn new() -> AllocationInnerSectorShort {
    AllocationInnerSectorShort {
      consumer: None,
      diversified: None,
      industrial: None
    }
  }

  pub fn set_consumer(&mut self, consumer: f32) {
    self.consumer = Some(consumer);
  }

  pub fn with_consumer(mut self, consumer: f32) -> AllocationInnerSectorShort {
    self.consumer = Some(consumer);
    self
  }

  pub fn consumer(&self) -> Option<&f32> {
    self.consumer.as_ref()
  }

  pub fn reset_consumer(&mut self) {
    self.consumer = None;
  }

  pub fn set_diversified(&mut self, diversified: f32) {
    self.diversified = Some(diversified);
  }

  pub fn with_diversified(mut self, diversified: f32) -> AllocationInnerSectorShort {
    self.diversified = Some(diversified);
    self
  }

  pub fn diversified(&self) -> Option<&f32> {
    self.diversified.as_ref()
  }

  pub fn reset_diversified(&mut self) {
    self.diversified = None;
  }

  pub fn set_industrial(&mut self, industrial: f32) {
    self.industrial = Some(industrial);
  }

  pub fn with_industrial(mut self, industrial: f32) -> AllocationInnerSectorShort {
    self.industrial = Some(industrial);
    self
  }

  pub fn industrial(&self) -> Option<&f32> {
    self.industrial.as_ref()
  }

  pub fn reset_industrial(&mut self) {
    self.industrial = None;
  }

}