1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
#[allow(unused_imports)]
use serde_json::Value;
#[derive(Debug, Serialize, Deserialize)]
pub struct NotificationIntegration {
#[serde(rename = "applicability")]
applicability: Option<String>,
#[serde(rename = "createDate")]
create_date: Option<String>,
#[serde(rename = "createdByOwner")]
created_by_owner: Option<bool>,
#[serde(rename = "creatorId")]
creator_id: Option<i64>,
#[serde(rename = "id")]
id: Option<i64>,
#[serde(rename = "integrationType")]
integration_type: Option<String>,
#[serde(rename = "name")]
name: Option<String>,
#[serde(rename = "params")]
params: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "state")]
state: Option<String>,
#[serde(rename = "userId")]
user_id: Option<i64>
}
impl NotificationIntegration {
pub fn new() -> NotificationIntegration {
NotificationIntegration {
applicability: None,
create_date: None,
created_by_owner: None,
creator_id: None,
id: None,
integration_type: None,
name: None,
params: None,
state: None,
user_id: None
}
}
pub fn set_applicability(&mut self, applicability: String) {
self.applicability = Some(applicability);
}
pub fn with_applicability(mut self, applicability: String) -> NotificationIntegration {
self.applicability = Some(applicability);
self
}
pub fn applicability(&self) -> Option<&String> {
self.applicability.as_ref()
}
pub fn reset_applicability(&mut self) {
self.applicability = None;
}
pub fn set_create_date(&mut self, create_date: String) {
self.create_date = Some(create_date);
}
pub fn with_create_date(mut self, create_date: String) -> NotificationIntegration {
self.create_date = Some(create_date);
self
}
pub fn create_date(&self) -> Option<&String> {
self.create_date.as_ref()
}
pub fn reset_create_date(&mut self) {
self.create_date = None;
}
pub fn set_created_by_owner(&mut self, created_by_owner: bool) {
self.created_by_owner = Some(created_by_owner);
}
pub fn with_created_by_owner(mut self, created_by_owner: bool) -> NotificationIntegration {
self.created_by_owner = Some(created_by_owner);
self
}
pub fn created_by_owner(&self) -> Option<&bool> {
self.created_by_owner.as_ref()
}
pub fn reset_created_by_owner(&mut self) {
self.created_by_owner = None;
}
pub fn set_creator_id(&mut self, creator_id: i64) {
self.creator_id = Some(creator_id);
}
pub fn with_creator_id(mut self, creator_id: i64) -> NotificationIntegration {
self.creator_id = Some(creator_id);
self
}
pub fn creator_id(&self) -> Option<&i64> {
self.creator_id.as_ref()
}
pub fn reset_creator_id(&mut self) {
self.creator_id = None;
}
pub fn set_id(&mut self, id: i64) {
self.id = Some(id);
}
pub fn with_id(mut self, id: i64) -> NotificationIntegration {
self.id = Some(id);
self
}
pub fn id(&self) -> Option<&i64> {
self.id.as_ref()
}
pub fn reset_id(&mut self) {
self.id = None;
}
pub fn set_integration_type(&mut self, integration_type: String) {
self.integration_type = Some(integration_type);
}
pub fn with_integration_type(mut self, integration_type: String) -> NotificationIntegration {
self.integration_type = Some(integration_type);
self
}
pub fn integration_type(&self) -> Option<&String> {
self.integration_type.as_ref()
}
pub fn reset_integration_type(&mut self) {
self.integration_type = None;
}
pub fn set_name(&mut self, name: String) {
self.name = Some(name);
}
pub fn with_name(mut self, name: String) -> NotificationIntegration {
self.name = Some(name);
self
}
pub fn name(&self) -> Option<&String> {
self.name.as_ref()
}
pub fn reset_name(&mut self) {
self.name = None;
}
pub fn set_params(&mut self, params: ::std::collections::HashMap<String, String>) {
self.params = Some(params);
}
pub fn with_params(mut self, params: ::std::collections::HashMap<String, String>) -> NotificationIntegration {
self.params = Some(params);
self
}
pub fn params(&self) -> Option<&::std::collections::HashMap<String, String>> {
self.params.as_ref()
}
pub fn reset_params(&mut self) {
self.params = None;
}
pub fn set_state(&mut self, state: String) {
self.state = Some(state);
}
pub fn with_state(mut self, state: String) -> NotificationIntegration {
self.state = Some(state);
self
}
pub fn state(&self) -> Option<&String> {
self.state.as_ref()
}
pub fn reset_state(&mut self) {
self.state = None;
}
pub fn set_user_id(&mut self, user_id: i64) {
self.user_id = Some(user_id);
}
pub fn with_user_id(mut self, user_id: i64) -> NotificationIntegration {
self.user_id = Some(user_id);
self
}
pub fn user_id(&self) -> Option<&i64> {
self.user_id.as_ref()
}
pub fn reset_user_id(&mut self) {
self.user_id = None;
}
}