ib/models/
allocation_inner.rs1#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct AllocationInner {
18 #[serde(rename = "assetClass")]
19 asset_class: Option<::models::AllocationInnerAssetClass>,
20 #[serde(rename = "group")]
21 group: Option<::models::AllocationInnerGroup>,
22 #[serde(rename = "sector")]
23 sector: Option<::models::AllocationInnerSector>
24}
25
26impl AllocationInner {
27 pub fn new() -> AllocationInner {
29 AllocationInner {
30 asset_class: None,
31 group: None,
32 sector: None
33 }
34 }
35
36 pub fn set_asset_class(&mut self, asset_class: ::models::AllocationInnerAssetClass) {
37 self.asset_class = Some(asset_class);
38 }
39
40 pub fn with_asset_class(mut self, asset_class: ::models::AllocationInnerAssetClass) -> AllocationInner {
41 self.asset_class = Some(asset_class);
42 self
43 }
44
45 pub fn asset_class(&self) -> Option<&::models::AllocationInnerAssetClass> {
46 self.asset_class.as_ref()
47 }
48
49 pub fn reset_asset_class(&mut self) {
50 self.asset_class = None;
51 }
52
53 pub fn set_group(&mut self, group: ::models::AllocationInnerGroup) {
54 self.group = Some(group);
55 }
56
57 pub fn with_group(mut self, group: ::models::AllocationInnerGroup) -> AllocationInner {
58 self.group = Some(group);
59 self
60 }
61
62 pub fn group(&self) -> Option<&::models::AllocationInnerGroup> {
63 self.group.as_ref()
64 }
65
66 pub fn reset_group(&mut self) {
67 self.group = None;
68 }
69
70 pub fn set_sector(&mut self, sector: ::models::AllocationInnerSector) {
71 self.sector = Some(sector);
72 }
73
74 pub fn with_sector(mut self, sector: ::models::AllocationInnerSector) -> AllocationInner {
75 self.sector = Some(sector);
76 self
77 }
78
79 pub fn sector(&self) -> Option<&::models::AllocationInnerSector> {
80 self.sector.as_ref()
81 }
82
83 pub fn reset_sector(&mut self) {
84 self.sector = None;
85 }
86
87}
88
89
90