ib/models/
allocation_inner_group.rs

1/* 
2 * Client Portal Web API
3 *
4 * Client Poral Web API
5 *
6 * OpenAPI spec version: 1.0.0
7 * 
8 * Generated by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11/// AllocationInnerGroup : portfolio allocation by group
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct AllocationInnerGroup {
18  #[serde(rename = "long")]
19  long: Option<::models::AllocationInnerGroupLong>,
20  #[serde(rename = "short")]
21  short: Option<::models::AllocationInnerGroupShort>
22}
23
24impl AllocationInnerGroup {
25  /// portfolio allocation by group
26  pub fn new() -> AllocationInnerGroup {
27    AllocationInnerGroup {
28      long: None,
29      short: None
30    }
31  }
32
33  pub fn set_long(&mut self, long: ::models::AllocationInnerGroupLong) {
34    self.long = Some(long);
35  }
36
37  pub fn with_long(mut self, long: ::models::AllocationInnerGroupLong) -> AllocationInnerGroup {
38    self.long = Some(long);
39    self
40  }
41
42  pub fn long(&self) -> Option<&::models::AllocationInnerGroupLong> {
43    self.long.as_ref()
44  }
45
46  pub fn reset_long(&mut self) {
47    self.long = None;
48  }
49
50  pub fn set_short(&mut self, short: ::models::AllocationInnerGroupShort) {
51    self.short = Some(short);
52  }
53
54  pub fn with_short(mut self, short: ::models::AllocationInnerGroupShort) -> AllocationInnerGroup {
55    self.short = Some(short);
56    self
57  }
58
59  pub fn short(&self) -> Option<&::models::AllocationInnerGroupShort> {
60    self.short.as_ref()
61  }
62
63  pub fn reset_short(&mut self) {
64    self.short = None;
65  }
66
67}
68
69
70