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 ScannerParams {
  /// Contains list of filters supported for the scanner
  #[serde(rename = "FilterList")]
  filter_list: Option<Vec<Value>>,
  #[serde(rename = "InstrumentList")]
  instrument_list: Option<::models::ScannerparamsInstrumentList>,
  #[serde(rename = "LocationTree")]
  location_tree: Option<::models::ScannerparamsLocationTree>,
  #[serde(rename = "ScanTypeList")]
  scan_type_list: Option<::models::ScannerparamsScanTypeList>
}

impl ScannerParams {
  pub fn new() -> ScannerParams {
    ScannerParams {
      filter_list: None,
      instrument_list: None,
      location_tree: None,
      scan_type_list: None
    }
  }

  pub fn set_filter_list(&mut self, filter_list: Vec<Value>) {
    self.filter_list = Some(filter_list);
  }

  pub fn with_filter_list(mut self, filter_list: Vec<Value>) -> ScannerParams {
    self.filter_list = Some(filter_list);
    self
  }

  pub fn filter_list(&self) -> Option<&Vec<Value>> {
    self.filter_list.as_ref()
  }

  pub fn reset_filter_list(&mut self) {
    self.filter_list = None;
  }

  pub fn set_instrument_list(&mut self, instrument_list: ::models::ScannerparamsInstrumentList) {
    self.instrument_list = Some(instrument_list);
  }

  pub fn with_instrument_list(mut self, instrument_list: ::models::ScannerparamsInstrumentList) -> ScannerParams {
    self.instrument_list = Some(instrument_list);
    self
  }

  pub fn instrument_list(&self) -> Option<&::models::ScannerparamsInstrumentList> {
    self.instrument_list.as_ref()
  }

  pub fn reset_instrument_list(&mut self) {
    self.instrument_list = None;
  }

  pub fn set_location_tree(&mut self, location_tree: ::models::ScannerparamsLocationTree) {
    self.location_tree = Some(location_tree);
  }

  pub fn with_location_tree(mut self, location_tree: ::models::ScannerparamsLocationTree) -> ScannerParams {
    self.location_tree = Some(location_tree);
    self
  }

  pub fn location_tree(&self) -> Option<&::models::ScannerparamsLocationTree> {
    self.location_tree.as_ref()
  }

  pub fn reset_location_tree(&mut self) {
    self.location_tree = None;
  }

  pub fn set_scan_type_list(&mut self, scan_type_list: ::models::ScannerparamsScanTypeList) {
    self.scan_type_list = Some(scan_type_list);
  }

  pub fn with_scan_type_list(mut self, scan_type_list: ::models::ScannerparamsScanTypeList) -> ScannerParams {
    self.scan_type_list = Some(scan_type_list);
    self
  }

  pub fn scan_type_list(&self) -> Option<&::models::ScannerparamsScanTypeList> {
    self.scan_type_list.as_ref()
  }

  pub fn reset_scan_type_list(&mut self) {
    self.scan_type_list = None;
  }

}