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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
#[allow(unused_imports)]
use serde_json::Value;
#[derive(Debug, Serialize, Deserialize)]
pub struct DayUsageData {
#[serde(rename = "countDailyDataPoints")]
count_daily_data_points: Option<i32>,
#[serde(rename = "day")]
day: Option<String>,
#[serde(rename = "discount")]
discount: Option<f32>,
#[serde(rename = "dpmPerContainerHostQuota")]
dpm_per_container_host_quota: Option<i64>,
#[serde(rename = "dpmPerHostQuota")]
dpm_per_host_quota: Option<i64>,
#[serde(rename = "fixedMonthlyPrice")]
fixed_monthly_price: Option<f32>,
#[serde(rename = "fixedMonthlyPricePerHour")]
fixed_monthly_price_per_hour: Option<f32>,
#[serde(rename = "freeContainersPerHost")]
free_containers_per_host: Option<i32>,
#[serde(rename = "id")]
id: Option<i64>,
#[serde(rename = "kiloDpmOveragePricePerHour")]
kilo_dpm_overage_price_per_hour: Option<f32>,
#[serde(rename = "planType")]
plan_type: Option<String>,
#[serde(rename = "pricePerContainerHostHour")]
price_per_container_host_hour: Option<f32>,
#[serde(rename = "pricePerContainerHour")]
price_per_container_hour: Option<f32>,
#[serde(rename = "pricePerServerHour")]
price_per_server_hour: Option<f32>,
#[serde(rename = "sumNumberOfContainerHosts")]
sum_number_of_container_hosts: Option<i32>,
#[serde(rename = "sumNumberOfContainers")]
sum_number_of_containers: Option<i32>,
#[serde(rename = "sumNumberOfServers")]
sum_number_of_servers: Option<i32>,
#[serde(rename = "usageAmount")]
usage_amount: Option<f32>,
#[serde(rename = "usedPlan")]
used_plan: Option<String>,
#[serde(rename = "userDiscount")]
user_discount: Option<f32>
}
impl DayUsageData {
pub fn new() -> DayUsageData {
DayUsageData {
count_daily_data_points: None,
day: None,
discount: None,
dpm_per_container_host_quota: None,
dpm_per_host_quota: None,
fixed_monthly_price: None,
fixed_monthly_price_per_hour: None,
free_containers_per_host: None,
id: None,
kilo_dpm_overage_price_per_hour: None,
plan_type: None,
price_per_container_host_hour: None,
price_per_container_hour: None,
price_per_server_hour: None,
sum_number_of_container_hosts: None,
sum_number_of_containers: None,
sum_number_of_servers: None,
usage_amount: None,
used_plan: None,
user_discount: None
}
}
pub fn set_count_daily_data_points(&mut self, count_daily_data_points: i32) {
self.count_daily_data_points = Some(count_daily_data_points);
}
pub fn with_count_daily_data_points(mut self, count_daily_data_points: i32) -> DayUsageData {
self.count_daily_data_points = Some(count_daily_data_points);
self
}
pub fn count_daily_data_points(&self) -> Option<&i32> {
self.count_daily_data_points.as_ref()
}
pub fn reset_count_daily_data_points(&mut self) {
self.count_daily_data_points = None;
}
pub fn set_day(&mut self, day: String) {
self.day = Some(day);
}
pub fn with_day(mut self, day: String) -> DayUsageData {
self.day = Some(day);
self
}
pub fn day(&self) -> Option<&String> {
self.day.as_ref()
}
pub fn reset_day(&mut self) {
self.day = None;
}
pub fn set_discount(&mut self, discount: f32) {
self.discount = Some(discount);
}
pub fn with_discount(mut self, discount: f32) -> DayUsageData {
self.discount = Some(discount);
self
}
pub fn discount(&self) -> Option<&f32> {
self.discount.as_ref()
}
pub fn reset_discount(&mut self) {
self.discount = None;
}
pub fn set_dpm_per_container_host_quota(&mut self, dpm_per_container_host_quota: i64) {
self.dpm_per_container_host_quota = Some(dpm_per_container_host_quota);
}
pub fn with_dpm_per_container_host_quota(mut self, dpm_per_container_host_quota: i64) -> DayUsageData {
self.dpm_per_container_host_quota = Some(dpm_per_container_host_quota);
self
}
pub fn dpm_per_container_host_quota(&self) -> Option<&i64> {
self.dpm_per_container_host_quota.as_ref()
}
pub fn reset_dpm_per_container_host_quota(&mut self) {
self.dpm_per_container_host_quota = None;
}
pub fn set_dpm_per_host_quota(&mut self, dpm_per_host_quota: i64) {
self.dpm_per_host_quota = Some(dpm_per_host_quota);
}
pub fn with_dpm_per_host_quota(mut self, dpm_per_host_quota: i64) -> DayUsageData {
self.dpm_per_host_quota = Some(dpm_per_host_quota);
self
}
pub fn dpm_per_host_quota(&self) -> Option<&i64> {
self.dpm_per_host_quota.as_ref()
}
pub fn reset_dpm_per_host_quota(&mut self) {
self.dpm_per_host_quota = None;
}
pub fn set_fixed_monthly_price(&mut self, fixed_monthly_price: f32) {
self.fixed_monthly_price = Some(fixed_monthly_price);
}
pub fn with_fixed_monthly_price(mut self, fixed_monthly_price: f32) -> DayUsageData {
self.fixed_monthly_price = Some(fixed_monthly_price);
self
}
pub fn fixed_monthly_price(&self) -> Option<&f32> {
self.fixed_monthly_price.as_ref()
}
pub fn reset_fixed_monthly_price(&mut self) {
self.fixed_monthly_price = None;
}
pub fn set_fixed_monthly_price_per_hour(&mut self, fixed_monthly_price_per_hour: f32) {
self.fixed_monthly_price_per_hour = Some(fixed_monthly_price_per_hour);
}
pub fn with_fixed_monthly_price_per_hour(mut self, fixed_monthly_price_per_hour: f32) -> DayUsageData {
self.fixed_monthly_price_per_hour = Some(fixed_monthly_price_per_hour);
self
}
pub fn fixed_monthly_price_per_hour(&self) -> Option<&f32> {
self.fixed_monthly_price_per_hour.as_ref()
}
pub fn reset_fixed_monthly_price_per_hour(&mut self) {
self.fixed_monthly_price_per_hour = None;
}
pub fn set_free_containers_per_host(&mut self, free_containers_per_host: i32) {
self.free_containers_per_host = Some(free_containers_per_host);
}
pub fn with_free_containers_per_host(mut self, free_containers_per_host: i32) -> DayUsageData {
self.free_containers_per_host = Some(free_containers_per_host);
self
}
pub fn free_containers_per_host(&self) -> Option<&i32> {
self.free_containers_per_host.as_ref()
}
pub fn reset_free_containers_per_host(&mut self) {
self.free_containers_per_host = None;
}
pub fn set_id(&mut self, id: i64) {
self.id = Some(id);
}
pub fn with_id(mut self, id: i64) -> DayUsageData {
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_kilo_dpm_overage_price_per_hour(&mut self, kilo_dpm_overage_price_per_hour: f32) {
self.kilo_dpm_overage_price_per_hour = Some(kilo_dpm_overage_price_per_hour);
}
pub fn with_kilo_dpm_overage_price_per_hour(mut self, kilo_dpm_overage_price_per_hour: f32) -> DayUsageData {
self.kilo_dpm_overage_price_per_hour = Some(kilo_dpm_overage_price_per_hour);
self
}
pub fn kilo_dpm_overage_price_per_hour(&self) -> Option<&f32> {
self.kilo_dpm_overage_price_per_hour.as_ref()
}
pub fn reset_kilo_dpm_overage_price_per_hour(&mut self) {
self.kilo_dpm_overage_price_per_hour = None;
}
pub fn set_plan_type(&mut self, plan_type: String) {
self.plan_type = Some(plan_type);
}
pub fn with_plan_type(mut self, plan_type: String) -> DayUsageData {
self.plan_type = Some(plan_type);
self
}
pub fn plan_type(&self) -> Option<&String> {
self.plan_type.as_ref()
}
pub fn reset_plan_type(&mut self) {
self.plan_type = None;
}
pub fn set_price_per_container_host_hour(&mut self, price_per_container_host_hour: f32) {
self.price_per_container_host_hour = Some(price_per_container_host_hour);
}
pub fn with_price_per_container_host_hour(mut self, price_per_container_host_hour: f32) -> DayUsageData {
self.price_per_container_host_hour = Some(price_per_container_host_hour);
self
}
pub fn price_per_container_host_hour(&self) -> Option<&f32> {
self.price_per_container_host_hour.as_ref()
}
pub fn reset_price_per_container_host_hour(&mut self) {
self.price_per_container_host_hour = None;
}
pub fn set_price_per_container_hour(&mut self, price_per_container_hour: f32) {
self.price_per_container_hour = Some(price_per_container_hour);
}
pub fn with_price_per_container_hour(mut self, price_per_container_hour: f32) -> DayUsageData {
self.price_per_container_hour = Some(price_per_container_hour);
self
}
pub fn price_per_container_hour(&self) -> Option<&f32> {
self.price_per_container_hour.as_ref()
}
pub fn reset_price_per_container_hour(&mut self) {
self.price_per_container_hour = None;
}
pub fn set_price_per_server_hour(&mut self, price_per_server_hour: f32) {
self.price_per_server_hour = Some(price_per_server_hour);
}
pub fn with_price_per_server_hour(mut self, price_per_server_hour: f32) -> DayUsageData {
self.price_per_server_hour = Some(price_per_server_hour);
self
}
pub fn price_per_server_hour(&self) -> Option<&f32> {
self.price_per_server_hour.as_ref()
}
pub fn reset_price_per_server_hour(&mut self) {
self.price_per_server_hour = None;
}
pub fn set_sum_number_of_container_hosts(&mut self, sum_number_of_container_hosts: i32) {
self.sum_number_of_container_hosts = Some(sum_number_of_container_hosts);
}
pub fn with_sum_number_of_container_hosts(mut self, sum_number_of_container_hosts: i32) -> DayUsageData {
self.sum_number_of_container_hosts = Some(sum_number_of_container_hosts);
self
}
pub fn sum_number_of_container_hosts(&self) -> Option<&i32> {
self.sum_number_of_container_hosts.as_ref()
}
pub fn reset_sum_number_of_container_hosts(&mut self) {
self.sum_number_of_container_hosts = None;
}
pub fn set_sum_number_of_containers(&mut self, sum_number_of_containers: i32) {
self.sum_number_of_containers = Some(sum_number_of_containers);
}
pub fn with_sum_number_of_containers(mut self, sum_number_of_containers: i32) -> DayUsageData {
self.sum_number_of_containers = Some(sum_number_of_containers);
self
}
pub fn sum_number_of_containers(&self) -> Option<&i32> {
self.sum_number_of_containers.as_ref()
}
pub fn reset_sum_number_of_containers(&mut self) {
self.sum_number_of_containers = None;
}
pub fn set_sum_number_of_servers(&mut self, sum_number_of_servers: i32) {
self.sum_number_of_servers = Some(sum_number_of_servers);
}
pub fn with_sum_number_of_servers(mut self, sum_number_of_servers: i32) -> DayUsageData {
self.sum_number_of_servers = Some(sum_number_of_servers);
self
}
pub fn sum_number_of_servers(&self) -> Option<&i32> {
self.sum_number_of_servers.as_ref()
}
pub fn reset_sum_number_of_servers(&mut self) {
self.sum_number_of_servers = None;
}
pub fn set_usage_amount(&mut self, usage_amount: f32) {
self.usage_amount = Some(usage_amount);
}
pub fn with_usage_amount(mut self, usage_amount: f32) -> DayUsageData {
self.usage_amount = Some(usage_amount);
self
}
pub fn usage_amount(&self) -> Option<&f32> {
self.usage_amount.as_ref()
}
pub fn reset_usage_amount(&mut self) {
self.usage_amount = None;
}
pub fn set_used_plan(&mut self, used_plan: String) {
self.used_plan = Some(used_plan);
}
pub fn with_used_plan(mut self, used_plan: String) -> DayUsageData {
self.used_plan = Some(used_plan);
self
}
pub fn used_plan(&self) -> Option<&String> {
self.used_plan.as_ref()
}
pub fn reset_used_plan(&mut self) {
self.used_plan = None;
}
pub fn set_user_discount(&mut self, user_discount: f32) {
self.user_discount = Some(user_discount);
}
pub fn with_user_discount(mut self, user_discount: f32) -> DayUsageData {
self.user_discount = Some(user_discount);
self
}
pub fn user_discount(&self) -> Option<&f32> {
self.user_discount.as_ref()
}
pub fn reset_user_discount(&mut self) {
self.user_discount = None;
}
}