stcloud/models/
app.rs

1/* 
2 * Sematext Cloud API
3 *
4 * API Explorer provides access and documentation for Sematext REST API. The REST API requires the API Key to be sent as part of `Authorization` header. E.g.: `Authorization : apiKey e5f18450-205a-48eb-8589-7d49edaea813`.
5 *
6 * OpenAPI spec version: v3
7 * 
8 * Generated by: https://github.com/swagger-api/swagger-codegen.git
9 */
10#![allow(unused_imports)]
11
12use serde_json::Value;
13use bigdecimal::BigDecimal;
14use chrono::{Date, NaiveDateTime, NaiveDate, DateTime, FixedOffset, Utc};
15
16use crate::models::*;
17use crate::date_serializer;
18use crate::date_serializer_opt;
19use crate::serialize_quoted_numbers;
20use crate::serialize_quoted_numbers_opt;
21//Uncomment this to deal with limited rfc support on server side
22//use crate::datetime_serializer::*;
23
24#[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
25pub struct App {
26  #[serde(rename = "ajaxThreshold")]
27  #[serde(default)]
28  ajax_threshold: Option<i64>, 
29  #[serde(rename = "appType")]
30  #[serde(default)]
31  app_type: Option<String>, 
32  #[serde(rename = "appTypeId")]
33  #[serde(default)]
34  app_type_id: Option<i64>, 
35  #[serde(rename = "creatorEmail")]
36  #[serde(default)]
37  creator_email: Option<String>, 
38  #[serde(rename = "creditCardExpiry")]
39  #[serde(default)]
40  credit_card_expiry: Option<String>, 
41  #[serde(rename = "creditCardNumber")]
42  #[serde(default)]
43  credit_card_number: Option<String>, 
44  #[serde(rename = "description")]
45  #[serde(default)]
46  description: Option<String>, 
47  #[serde(rename = "displayStatus")]
48  #[serde(default)]
49  display_status: Option<String>, 
50  #[serde(rename = "firstDataSavedDate")]
51  #[serde(default)]
52  first_data_saved_date: Option<i64>, 
53  #[serde(rename = "id")]
54  #[serde(default)]
55  id: Option<i64>, 
56  #[serde(rename = "integration")]
57  #[serde(default)]
58  integration: Option<ServiceIntegration>, 
59  #[serde(rename = "lastDataReceivedDate")]
60  #[serde(default)]
61  last_data_received_date: Option<i64>, 
62  #[serde(rename = "lastDataSavedDate")]
63  #[serde(default)]
64  last_data_saved_date: Option<i64>, 
65  #[serde(rename = "loggedInUserAppRole")]
66  #[serde(default)]
67  logged_in_user_app_role: Option<String>, 
68  #[serde(rename = "monthlyInvoiceAccount")]
69  #[serde(default)]
70  monthly_invoice_account: Option<bool>, 
71  #[serde(rename = "name")]
72  #[serde(default)]
73  name: Option<String>, 
74  #[serde(rename = "ownerEmail")]
75  #[serde(default)]
76  owner_email: Option<String>, 
77  #[serde(rename = "owningOrganization")]
78  #[serde(default)]
79  owning_organization: Option<BasicOrganizationDto>, 
80  #[serde(rename = "pageLoadThreshold")]
81  #[serde(default)]
82  page_load_threshold: Option<i64>, 
83  #[serde(rename = "paymentMethodId")]
84  #[serde(default)]
85  payment_method_id: Option<i64>, 
86  #[serde(rename = "plan")]
87  #[serde(default)]
88  plan: Option<Plan>, 
89  #[serde(rename = "prepaidAccount")]
90  #[serde(default)]
91  prepaid_account: Option<bool>, 
92  #[serde(rename = "readToken")]
93  #[serde(default)]
94  read_token: Option<String>, 
95  #[serde(rename = "readWriteToken")]
96  #[serde(default)]
97  read_write_token: Option<String>, 
98  #[serde(rename = "registrationDate")]
99  #[serde(default)]
100  registration_date: Option<i64>, 
101  #[serde(rename = "status")]
102  #[serde(default)]
103  status: Option<String>, 
104  #[serde(rename = "token")]
105  #[serde(default)]
106  token: Option<String>, 
107  #[serde(rename = "tokens")]
108  #[serde(default)]
109  tokens: Option<Vec<String>>, 
110  #[serde(rename = "trialEndDate")]
111  #[serde(default)]
112  trial_end_date: Option<i64>, 
113  #[serde(rename = "urlGroupLimit")]
114  #[serde(default)]
115  url_group_limit: Option<i32>, 
116  #[serde(rename = "userRoles")]
117  #[serde(default)]
118  user_roles: Option<Vec<UserRole>>, 
119  #[serde(rename = "writeToken")]
120  #[serde(default)]
121  write_token: Option<String> 
122}
123
124impl App {
125  pub fn new() -> App {
126    App {
127      ajax_threshold: None,
128      app_type: None,
129      app_type_id: None,
130      creator_email: None,
131      credit_card_expiry: None,
132      credit_card_number: None,
133      description: None,
134      display_status: None,
135      first_data_saved_date: None,
136      id: None,
137      integration: None,
138      last_data_received_date: None,
139      last_data_saved_date: None,
140      logged_in_user_app_role: None,
141      monthly_invoice_account: None,
142      name: None,
143      owner_email: None,
144      owning_organization: None,
145      page_load_threshold: None,
146      payment_method_id: None,
147      plan: None,
148      prepaid_account: None,
149      read_token: None,
150      read_write_token: None,
151      registration_date: None,
152      status: None,
153      token: None,
154      tokens: None,
155      trial_end_date: None,
156      url_group_limit: None,
157      user_roles: None,
158      write_token: None
159    }
160  }
161
162  pub fn set_ajax_threshold(&mut self, ajax_threshold: i64) {
163    self.ajax_threshold = Some(ajax_threshold);
164  }
165
166  pub fn with_ajax_threshold(mut self, ajax_threshold: i64) -> App {
167    self.ajax_threshold = Some(ajax_threshold);
168    self
169  }
170
171  pub fn ajax_threshold(&self) -> Option<&i64> {
172    self.ajax_threshold.as_ref()
173  }
174
175  pub fn reset_ajax_threshold(&mut self) {
176    self.ajax_threshold = None;
177  }
178
179  pub fn set_app_type(&mut self, app_type: String) {
180    self.app_type = Some(app_type);
181  }
182
183  pub fn with_app_type(mut self, app_type: String) -> App {
184    self.app_type = Some(app_type);
185    self
186  }
187
188  pub fn app_type(&self) -> Option<&String> {
189    self.app_type.as_ref()
190  }
191
192  pub fn reset_app_type(&mut self) {
193    self.app_type = None;
194  }
195
196  pub fn set_app_type_id(&mut self, app_type_id: i64) {
197    self.app_type_id = Some(app_type_id);
198  }
199
200  pub fn with_app_type_id(mut self, app_type_id: i64) -> App {
201    self.app_type_id = Some(app_type_id);
202    self
203  }
204
205  pub fn app_type_id(&self) -> Option<&i64> {
206    self.app_type_id.as_ref()
207  }
208
209  pub fn reset_app_type_id(&mut self) {
210    self.app_type_id = None;
211  }
212
213  pub fn set_creator_email(&mut self, creator_email: String) {
214    self.creator_email = Some(creator_email);
215  }
216
217  pub fn with_creator_email(mut self, creator_email: String) -> App {
218    self.creator_email = Some(creator_email);
219    self
220  }
221
222  pub fn creator_email(&self) -> Option<&String> {
223    self.creator_email.as_ref()
224  }
225
226  pub fn reset_creator_email(&mut self) {
227    self.creator_email = None;
228  }
229
230  pub fn set_credit_card_expiry(&mut self, credit_card_expiry: String) {
231    self.credit_card_expiry = Some(credit_card_expiry);
232  }
233
234  pub fn with_credit_card_expiry(mut self, credit_card_expiry: String) -> App {
235    self.credit_card_expiry = Some(credit_card_expiry);
236    self
237  }
238
239  pub fn credit_card_expiry(&self) -> Option<&String> {
240    self.credit_card_expiry.as_ref()
241  }
242
243  pub fn reset_credit_card_expiry(&mut self) {
244    self.credit_card_expiry = None;
245  }
246
247  pub fn set_credit_card_number(&mut self, credit_card_number: String) {
248    self.credit_card_number = Some(credit_card_number);
249  }
250
251  pub fn with_credit_card_number(mut self, credit_card_number: String) -> App {
252    self.credit_card_number = Some(credit_card_number);
253    self
254  }
255
256  pub fn credit_card_number(&self) -> Option<&String> {
257    self.credit_card_number.as_ref()
258  }
259
260  pub fn reset_credit_card_number(&mut self) {
261    self.credit_card_number = None;
262  }
263
264  pub fn set_description(&mut self, description: String) {
265    self.description = Some(description);
266  }
267
268  pub fn with_description(mut self, description: String) -> App {
269    self.description = Some(description);
270    self
271  }
272
273  pub fn description(&self) -> Option<&String> {
274    self.description.as_ref()
275  }
276
277  pub fn reset_description(&mut self) {
278    self.description = None;
279  }
280
281  pub fn set_display_status(&mut self, display_status: String) {
282    self.display_status = Some(display_status);
283  }
284
285  pub fn with_display_status(mut self, display_status: String) -> App {
286    self.display_status = Some(display_status);
287    self
288  }
289
290  pub fn display_status(&self) -> Option<&String> {
291    self.display_status.as_ref()
292  }
293
294  pub fn reset_display_status(&mut self) {
295    self.display_status = None;
296  }
297
298  pub fn set_first_data_saved_date(&mut self, first_data_saved_date: i64) {
299    self.first_data_saved_date = Some(first_data_saved_date);
300  }
301
302  pub fn with_first_data_saved_date(mut self, first_data_saved_date: i64) -> App {
303    self.first_data_saved_date = Some(first_data_saved_date);
304    self
305  }
306
307  pub fn first_data_saved_date(&self) -> Option<&i64> {
308    self.first_data_saved_date.as_ref()
309  }
310
311  pub fn reset_first_data_saved_date(&mut self) {
312    self.first_data_saved_date = None;
313  }
314
315  pub fn set_id(&mut self, id: i64) {
316    self.id = Some(id);
317  }
318
319  pub fn with_id(mut self, id: i64) -> App {
320    self.id = Some(id);
321    self
322  }
323
324  pub fn id(&self) -> Option<&i64> {
325    self.id.as_ref()
326  }
327
328  pub fn reset_id(&mut self) {
329    self.id = None;
330  }
331
332  pub fn set_integration(&mut self, integration: ServiceIntegration) {
333    self.integration = Some(integration);
334  }
335
336  pub fn with_integration(mut self, integration: ServiceIntegration) -> App {
337    self.integration = Some(integration);
338    self
339  }
340
341  pub fn integration(&self) -> Option<&ServiceIntegration> {
342    self.integration.as_ref()
343  }
344
345  pub fn reset_integration(&mut self) {
346    self.integration = None;
347  }
348
349  pub fn set_last_data_received_date(&mut self, last_data_received_date: i64) {
350    self.last_data_received_date = Some(last_data_received_date);
351  }
352
353  pub fn with_last_data_received_date(mut self, last_data_received_date: i64) -> App {
354    self.last_data_received_date = Some(last_data_received_date);
355    self
356  }
357
358  pub fn last_data_received_date(&self) -> Option<&i64> {
359    self.last_data_received_date.as_ref()
360  }
361
362  pub fn reset_last_data_received_date(&mut self) {
363    self.last_data_received_date = None;
364  }
365
366  pub fn set_last_data_saved_date(&mut self, last_data_saved_date: i64) {
367    self.last_data_saved_date = Some(last_data_saved_date);
368  }
369
370  pub fn with_last_data_saved_date(mut self, last_data_saved_date: i64) -> App {
371    self.last_data_saved_date = Some(last_data_saved_date);
372    self
373  }
374
375  pub fn last_data_saved_date(&self) -> Option<&i64> {
376    self.last_data_saved_date.as_ref()
377  }
378
379  pub fn reset_last_data_saved_date(&mut self) {
380    self.last_data_saved_date = None;
381  }
382
383  pub fn set_logged_in_user_app_role(&mut self, logged_in_user_app_role: String) {
384    self.logged_in_user_app_role = Some(logged_in_user_app_role);
385  }
386
387  pub fn with_logged_in_user_app_role(mut self, logged_in_user_app_role: String) -> App {
388    self.logged_in_user_app_role = Some(logged_in_user_app_role);
389    self
390  }
391
392  pub fn logged_in_user_app_role(&self) -> Option<&String> {
393    self.logged_in_user_app_role.as_ref()
394  }
395
396  pub fn reset_logged_in_user_app_role(&mut self) {
397    self.logged_in_user_app_role = None;
398  }
399
400  pub fn set_monthly_invoice_account(&mut self, monthly_invoice_account: bool) {
401    self.monthly_invoice_account = Some(monthly_invoice_account);
402  }
403
404  pub fn with_monthly_invoice_account(mut self, monthly_invoice_account: bool) -> App {
405    self.monthly_invoice_account = Some(monthly_invoice_account);
406    self
407  }
408
409  pub fn monthly_invoice_account(&self) -> Option<&bool> {
410    self.monthly_invoice_account.as_ref()
411  }
412
413  pub fn reset_monthly_invoice_account(&mut self) {
414    self.monthly_invoice_account = None;
415  }
416
417  pub fn set_name(&mut self, name: String) {
418    self.name = Some(name);
419  }
420
421  pub fn with_name(mut self, name: String) -> App {
422    self.name = Some(name);
423    self
424  }
425
426  pub fn name(&self) -> Option<&String> {
427    self.name.as_ref()
428  }
429
430  pub fn reset_name(&mut self) {
431    self.name = None;
432  }
433
434  pub fn set_owner_email(&mut self, owner_email: String) {
435    self.owner_email = Some(owner_email);
436  }
437
438  pub fn with_owner_email(mut self, owner_email: String) -> App {
439    self.owner_email = Some(owner_email);
440    self
441  }
442
443  pub fn owner_email(&self) -> Option<&String> {
444    self.owner_email.as_ref()
445  }
446
447  pub fn reset_owner_email(&mut self) {
448    self.owner_email = None;
449  }
450
451  pub fn set_owning_organization(&mut self, owning_organization: BasicOrganizationDto) {
452    self.owning_organization = Some(owning_organization);
453  }
454
455  pub fn with_owning_organization(mut self, owning_organization: BasicOrganizationDto) -> App {
456    self.owning_organization = Some(owning_organization);
457    self
458  }
459
460  pub fn owning_organization(&self) -> Option<&BasicOrganizationDto> {
461    self.owning_organization.as_ref()
462  }
463
464  pub fn reset_owning_organization(&mut self) {
465    self.owning_organization = None;
466  }
467
468  pub fn set_page_load_threshold(&mut self, page_load_threshold: i64) {
469    self.page_load_threshold = Some(page_load_threshold);
470  }
471
472  pub fn with_page_load_threshold(mut self, page_load_threshold: i64) -> App {
473    self.page_load_threshold = Some(page_load_threshold);
474    self
475  }
476
477  pub fn page_load_threshold(&self) -> Option<&i64> {
478    self.page_load_threshold.as_ref()
479  }
480
481  pub fn reset_page_load_threshold(&mut self) {
482    self.page_load_threshold = None;
483  }
484
485  pub fn set_payment_method_id(&mut self, payment_method_id: i64) {
486    self.payment_method_id = Some(payment_method_id);
487  }
488
489  pub fn with_payment_method_id(mut self, payment_method_id: i64) -> App {
490    self.payment_method_id = Some(payment_method_id);
491    self
492  }
493
494  pub fn payment_method_id(&self) -> Option<&i64> {
495    self.payment_method_id.as_ref()
496  }
497
498  pub fn reset_payment_method_id(&mut self) {
499    self.payment_method_id = None;
500  }
501
502  pub fn set_plan(&mut self, plan: Plan) {
503    self.plan = Some(plan);
504  }
505
506  pub fn with_plan(mut self, plan: Plan) -> App {
507    self.plan = Some(plan);
508    self
509  }
510
511  pub fn plan(&self) -> Option<&Plan> {
512    self.plan.as_ref()
513  }
514
515  pub fn reset_plan(&mut self) {
516    self.plan = None;
517  }
518
519  pub fn set_prepaid_account(&mut self, prepaid_account: bool) {
520    self.prepaid_account = Some(prepaid_account);
521  }
522
523  pub fn with_prepaid_account(mut self, prepaid_account: bool) -> App {
524    self.prepaid_account = Some(prepaid_account);
525    self
526  }
527
528  pub fn prepaid_account(&self) -> Option<&bool> {
529    self.prepaid_account.as_ref()
530  }
531
532  pub fn reset_prepaid_account(&mut self) {
533    self.prepaid_account = None;
534  }
535
536  pub fn set_read_token(&mut self, read_token: String) {
537    self.read_token = Some(read_token);
538  }
539
540  pub fn with_read_token(mut self, read_token: String) -> App {
541    self.read_token = Some(read_token);
542    self
543  }
544
545  pub fn read_token(&self) -> Option<&String> {
546    self.read_token.as_ref()
547  }
548
549  pub fn reset_read_token(&mut self) {
550    self.read_token = None;
551  }
552
553  pub fn set_read_write_token(&mut self, read_write_token: String) {
554    self.read_write_token = Some(read_write_token);
555  }
556
557  pub fn with_read_write_token(mut self, read_write_token: String) -> App {
558    self.read_write_token = Some(read_write_token);
559    self
560  }
561
562  pub fn read_write_token(&self) -> Option<&String> {
563    self.read_write_token.as_ref()
564  }
565
566  pub fn reset_read_write_token(&mut self) {
567    self.read_write_token = None;
568  }
569
570  pub fn set_registration_date(&mut self, registration_date: i64) {
571    self.registration_date = Some(registration_date);
572  }
573
574  pub fn with_registration_date(mut self, registration_date: i64) -> App {
575    self.registration_date = Some(registration_date);
576    self
577  }
578
579  pub fn registration_date(&self) -> Option<&i64> {
580    self.registration_date.as_ref()
581  }
582
583  pub fn reset_registration_date(&mut self) {
584    self.registration_date = None;
585  }
586
587  pub fn set_status(&mut self, status: String) {
588    self.status = Some(status);
589  }
590
591  pub fn with_status(mut self, status: String) -> App {
592    self.status = Some(status);
593    self
594  }
595
596  pub fn status(&self) -> Option<&String> {
597    self.status.as_ref()
598  }
599
600  pub fn reset_status(&mut self) {
601    self.status = None;
602  }
603
604  pub fn set_token(&mut self, token: String) {
605    self.token = Some(token);
606  }
607
608  pub fn with_token(mut self, token: String) -> App {
609    self.token = Some(token);
610    self
611  }
612
613  pub fn token(&self) -> Option<&String> {
614    self.token.as_ref()
615  }
616
617  pub fn reset_token(&mut self) {
618    self.token = None;
619  }
620
621  pub fn set_tokens(&mut self, tokens: Vec<String>) {
622    self.tokens = Some(tokens);
623  }
624
625  pub fn with_tokens(mut self, tokens: Vec<String>) -> App {
626    self.tokens = Some(tokens);
627    self
628  }
629
630  pub fn tokens(&self) -> Option<&Vec<String>> {
631    self.tokens.as_ref()
632  }
633
634  pub fn reset_tokens(&mut self) {
635    self.tokens = None;
636  }
637
638  pub fn set_trial_end_date(&mut self, trial_end_date: i64) {
639    self.trial_end_date = Some(trial_end_date);
640  }
641
642  pub fn with_trial_end_date(mut self, trial_end_date: i64) -> App {
643    self.trial_end_date = Some(trial_end_date);
644    self
645  }
646
647  pub fn trial_end_date(&self) -> Option<&i64> {
648    self.trial_end_date.as_ref()
649  }
650
651  pub fn reset_trial_end_date(&mut self) {
652    self.trial_end_date = None;
653  }
654
655  pub fn set_url_group_limit(&mut self, url_group_limit: i32) {
656    self.url_group_limit = Some(url_group_limit);
657  }
658
659  pub fn with_url_group_limit(mut self, url_group_limit: i32) -> App {
660    self.url_group_limit = Some(url_group_limit);
661    self
662  }
663
664  pub fn url_group_limit(&self) -> Option<&i32> {
665    self.url_group_limit.as_ref()
666  }
667
668  pub fn reset_url_group_limit(&mut self) {
669    self.url_group_limit = None;
670  }
671
672  pub fn set_user_roles(&mut self, user_roles: Vec<UserRole>) {
673    self.user_roles = Some(user_roles);
674  }
675
676  pub fn with_user_roles(mut self, user_roles: Vec<UserRole>) -> App {
677    self.user_roles = Some(user_roles);
678    self
679  }
680
681  pub fn user_roles(&self) -> Option<&Vec<UserRole>> {
682    self.user_roles.as_ref()
683  }
684
685  pub fn reset_user_roles(&mut self) {
686    self.user_roles = None;
687  }
688
689  pub fn set_write_token(&mut self, write_token: String) {
690    self.write_token = Some(write_token);
691  }
692
693  pub fn with_write_token(mut self, write_token: String) -> App {
694    self.write_token = Some(write_token);
695    self
696  }
697
698  pub fn write_token(&self) -> Option<&String> {
699    self.write_token.as_ref()
700  }
701
702  pub fn reset_write_token(&mut self) {
703    self.write_token = None;
704  }
705
706
707  pub fn validate(&self) {
708  }
709
710}
711
712