ib/models/
allocation_inner_group.rs1#[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 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