1#![allow(unused_imports, unused_qualifications, unused_extern_crates)]
7extern crate chrono;
8
9use serde::ser::Serializer;
10
11use models;
12use std::collections::BTreeMap as SortedHashMap;
13use std::collections::BTreeSet as SortedVec;
14use std::collections::HashMap;
15use std::string::ParseError;
16use uuid;
17
18#[allow(non_camel_case_types)]
23#[repr(C)]
24#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
25#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
26pub enum AccessRoles {
27 #[serde(rename = "READER")]
28 READER,
29 #[serde(rename = "WRITER")]
30 WRITER,
31 #[serde(rename = "MANAGER")]
32 MANAGER,
33}
34
35impl ::std::fmt::Display for AccessRoles {
36 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
37 match *self {
38 AccessRoles::READER => write!(f, "{}", "READER"),
39 AccessRoles::WRITER => write!(f, "{}", "WRITER"),
40 AccessRoles::MANAGER => write!(f, "{}", "MANAGER"),
41 }
42 }
43}
44
45impl ::std::str::FromStr for AccessRoles {
46 type Err = ();
47 fn from_str(s: &str) -> Result<Self, Self::Err> {
48 match s {
49 "READER" => Ok(AccessRoles::READER),
50 "WRITER" => Ok(AccessRoles::WRITER),
51 "MANAGER" => Ok(AccessRoles::MANAGER),
52 _ => Err(()),
53 }
54 }
55}
56
57#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
58#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
59pub struct Account {
60 #[serde(rename = "name")]
62 #[serde(skip_serializing_if = "Option::is_none")]
63 pub name: Option<String>,
64
65 #[serde(rename = "acct_id")]
67 pub acct_id: uuid::Uuid,
68
69 #[serde(rename = "created_at")]
71 #[serde(skip_serializing_if = "Option::is_none")]
72 pub created_at: Option<i64>,
73
74 #[serde(rename = "roles")]
76 #[serde(skip_serializing_if = "Option::is_none")]
77 pub roles: Option<Vec<models::AccessRoles>>,
78
79 #[serde(rename = "custom_logo")]
81 #[serde(skip_serializing_if = "Option::is_none")]
82 pub custom_logo: Option<crate::ByteArray>,
83
84 #[serde(rename = "status")]
85 #[serde(skip_serializing_if = "Option::is_none")]
86 pub status: Option<models::UserAccountStatus>,
87
88 #[serde(rename = "features")]
89 #[serde(skip_serializing_if = "Option::is_none")]
90 pub features: Option<Vec<String>>,
91
92 #[serde(rename = "auth_configs")]
93 #[serde(skip_serializing_if = "Option::is_none")]
94 pub auth_configs: Option<HashMap<String, models::AuthenticationConfig>>,
95
96 #[serde(rename = "approval_state")]
97 #[serde(skip_serializing_if = "Option::is_none")]
98 pub approval_state: Option<models::AccountApprovalState>,
99}
100
101impl Account {
102 pub fn new(acct_id: uuid::Uuid) -> Account {
103 Account {
104 name: None,
105 acct_id: acct_id,
106 created_at: None,
107 roles: None,
108 custom_logo: None,
109 status: None,
110 features: None,
111 auth_configs: None,
112 approval_state: None,
113 }
114 }
115}
116
117#[allow(non_camel_case_types)]
122#[repr(C)]
123#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
124#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
125pub enum AccountApprovalState {
126 #[serde(rename = "PENDING_CONFIRMATION")]
127 PENDING_CONFIRMATION,
128 #[serde(rename = "APPROVED")]
129 APPROVED,
130 #[serde(rename = "DISAPPROVED")]
131 DISAPPROVED,
132}
133
134impl ::std::fmt::Display for AccountApprovalState {
135 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
136 match *self {
137 AccountApprovalState::PENDING_CONFIRMATION => write!(f, "{}", "PENDING_CONFIRMATION"),
138 AccountApprovalState::APPROVED => write!(f, "{}", "APPROVED"),
139 AccountApprovalState::DISAPPROVED => write!(f, "{}", "DISAPPROVED"),
140 }
141 }
142}
143
144impl ::std::str::FromStr for AccountApprovalState {
145 type Err = ();
146 fn from_str(s: &str) -> Result<Self, Self::Err> {
147 match s {
148 "PENDING_CONFIRMATION" => Ok(AccountApprovalState::PENDING_CONFIRMATION),
149 "APPROVED" => Ok(AccountApprovalState::APPROVED),
150 "DISAPPROVED" => Ok(AccountApprovalState::DISAPPROVED),
151 _ => Err(()),
152 }
153 }
154}
155
156#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
157#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
158pub struct AccountListResponse {
159 #[serde(rename = "items")]
160 #[serde(skip_serializing_if = "Option::is_none")]
161 pub items: Option<Vec<models::Account>>,
162}
163
164impl AccountListResponse {
165 pub fn new() -> AccountListResponse {
166 AccountListResponse { items: None }
167 }
168}
169
170#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
171#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
172pub struct AccountRequest {
173 #[serde(rename = "name")]
175 pub name: String,
176
177 #[serde(rename = "custom_logo")]
179 #[serde(skip_serializing_if = "Option::is_none")]
180 pub custom_logo: Option<crate::ByteArray>,
181
182 #[serde(rename = "auth_configs")]
183 #[serde(skip_serializing_if = "Option::is_none")]
184 pub auth_configs: Option<Vec<models::AuthenticationConfig>>,
185}
186
187impl AccountRequest {
188 pub fn new(name: String) -> AccountRequest {
189 AccountRequest {
190 name: name,
191 custom_logo: None,
192 auth_configs: None,
193 }
194 }
195}
196
197#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
198#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
199pub struct AccountUpdateRequest {
200 #[serde(rename = "name")]
201 #[serde(skip_serializing_if = "Option::is_none")]
202 pub name: Option<String>,
203
204 #[serde(rename = "custom_logo")]
205 #[serde(skip_serializing_if = "Option::is_none")]
206 pub custom_logo: Option<crate::ByteArray>,
207
208 #[serde(rename = "features")]
209 #[serde(skip_serializing_if = "Option::is_none")]
210 pub features: Option<Vec<String>>,
211
212 #[serde(rename = "add_auth_configs")]
213 #[serde(skip_serializing_if = "Option::is_none")]
214 pub add_auth_configs: Option<Vec<models::AuthenticationConfig>>,
215
216 #[serde(rename = "mod_auth_configs")]
217 #[serde(skip_serializing_if = "Option::is_none")]
218 pub mod_auth_configs: Option<HashMap<String, models::AuthenticationConfig>>,
219
220 #[serde(rename = "del_auth_configs")]
221 #[serde(skip_serializing_if = "Option::is_none")]
222 pub del_auth_configs: Option<Vec<uuid::Uuid>>,
223}
224
225impl AccountUpdateRequest {
226 pub fn new() -> AccountUpdateRequest {
227 AccountUpdateRequest {
228 name: None,
229 custom_logo: None,
230 features: None,
231 add_auth_configs: None,
232 mod_auth_configs: None,
233 del_auth_configs: None,
234 }
235 }
236}
237
238#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
239#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
240pub struct AddZoneRequest {
241 #[serde(rename = "name")]
243 #[serde(skip_serializing_if = "Option::is_none")]
244 pub name: Option<String>,
245
246 #[serde(rename = "description")]
248 #[serde(skip_serializing_if = "Option::is_none")]
249 pub description: Option<String>,
250}
251
252impl AddZoneRequest {
253 pub fn new() -> AddZoneRequest {
254 AddZoneRequest {
255 name: None,
256 description: None,
257 }
258 }
259}
260
261#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
263#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
264pub struct AdvancedSettings {
265 #[serde(rename = "entrypoint")]
267 #[serde(skip_serializing_if = "Option::is_none")]
268 pub entrypoint: Option<Vec<String>>,
269
270 #[serde(rename = "encryptedDirs")]
272 #[serde(skip_serializing_if = "Option::is_none")]
273 pub encrypted_dirs: Option<Vec<String>>,
274
275 #[serde(rename = "certificate")]
276 #[serde(skip_serializing_if = "Option::is_none")]
277 pub certificate: Option<models::CertificateConfig>,
278
279 #[serde(rename = "caCertificate")]
280 #[serde(skip_serializing_if = "Option::is_none")]
281 pub ca_certificate: Option<models::CaCertificateConfig>,
282
283 #[serde(rename = "java_runtime")]
284 #[serde(skip_serializing_if = "Option::is_none")]
285 pub java_runtime: Option<models::JavaRuntime>,
286
287 #[serde(rename = "rw_dirs")]
289 #[serde(skip_serializing_if = "Option::is_none")]
290 pub rw_dirs: Option<Vec<String>>,
291
292 #[serde(rename = "allowCmdlineArgs")]
294 #[serde(skip_serializing_if = "Option::is_none")]
295 pub allow_cmdline_args: Option<bool>,
296
297 #[serde(rename = "manifestEnv")]
299 #[serde(skip_serializing_if = "Option::is_none")]
300 pub manifest_env: Option<Vec<String>>,
301}
302
303impl AdvancedSettings {
304 pub fn new() -> AdvancedSettings {
305 AdvancedSettings {
306 entrypoint: None,
307 encrypted_dirs: None,
308 certificate: None,
309 ca_certificate: None,
310 java_runtime: None,
311 rw_dirs: None,
312 allow_cmdline_args: None,
313 manifest_env: None,
314 }
315 }
316}
317
318#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
319#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
320pub struct App {
321 #[serde(rename = "created_at")]
323 #[serde(skip_serializing_if = "Option::is_none")]
324 pub created_at: Option<i64>,
325
326 #[serde(rename = "updated_at")]
328 #[serde(skip_serializing_if = "Option::is_none")]
329 pub updated_at: Option<i64>,
330
331 #[serde(rename = "name")]
333 pub name: String,
334
335 #[serde(rename = "description")]
337 #[serde(skip_serializing_if = "Option::is_none")]
338 pub description: Option<String>,
339
340 #[serde(rename = "app_id")]
342 pub app_id: uuid::Uuid,
343
344 #[serde(rename = "input_image_name")]
346 pub input_image_name: String,
347
348 #[serde(rename = "output_image_name")]
350 pub output_image_name: String,
351
352 #[serde(rename = "isvprodid")]
354 pub isvprodid: i32,
355
356 #[serde(rename = "isvsvn")]
358 pub isvsvn: i32,
359
360 #[serde(rename = "mem_size")]
362 pub mem_size: i64,
363
364 #[serde(rename = "threads")]
366 pub threads: i32,
367
368 #[serde(rename = "allowed_domains")]
369 #[serde(skip_serializing_if = "Option::is_none")]
370 pub allowed_domains: Option<Vec<String>>,
371
372 #[serde(rename = "whitelisted_domains")]
373 #[serde(skip_serializing_if = "Option::is_none")]
374 pub whitelisted_domains: Option<Vec<String>>,
375
376 #[serde(rename = "nodes")]
377 #[serde(skip_serializing_if = "Option::is_none")]
378 pub nodes: Option<Vec<models::AppNodeInfo>>,
379
380 #[serde(rename = "advanced_settings")]
381 #[serde(skip_serializing_if = "Option::is_none")]
382 pub advanced_settings: Option<models::AdvancedSettings>,
383
384 #[serde(rename = "pending_task_id")]
386 #[serde(skip_serializing_if = "Option::is_none")]
387 pub pending_task_id: Option<uuid::Uuid>,
388
389 #[serde(rename = "domains_added")]
390 #[serde(skip_serializing_if = "Option::is_none")]
391 pub domains_added: Option<Vec<String>>,
392
393 #[serde(rename = "domains_removed")]
394 #[serde(skip_serializing_if = "Option::is_none")]
395 pub domains_removed: Option<Vec<String>>,
396
397 #[serde(rename = "labels")]
398 #[serde(skip_serializing_if = "Option::is_none")]
399 pub labels: Option<HashMap<String, String>>,
400}
401
402impl App {
403 pub fn new(
404 name: String,
405 app_id: uuid::Uuid,
406 input_image_name: String,
407 output_image_name: String,
408 isvprodid: i32,
409 isvsvn: i32,
410 mem_size: i64,
411 threads: i32,
412 ) -> App {
413 App {
414 created_at: None,
415 updated_at: None,
416 name: name,
417 description: None,
418 app_id: app_id,
419 input_image_name: input_image_name,
420 output_image_name: output_image_name,
421 isvprodid: isvprodid,
422 isvsvn: isvsvn,
423 mem_size: mem_size,
424 threads: threads,
425 allowed_domains: None,
426 whitelisted_domains: None,
427 nodes: None,
428 advanced_settings: None,
429 pending_task_id: None,
430 domains_added: None,
431 domains_removed: None,
432 labels: None,
433 }
434 }
435}
436
437#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
439#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
440pub struct AppBodyUpdateRequest {
441 #[serde(rename = "description")]
443 #[serde(skip_serializing_if = "Option::is_none")]
444 pub description: Option<String>,
445
446 #[serde(rename = "input_image_name")]
448 #[serde(skip_serializing_if = "Option::is_none")]
449 pub input_image_name: Option<String>,
450
451 #[serde(rename = "output_image_name")]
453 #[serde(skip_serializing_if = "Option::is_none")]
454 pub output_image_name: Option<String>,
455
456 #[serde(rename = "isvsvn")]
458 #[serde(skip_serializing_if = "Option::is_none")]
459 pub isvsvn: Option<i32>,
460
461 #[serde(rename = "isvprodid")]
463 #[serde(skip_serializing_if = "Option::is_none")]
464 pub isvprodid: Option<i32>,
465
466 #[serde(rename = "mem_size")]
468 #[serde(skip_serializing_if = "Option::is_none")]
469 pub mem_size: Option<i64>,
470
471 #[serde(rename = "threads")]
473 #[serde(skip_serializing_if = "Option::is_none")]
474 pub threads: Option<i32>,
475
476 #[serde(rename = "allowed_domains")]
477 #[serde(skip_serializing_if = "Option::is_none")]
478 pub allowed_domains: Option<Vec<String>>,
479
480 #[serde(rename = "advanced_settings")]
481 #[serde(skip_serializing_if = "Option::is_none")]
482 pub advanced_settings: Option<models::AdvancedSettings>,
483
484 #[serde(rename = "labels")]
485 #[serde(skip_serializing_if = "Option::is_none")]
486 pub labels: Option<Vec<models::PatchDocument>>,
487}
488
489impl AppBodyUpdateRequest {
490 pub fn new() -> AppBodyUpdateRequest {
491 AppBodyUpdateRequest {
492 description: None,
493 input_image_name: None,
494 output_image_name: None,
495 isvsvn: None,
496 isvprodid: None,
497 mem_size: None,
498 threads: None,
499 allowed_domains: None,
500 advanced_settings: None,
501 labels: None,
502 }
503 }
504}
505
506#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
508#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
509pub struct AppNodeInfo {
510 #[serde(rename = "certificate")]
511 pub certificate: models::Certificate,
512
513 #[serde(rename = "created_at")]
515 pub created_at: i64,
516
517 #[serde(rename = "node_id")]
519 pub node_id: uuid::Uuid,
520
521 #[serde(rename = "node_name")]
523 #[serde(skip_serializing_if = "Option::is_none")]
524 pub node_name: Option<String>,
525
526 #[serde(rename = "status")]
527 #[serde(skip_serializing_if = "Option::is_none")]
528 pub status: Option<models::AppStatus>,
529
530 #[serde(rename = "build_info")]
531 #[serde(skip_serializing_if = "Option::is_none")]
532 pub build_info: Option<models::Build>,
533
534 #[serde(rename = "message_count")]
536 #[serde(skip_serializing_if = "Option::is_none")]
537 pub message_count: Option<i32>,
538
539 #[serde(rename = "key_id")]
541 #[serde(skip_serializing_if = "Option::is_none")]
542 pub key_id: Option<String>,
543
544 #[serde(rename = "is_debug")]
546 #[serde(skip_serializing_if = "Option::is_none")]
547 pub is_debug: Option<bool>,
548}
549
550impl AppNodeInfo {
551 pub fn new(
552 certificate: models::Certificate,
553 created_at: i64,
554 node_id: uuid::Uuid,
555 ) -> AppNodeInfo {
556 AppNodeInfo {
557 certificate: certificate,
558 created_at: created_at,
559 node_id: node_id,
560 node_name: None,
561 status: None,
562 build_info: None,
563 message_count: None,
564 key_id: None,
565 is_debug: None,
566 }
567 }
568}
569
570#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
571#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
572pub struct AppRegistryResponse {
573 #[serde(rename = "input_image_registry")]
574 #[serde(skip_serializing_if = "Option::is_none")]
575 pub input_image_registry: Option<models::Registry>,
576
577 #[serde(rename = "output_image_registry")]
578 #[serde(skip_serializing_if = "Option::is_none")]
579 pub output_image_registry: Option<models::Registry>,
580}
581
582impl AppRegistryResponse {
583 pub fn new() -> AppRegistryResponse {
584 AppRegistryResponse {
585 input_image_registry: None,
586 output_image_registry: None,
587 }
588 }
589}
590
591#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
593#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
594pub struct AppRequest {
595 #[serde(rename = "name")]
597 pub name: String,
598
599 #[serde(rename = "description")]
601 #[serde(skip_serializing_if = "Option::is_none")]
602 pub description: Option<String>,
603
604 #[serde(rename = "input_image_name")]
606 pub input_image_name: String,
607
608 #[serde(rename = "output_image_name")]
610 pub output_image_name: String,
611
612 #[serde(rename = "isvprodid")]
614 pub isvprodid: i32,
615
616 #[serde(rename = "isvsvn")]
618 pub isvsvn: i32,
619
620 #[serde(rename = "mem_size")]
622 pub mem_size: i64,
623
624 #[serde(rename = "threads")]
626 pub threads: i32,
627
628 #[serde(rename = "allowed_domains")]
629 #[serde(skip_serializing_if = "Option::is_none")]
630 pub allowed_domains: Option<Vec<String>>,
631
632 #[serde(rename = "advanced_settings")]
633 #[serde(skip_serializing_if = "Option::is_none")]
634 pub advanced_settings: Option<models::AdvancedSettings>,
635
636 #[serde(rename = "labels")]
637 #[serde(skip_serializing_if = "Option::is_none")]
638 pub labels: Option<HashMap<String, String>>,
639}
640
641impl AppRequest {
642 pub fn new(
643 name: String,
644 input_image_name: String,
645 output_image_name: String,
646 isvprodid: i32,
647 isvsvn: i32,
648 mem_size: i64,
649 threads: i32,
650 ) -> AppRequest {
651 AppRequest {
652 name: name,
653 description: None,
654 input_image_name: input_image_name,
655 output_image_name: output_image_name,
656 isvprodid: isvprodid,
657 isvsvn: isvsvn,
658 mem_size: mem_size,
659 threads: threads,
660 allowed_domains: None,
661 advanced_settings: None,
662 labels: None,
663 }
664 }
665}
666
667#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
669#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
670pub struct AppStatus {
671 #[serde(rename = "status")]
672 #[serde(skip_serializing_if = "Option::is_none")]
673 pub status: Option<models::AppStatusType>,
674
675 #[serde(rename = "status_updated_at")]
677 #[serde(skip_serializing_if = "Option::is_none")]
678 pub status_updated_at: Option<i64>,
679
680 #[serde(rename = "attested_at")]
682 #[serde(skip_serializing_if = "Option::is_none")]
683 pub attested_at: Option<i64>,
684}
685
686impl AppStatus {
687 pub fn new() -> AppStatus {
688 AppStatus {
689 status: None,
690 status_updated_at: None,
691 attested_at: None,
692 }
693 }
694}
695
696#[allow(non_camel_case_types)]
701#[repr(C)]
702#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
703#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
704pub enum AppStatusType {
705 #[serde(rename = "RUNNING")]
706 RUNNING,
707 #[serde(rename = "STOPPED")]
708 STOPPED,
709 #[serde(rename = "UNKNOWN")]
710 UNKNOWN,
711}
712
713impl ::std::fmt::Display for AppStatusType {
714 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
715 match *self {
716 AppStatusType::RUNNING => write!(f, "{}", "RUNNING"),
717 AppStatusType::STOPPED => write!(f, "{}", "STOPPED"),
718 AppStatusType::UNKNOWN => write!(f, "{}", "UNKNOWN"),
719 }
720 }
721}
722
723impl ::std::str::FromStr for AppStatusType {
724 type Err = ();
725 fn from_str(s: &str) -> Result<Self, Self::Err> {
726 match s {
727 "RUNNING" => Ok(AppStatusType::RUNNING),
728 "STOPPED" => Ok(AppStatusType::STOPPED),
729 "UNKNOWN" => Ok(AppStatusType::UNKNOWN),
730 _ => Err(()),
731 }
732 }
733}
734
735#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
737#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
738pub struct AppUpdateRequest {
739 #[serde(rename = "status")]
740 pub status: models::AppStatusType,
741}
742
743impl AppUpdateRequest {
744 pub fn new(status: models::AppStatusType) -> AppUpdateRequest {
745 AppUpdateRequest { status: status }
746 }
747}
748
749#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
751#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
752pub struct ApplicationConfig {
753 #[serde(rename = "name")]
754 pub name: String,
755
756 #[serde(rename = "description")]
757 pub description: String,
758
759 #[serde(rename = "app_config")]
760 pub app_config: SortedHashMap<String, models::ApplicationConfigContents>,
761
762 #[serde(rename = "labels")]
763 pub labels: SortedHashMap<String, String>,
764
765 #[serde(rename = "ports")]
766 pub ports: SortedVec<String>,
767
768 #[serde(rename = "zone")]
769 #[serde(skip_serializing_if = "Option::is_none")]
770 pub zone: Option<models::VersionedZoneId>,
771}
772
773impl ApplicationConfig {
774 pub fn new(
775 name: String,
776 description: String,
777 app_config: SortedHashMap<String, models::ApplicationConfigContents>,
778 labels: SortedHashMap<String, String>,
779 ports: SortedVec<String>,
780 ) -> ApplicationConfig {
781 ApplicationConfig {
782 name: name,
783 description: description,
784 app_config: app_config,
785 labels: labels,
786 ports: ports,
787 zone: None,
788 }
789 }
790}
791
792#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
794#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
795pub struct ApplicationConfigConnection {
796 #[serde(rename = "dataset")]
797 #[serde(skip_serializing_if = "Option::is_none")]
798 pub dataset: Option<models::ApplicationConfigConnectionDataset>,
799
800 #[serde(rename = "application")]
801 #[serde(skip_serializing_if = "Option::is_none")]
802 pub application: Option<models::ApplicationConfigConnectionApplication>,
803}
804
805impl ApplicationConfigConnection {
806 pub fn new() -> ApplicationConfigConnection {
807 ApplicationConfigConnection {
808 dataset: None,
809 application: None,
810 }
811 }
812}
813
814#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
816#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
817pub struct ApplicationConfigConnectionApplication {
818 #[serde(rename = "workflow_domain")]
819 pub workflow_domain: String,
820}
821
822impl ApplicationConfigConnectionApplication {
823 pub fn new(workflow_domain: String) -> ApplicationConfigConnectionApplication {
824 ApplicationConfigConnectionApplication {
825 workflow_domain: workflow_domain,
826 }
827 }
828}
829
830#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
832#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
833pub struct ApplicationConfigConnectionDataset {
834 #[serde(rename = "location")]
835 pub location: String,
836
837 #[serde(rename = "credentials")]
838 pub credentials: models::ApplicationConfigDatasetCredentials,
839}
840
841impl ApplicationConfigConnectionDataset {
842 pub fn new(
843 location: String,
844 credentials: models::ApplicationConfigDatasetCredentials,
845 ) -> ApplicationConfigConnectionDataset {
846 ApplicationConfigConnectionDataset {
847 location: location,
848 credentials: credentials,
849 }
850 }
851}
852
853#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
854#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
855pub struct ApplicationConfigContents {
856 #[serde(rename = "contents")]
857 #[serde(skip_serializing_if = "Option::is_none")]
858 pub contents: Option<String>,
859}
860
861impl ApplicationConfigContents {
862 pub fn new() -> ApplicationConfigContents {
863 ApplicationConfigContents { contents: None }
864 }
865}
866
867#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
869#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
870pub struct ApplicationConfigDatasetCredentials {
871 #[serde(rename = "sdkms")]
872 #[serde(skip_serializing_if = "Option::is_none")]
873 pub sdkms: Option<models::ApplicationConfigSdkmsCredentials>,
874}
875
876impl ApplicationConfigDatasetCredentials {
877 pub fn new() -> ApplicationConfigDatasetCredentials {
878 ApplicationConfigDatasetCredentials { sdkms: None }
879 }
880}
881
882#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
884#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
885pub struct ApplicationConfigExtra {
886 #[serde(rename = "connections")]
887 #[serde(skip_serializing_if = "Option::is_none")]
888 pub connections:
889 Option<SortedHashMap<String, SortedHashMap<String, models::ApplicationConfigConnection>>>,
890}
891
892impl ApplicationConfigExtra {
893 pub fn new() -> ApplicationConfigExtra {
894 ApplicationConfigExtra { connections: None }
895 }
896}
897
898#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
900#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
901#[serde(deny_unknown_fields)]
902pub enum ApplicationConfigPort {
903 #[serde(rename = "dataset")]
904 Dataset(ApplicationConfigPortDataset),
905
906 #[serde(rename = "application")]
907 Application(ApplicationPort),
908}
909
910#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
912#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
913#[serde(deny_unknown_fields)]
914pub struct ApplicationConfigPortDataset {
915 #[serde(rename = "id")]
916 pub id: uuid::Uuid,
917
918 #[serde(skip_serializing_if = "Option::is_none")]
919 pub acct_id: Option<uuid::Uuid>,
920
921 #[serde(skip_serializing_if = "Option::is_none")]
922 pub group_id: Option<uuid::Uuid>,
923}
924
925impl ApplicationConfigPortDataset {
926 pub fn new(
927 id: uuid::Uuid,
928 acct_id: Option<uuid::Uuid>,
929 group_id: Option<uuid::Uuid>,
930 ) -> ApplicationConfigPortDataset {
931 ApplicationConfigPortDataset {
932 id: id,
933 acct_id,
934 group_id,
935 }
936 }
937}
938
939#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
940#[serde(deny_unknown_fields)]
941pub struct ApplicationPort {
942 #[serde(skip_serializing_if = "Option::is_none")]
943 pub acct_id: Option<uuid::Uuid>,
944
945 #[serde(skip_serializing_if = "Option::is_none")]
946 pub group_id: Option<uuid::Uuid>,
947}
948
949#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
951#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
952pub struct ApplicationConfigResponse {
953 #[serde(rename = "config_id")]
954 pub config_id: String,
955
956 #[serde(rename = "created_at")]
957 pub created_at: i64,
958
959 #[serde(rename = "updated_at")]
960 pub updated_at: i64,
961
962 #[serde(rename = "name")]
963 pub name: String,
964
965 #[serde(rename = "description")]
966 pub description: String,
967
968 #[serde(rename = "app_config")]
969 pub app_config: SortedHashMap<String, models::ApplicationConfigContents>,
970
971 #[serde(rename = "labels")]
972 pub labels: SortedHashMap<String, String>,
973
974 #[serde(rename = "ports")]
975 pub ports: SortedVec<String>,
976
977 #[serde(rename = "zone")]
978 #[serde(skip_serializing_if = "Option::is_none")]
979 pub zone: Option<models::VersionedZoneId>,
980}
981
982impl ApplicationConfigResponse {
983 pub fn new(
984 config_id: String,
985 created_at: i64,
986 updated_at: i64,
987 name: String,
988 description: String,
989 app_config: SortedHashMap<String, models::ApplicationConfigContents>,
990 labels: SortedHashMap<String, String>,
991 ports: SortedVec<String>,
992 ) -> ApplicationConfigResponse {
993 ApplicationConfigResponse {
994 config_id: config_id,
995 created_at: created_at,
996 updated_at: updated_at,
997 name: name,
998 description: description,
999 app_config: app_config,
1000 labels: labels,
1001 ports: ports,
1002 zone: None,
1003 }
1004 }
1005}
1006
1007#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1009#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1010pub struct ApplicationConfigSdkmsCredentials {
1011 #[serde(rename = "credentials_url")]
1012 pub credentials_url: String,
1013
1014 #[serde(rename = "credentials_key_name")]
1015 pub credentials_key_name: String,
1016
1017 #[serde(rename = "sdkms_app_id")]
1018 pub sdkms_app_id: uuid::Uuid,
1019}
1020
1021impl ApplicationConfigSdkmsCredentials {
1022 pub fn new(
1023 credentials_url: String,
1024 credentials_key_name: String,
1025 sdkms_app_id: uuid::Uuid,
1026 ) -> ApplicationConfigSdkmsCredentials {
1027 ApplicationConfigSdkmsCredentials {
1028 credentials_url: credentials_url,
1029 credentials_key_name: credentials_key_name,
1030 sdkms_app_id: sdkms_app_id,
1031 }
1032 }
1033}
1034
1035#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1037#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1038#[serde(deny_unknown_fields)]
1039pub struct ApplicationConfigWorkflow {
1040 #[serde(rename = "workflow_id")]
1041 pub workflow_id: uuid::Uuid,
1042
1043 #[serde(rename = "app_name")]
1044 pub app_name: String,
1045
1046 #[serde(rename = "port_map")]
1047 pub port_map: SortedHashMap<String, SortedHashMap<String, models::ApplicationConfigPort>>,
1048
1049 #[serde(skip_serializing_if = "Option::is_none")]
1050 pub app_acct_id: Option<uuid::Uuid>,
1051 #[serde(skip_serializing_if = "Option::is_none")]
1052 pub app_group_id: Option<uuid::Uuid>,
1053}
1054
1055impl ApplicationConfigWorkflow {
1056 pub fn new(
1057 workflow_id: uuid::Uuid,
1058 app_name: String,
1059 port_map: SortedHashMap<String, SortedHashMap<String, models::ApplicationConfigPort>>,
1060 app_acct_id: Option<uuid::Uuid>,
1061 app_group_id: Option<uuid::Uuid>,
1062 ) -> ApplicationConfigWorkflow {
1063 ApplicationConfigWorkflow {
1064 workflow_id: workflow_id,
1065 app_name: app_name,
1066 port_map: port_map,
1067 app_acct_id,
1068 app_group_id,
1069 }
1070 }
1071}
1072
1073#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1075#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1076pub struct ApprovableResult {
1077 #[serde(rename = "status")]
1079 pub status: isize,
1080
1081 #[serde(rename = "body")]
1082 pub body: serde_json::Value,
1083}
1084
1085impl ApprovableResult {
1086 pub fn new(status: isize, body: serde_json::Value) -> ApprovableResult {
1087 ApprovableResult {
1088 status: status,
1089 body: body,
1090 }
1091 }
1092}
1093
1094#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1095#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1096pub struct ApprovalInfo {
1097 #[serde(rename = "user_id")]
1099 pub user_id: uuid::Uuid,
1100
1101 #[serde(rename = "user_name")]
1103 #[serde(skip_serializing_if = "Option::is_none")]
1104 pub user_name: Option<String>,
1105
1106 #[serde(rename = "status")]
1107 #[serde(skip_serializing_if = "Option::is_none")]
1108 pub status: Option<models::ApprovalStatus>,
1109}
1110
1111impl ApprovalInfo {
1112 pub fn new(user_id: uuid::Uuid) -> ApprovalInfo {
1113 ApprovalInfo {
1114 user_id: user_id,
1115 user_name: None,
1116 status: None,
1117 }
1118 }
1119}
1120
1121#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1122#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1123pub struct ApprovalRequest {
1124 #[serde(rename = "request_id")]
1126 pub request_id: uuid::Uuid,
1127
1128 #[serde(rename = "requester")]
1129 pub requester: models::Entity,
1130
1131 #[serde(rename = "created_at")]
1133 pub created_at: i64,
1134
1135 #[serde(rename = "acct_id")]
1137 pub acct_id: uuid::Uuid,
1138
1139 #[serde(rename = "operation")]
1141 pub operation: String,
1142
1143 #[serde(rename = "method")]
1145 pub method: String,
1146
1147 #[serde(rename = "body")]
1148 #[serde(skip_serializing_if = "Option::is_none")]
1149 pub body: Option<serde_json::Value>,
1150
1151 #[serde(rename = "approvers")]
1152 pub approvers: Vec<models::Entity>,
1153
1154 #[serde(rename = "denier")]
1155 #[serde(skip_serializing_if = "Option::is_none")]
1156 pub denier: Option<models::Entity>,
1157
1158 #[serde(rename = "denial_reason")]
1160 #[serde(skip_serializing_if = "Option::is_none")]
1161 pub denial_reason: Option<String>,
1162
1163 #[serde(rename = "reviewers")]
1164 #[serde(skip_serializing_if = "Option::is_none")]
1165 pub reviewers: Option<Vec<models::Entity>>,
1166
1167 #[serde(rename = "status")]
1168 pub status: models::ApprovalRequestStatus,
1169
1170 #[serde(rename = "subjects")]
1171 #[serde(skip_serializing_if = "Option::is_none")]
1172 pub subjects: Option<Vec<models::ApprovalSubject>>,
1173
1174 #[serde(rename = "description")]
1176 #[serde(skip_serializing_if = "Option::is_none")]
1177 pub description: Option<String>,
1178
1179 #[serde(rename = "expiry")]
1181 pub expiry: i64,
1182}
1183
1184impl ApprovalRequest {
1185 pub fn new(
1186 request_id: uuid::Uuid,
1187 requester: models::Entity,
1188 created_at: i64,
1189 acct_id: uuid::Uuid,
1190 operation: String,
1191 method: String,
1192 approvers: Vec<models::Entity>,
1193 status: models::ApprovalRequestStatus,
1194 expiry: i64,
1195 ) -> ApprovalRequest {
1196 ApprovalRequest {
1197 request_id: request_id,
1198 requester: requester,
1199 created_at: created_at,
1200 acct_id: acct_id,
1201 operation: operation,
1202 method: method,
1203 body: None,
1204 approvers: approvers,
1205 denier: None,
1206 denial_reason: None,
1207 reviewers: None,
1208 status: status,
1209 subjects: None,
1210 description: None,
1211 expiry: expiry,
1212 }
1213 }
1214}
1215
1216#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1218#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1219pub struct ApprovalRequestRequest {
1220 #[serde(rename = "operation")]
1222 pub operation: String,
1223
1224 #[serde(rename = "method")]
1226 #[serde(skip_serializing_if = "Option::is_none")]
1227 pub method: Option<String>,
1228
1229 #[serde(rename = "body")]
1230 #[serde(skip_serializing_if = "Option::is_none")]
1231 pub body: Option<serde_json::Value>,
1232
1233 #[serde(rename = "description")]
1235 #[serde(skip_serializing_if = "Option::is_none")]
1236 pub description: Option<String>,
1237}
1238
1239impl ApprovalRequestRequest {
1240 pub fn new(operation: String) -> ApprovalRequestRequest {
1241 ApprovalRequestRequest {
1242 operation: operation,
1243 method: None,
1244 body: None,
1245 description: None,
1246 }
1247 }
1248}
1249
1250#[allow(non_camel_case_types)]
1255#[repr(C)]
1256#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
1257#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
1258pub enum ApprovalRequestStatus {
1259 #[serde(rename = "PENDING")]
1260 PENDING,
1261 #[serde(rename = "APPROVED")]
1262 APPROVED,
1263 #[serde(rename = "DENIED")]
1264 DENIED,
1265 #[serde(rename = "FAILED")]
1266 FAILED,
1267}
1268
1269impl ::std::fmt::Display for ApprovalRequestStatus {
1270 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1271 match *self {
1272 ApprovalRequestStatus::PENDING => write!(f, "{}", "PENDING"),
1273 ApprovalRequestStatus::APPROVED => write!(f, "{}", "APPROVED"),
1274 ApprovalRequestStatus::DENIED => write!(f, "{}", "DENIED"),
1275 ApprovalRequestStatus::FAILED => write!(f, "{}", "FAILED"),
1276 }
1277 }
1278}
1279
1280impl ::std::str::FromStr for ApprovalRequestStatus {
1281 type Err = ();
1282 fn from_str(s: &str) -> Result<Self, Self::Err> {
1283 match s {
1284 "PENDING" => Ok(ApprovalRequestStatus::PENDING),
1285 "APPROVED" => Ok(ApprovalRequestStatus::APPROVED),
1286 "DENIED" => Ok(ApprovalRequestStatus::DENIED),
1287 "FAILED" => Ok(ApprovalRequestStatus::FAILED),
1288 _ => Err(()),
1289 }
1290 }
1291}
1292
1293#[allow(non_camel_case_types)]
1298#[repr(C)]
1299#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
1300#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
1301pub enum ApprovalStatus {
1302 #[serde(rename = "APPROVED")]
1303 APPROVED,
1304 #[serde(rename = "DENIED")]
1305 DENIED,
1306}
1307
1308impl ::std::fmt::Display for ApprovalStatus {
1309 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1310 match *self {
1311 ApprovalStatus::APPROVED => write!(f, "{}", "APPROVED"),
1312 ApprovalStatus::DENIED => write!(f, "{}", "DENIED"),
1313 }
1314 }
1315}
1316
1317impl ::std::str::FromStr for ApprovalStatus {
1318 type Err = ();
1319 fn from_str(s: &str) -> Result<Self, Self::Err> {
1320 match s {
1321 "APPROVED" => Ok(ApprovalStatus::APPROVED),
1322 "DENIED" => Ok(ApprovalStatus::DENIED),
1323 _ => Err(()),
1324 }
1325 }
1326}
1327
1328#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1330#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1331pub struct ApprovalSubject {
1332 #[serde(rename = "workflow")]
1334 #[serde(skip_serializing_if = "Option::is_none")]
1335 pub workflow: Option<uuid::Uuid>,
1336}
1337
1338impl ApprovalSubject {
1339 pub fn new() -> ApprovalSubject {
1340 ApprovalSubject { workflow: None }
1341 }
1342}
1343
1344#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1346#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1347pub struct ApproveRequest {
1348 #[serde(rename = "password")]
1350 #[serde(skip_serializing_if = "Option::is_none")]
1351 pub password: Option<String>,
1352
1353 #[serde(rename = "u2f")]
1355 #[serde(skip_serializing_if = "Option::is_none")]
1356 pub u2f: Option<String>,
1357
1358 #[serde(rename = "body")]
1360 #[serde(skip_serializing_if = "Option::is_none")]
1361 pub body: Option<serde_json::Value>,
1362}
1363
1364impl ApproveRequest {
1365 pub fn new() -> ApproveRequest {
1366 ApproveRequest {
1367 password: None,
1368 u2f: None,
1369 body: None,
1370 }
1371 }
1372}
1373
1374#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1375#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1376pub struct AttestationRequest {
1377 #[serde(rename = "ias_quote")]
1379 pub ias_quote: crate::ByteArray,
1380
1381 #[serde(rename = "csr")]
1383 pub csr: String,
1384
1385 #[serde(rename = "attestation_type")]
1387 #[serde(skip_serializing_if = "Option::is_none")]
1388 pub attestation_type: Option<String>,
1389}
1390
1391impl AttestationRequest {
1392 pub fn new(ias_quote: crate::ByteArray, csr: String) -> AttestationRequest {
1393 AttestationRequest {
1394 ias_quote: ias_quote,
1395 csr: csr,
1396 attestation_type: None,
1397 }
1398 }
1399}
1400
1401#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1403#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1404pub struct AuthConfig {
1405 #[serde(rename = "username")]
1407 #[serde(skip_serializing_if = "Option::is_none")]
1408 pub username: Option<String>,
1409
1410 #[serde(rename = "password")]
1412 #[serde(skip_serializing_if = "Option::is_none")]
1413 pub password: Option<String>,
1414}
1415
1416impl AuthConfig {
1417 pub fn new() -> AuthConfig {
1418 AuthConfig {
1419 username: None,
1420 password: None,
1421 }
1422 }
1423}
1424
1425#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1426#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1427pub struct AuthConfigOauth {
1428 #[serde(rename = "idp_name")]
1429 pub idp_name: String,
1430
1431 #[serde(rename = "idp_icon_url")]
1432 pub idp_icon_url: String,
1433
1434 #[serde(rename = "idp_authorization_endpoint")]
1435 pub idp_authorization_endpoint: String,
1436
1437 #[serde(rename = "idp_token_endpoint")]
1438 pub idp_token_endpoint: String,
1439
1440 #[serde(rename = "idp_requires_basic_auth")]
1441 pub idp_requires_basic_auth: bool,
1442
1443 #[serde(rename = "idp_userinfo_endpoint")]
1444 #[serde(skip_serializing_if = "Option::is_none")]
1445 pub idp_userinfo_endpoint: Option<String>,
1446
1447 #[serde(rename = "tls")]
1448 pub tls: models::TlsConfig,
1449
1450 #[serde(rename = "client_id")]
1451 pub client_id: String,
1452
1453 #[serde(rename = "client_secret")]
1454 pub client_secret: String,
1455}
1456
1457impl AuthConfigOauth {
1458 pub fn new(
1459 idp_name: String,
1460 idp_icon_url: String,
1461 idp_authorization_endpoint: String,
1462 idp_token_endpoint: String,
1463 idp_requires_basic_auth: bool,
1464 tls: models::TlsConfig,
1465 client_id: String,
1466 client_secret: String,
1467 ) -> AuthConfigOauth {
1468 AuthConfigOauth {
1469 idp_name: idp_name,
1470 idp_icon_url: idp_icon_url,
1471 idp_authorization_endpoint: idp_authorization_endpoint,
1472 idp_token_endpoint: idp_token_endpoint,
1473 idp_requires_basic_auth: idp_requires_basic_auth,
1474 idp_userinfo_endpoint: None,
1475 tls: tls,
1476 client_id: client_id,
1477 client_secret: client_secret,
1478 }
1479 }
1480}
1481
1482#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1484#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1485pub struct AuthConfigPassword {
1486 #[serde(rename = "require_2fa")]
1487 pub require_2fa: bool,
1488
1489 #[serde(rename = "administrators_only")]
1490 pub administrators_only: bool,
1491}
1492
1493impl AuthConfigPassword {
1494 pub fn new(require_2fa: bool, administrators_only: bool) -> AuthConfigPassword {
1495 AuthConfigPassword {
1496 require_2fa: require_2fa,
1497 administrators_only: administrators_only,
1498 }
1499 }
1500}
1501
1502#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1503#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1504pub struct AuthConfigRef {
1505 #[serde(rename = "target_id")]
1506 pub target_id: String,
1507}
1508
1509impl AuthConfigRef {
1510 pub fn new(target_id: String) -> AuthConfigRef {
1511 AuthConfigRef {
1512 target_id: target_id,
1513 }
1514 }
1515}
1516
1517#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1518#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1519pub struct AuthDiscoverRequest {
1520 #[serde(rename = "user_email")]
1522 #[serde(skip_serializing_if = "Option::is_none")]
1523 pub user_email: Option<String>,
1524}
1525
1526impl AuthDiscoverRequest {
1527 pub fn new() -> AuthDiscoverRequest {
1528 AuthDiscoverRequest { user_email: None }
1529 }
1530}
1531
1532#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1533#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1534pub struct AuthDiscoverResponse {
1535 #[serde(rename = "auth_methods")]
1536 pub auth_methods: Vec<models::AuthMethod>,
1537}
1538
1539impl AuthDiscoverResponse {
1540 pub fn new(auth_methods: Vec<models::AuthMethod>) -> AuthDiscoverResponse {
1541 AuthDiscoverResponse {
1542 auth_methods: auth_methods,
1543 }
1544 }
1545}
1546
1547#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1548#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1549pub struct AuthMethod {
1550 #[serde(rename = "password")]
1551 #[serde(skip_serializing_if = "Option::is_none")]
1552 pub password: Option<serde_json::Value>,
1553
1554 #[serde(rename = "oauth_code_grant")]
1555 #[serde(skip_serializing_if = "Option::is_none")]
1556 pub oauth_code_grant: Option<models::OauthAuthCodeGrant>,
1557}
1558
1559impl AuthMethod {
1560 pub fn new() -> AuthMethod {
1561 AuthMethod {
1562 password: None,
1563 oauth_code_grant: None,
1564 }
1565 }
1566}
1567
1568#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1569#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1570pub struct AuthRequest {
1571 #[serde(rename = "oauth_auth_code")]
1572 pub oauth_auth_code: models::OauthCodeData,
1573}
1574
1575impl AuthRequest {
1576 pub fn new(oauth_auth_code: models::OauthCodeData) -> AuthRequest {
1577 AuthRequest {
1578 oauth_auth_code: oauth_auth_code,
1579 }
1580 }
1581}
1582
1583#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1584#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1585pub struct AuthResponse {
1586 #[serde(rename = "access_token")]
1588 #[serde(skip_serializing_if = "Option::is_none")]
1589 pub access_token: Option<String>,
1590
1591 #[serde(rename = "session_info")]
1592 #[serde(skip_serializing_if = "Option::is_none")]
1593 pub session_info: Option<models::SessionInfo>,
1594}
1595
1596impl AuthResponse {
1597 pub fn new() -> AuthResponse {
1598 AuthResponse {
1599 access_token: None,
1600 session_info: None,
1601 }
1602 }
1603}
1604
1605#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1606#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1607pub struct AuthenticationConfig {
1608 #[serde(rename = "password")]
1609 #[serde(skip_serializing_if = "Option::is_none")]
1610 pub password: Option<models::AuthConfigPassword>,
1611
1612 #[serde(rename = "oauth")]
1613 #[serde(skip_serializing_if = "Option::is_none")]
1614 pub oauth: Option<models::AuthConfigOauth>,
1615
1616 #[serde(rename = "cluster_auth_ref")]
1617 #[serde(skip_serializing_if = "Option::is_none")]
1618 pub cluster_auth_ref: Option<models::AuthConfigRef>,
1619}
1620
1621impl AuthenticationConfig {
1622 pub fn new() -> AuthenticationConfig {
1623 AuthenticationConfig {
1624 password: None,
1625 oauth: None,
1626 cluster_auth_ref: None,
1627 }
1628 }
1629}
1630
1631#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1632#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1633pub struct BackendNodeProvisionRequest {
1634 #[serde(rename = "ias_url")]
1636 pub ias_url: String,
1637
1638 #[serde(rename = "ias_spid")]
1640 #[serde(skip_serializing_if = "Option::is_none")]
1641 pub ias_spid: Option<String>,
1642
1643 #[serde(rename = "ias_proxy_url")]
1645 #[serde(skip_serializing_if = "Option::is_none")]
1646 pub ias_proxy_url: Option<String>,
1647}
1648
1649impl BackendNodeProvisionRequest {
1650 pub fn new(ias_url: String) -> BackendNodeProvisionRequest {
1651 BackendNodeProvisionRequest {
1652 ias_url: ias_url,
1653 ias_spid: None,
1654 ias_proxy_url: None,
1655 }
1656 }
1657}
1658
1659#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1661#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1662pub struct Build {
1663 #[serde(rename = "build_id")]
1665 #[serde(skip_serializing_if = "Option::is_none")]
1666 pub build_id: Option<uuid::Uuid>,
1667
1668 #[serde(rename = "docker_info")]
1669 #[serde(skip_serializing_if = "Option::is_none")]
1670 pub docker_info: Option<models::DockerInfo>,
1671
1672 #[serde(rename = "created_at")]
1674 #[serde(skip_serializing_if = "Option::is_none")]
1675 pub created_at: Option<i64>,
1676
1677 #[serde(rename = "updated_at")]
1679 #[serde(skip_serializing_if = "Option::is_none")]
1680 pub updated_at: Option<i64>,
1681
1682 #[serde(rename = "app_id")]
1684 #[serde(skip_serializing_if = "Option::is_none")]
1685 pub app_id: Option<uuid::Uuid>,
1686
1687 #[serde(rename = "app_name")]
1689 #[serde(skip_serializing_if = "Option::is_none")]
1690 pub app_name: Option<String>,
1691
1692 #[serde(rename = "status")]
1693 pub status: models::BuildStatus,
1694
1695 #[serde(rename = "deployment_status")]
1696 #[serde(skip_serializing_if = "Option::is_none")]
1697 pub deployment_status: Option<models::BuildDeploymentStatus>,
1698
1699 #[serde(rename = "enclave_info")]
1700 #[serde(skip_serializing_if = "Option::is_none")]
1701 pub enclave_info: Option<models::EnclaveInfo>,
1702
1703 #[serde(rename = "app_description")]
1705 #[serde(skip_serializing_if = "Option::is_none")]
1706 pub app_description: Option<String>,
1707
1708 #[serde(rename = "mem_size")]
1710 #[serde(skip_serializing_if = "Option::is_none")]
1711 pub mem_size: Option<i64>,
1712
1713 #[serde(rename = "threads")]
1715 #[serde(skip_serializing_if = "Option::is_none")]
1716 pub threads: Option<i32>,
1717
1718 #[serde(rename = "advanced_settings")]
1719 #[serde(skip_serializing_if = "Option::is_none")]
1720 pub advanced_settings: Option<models::AdvancedSettings>,
1721
1722 #[serde(rename = "build_name")]
1724 #[serde(skip_serializing_if = "Option::is_none")]
1725 pub build_name: Option<String>,
1726
1727 #[serde(rename = "pending_task_id")]
1729 #[serde(skip_serializing_if = "Option::is_none")]
1730 pub pending_task_id: Option<uuid::Uuid>,
1731
1732 #[serde(rename = "configs")]
1734 #[serde(skip_serializing_if = "Option::is_none")]
1735 pub configs: Option<HashMap<String, serde_json::Value>>,
1736}
1737
1738impl Build {
1739 pub fn new(status: models::BuildStatus) -> Build {
1740 Build {
1741 build_id: None,
1742 docker_info: None,
1743 created_at: None,
1744 updated_at: None,
1745 app_id: None,
1746 app_name: None,
1747 status: status,
1748 deployment_status: None,
1749 enclave_info: None,
1750 app_description: None,
1751 mem_size: None,
1752 threads: None,
1753 advanced_settings: None,
1754 build_name: None,
1755 pending_task_id: None,
1756 configs: None,
1757 }
1758 }
1759}
1760
1761#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1762#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1763pub struct BuildDeploymentStatus {
1764 #[serde(rename = "status")]
1765 pub status: models::BuildDeploymentStatusType,
1766
1767 #[serde(rename = "status_updated_at")]
1769 pub status_updated_at: i64,
1770}
1771
1772impl BuildDeploymentStatus {
1773 pub fn new(
1774 status: models::BuildDeploymentStatusType,
1775 status_updated_at: i64,
1776 ) -> BuildDeploymentStatus {
1777 BuildDeploymentStatus {
1778 status: status,
1779 status_updated_at: status_updated_at,
1780 }
1781 }
1782}
1783
1784#[allow(non_camel_case_types)]
1789#[repr(C)]
1790#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
1791#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
1792pub enum BuildDeploymentStatusType {
1793 #[serde(rename = "DEPLOYED")]
1794 DEPLOYED,
1795 #[serde(rename = "UNDEPLOYED")]
1796 UNDEPLOYED,
1797}
1798
1799impl ::std::fmt::Display for BuildDeploymentStatusType {
1800 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1801 match *self {
1802 BuildDeploymentStatusType::DEPLOYED => write!(f, "{}", "DEPLOYED"),
1803 BuildDeploymentStatusType::UNDEPLOYED => write!(f, "{}", "UNDEPLOYED"),
1804 }
1805 }
1806}
1807
1808impl ::std::str::FromStr for BuildDeploymentStatusType {
1809 type Err = ();
1810 fn from_str(s: &str) -> Result<Self, Self::Err> {
1811 match s {
1812 "DEPLOYED" => Ok(BuildDeploymentStatusType::DEPLOYED),
1813 "UNDEPLOYED" => Ok(BuildDeploymentStatusType::UNDEPLOYED),
1814 _ => Err(()),
1815 }
1816 }
1817}
1818
1819#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1820#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1821pub struct BuildStatus {
1822 #[serde(rename = "status")]
1823 pub status: models::BuildStatusType,
1824
1825 #[serde(rename = "status_updated_at")]
1827 pub status_updated_at: i64,
1828}
1829
1830impl BuildStatus {
1831 pub fn new(status: models::BuildStatusType, status_updated_at: i64) -> BuildStatus {
1832 BuildStatus {
1833 status: status,
1834 status_updated_at: status_updated_at,
1835 }
1836 }
1837}
1838
1839#[allow(non_camel_case_types)]
1844#[repr(C)]
1845#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
1846#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
1847pub enum BuildStatusType {
1848 #[serde(rename = "REJECTED")]
1849 REJECTED,
1850 #[serde(rename = "WHITELISTED")]
1851 WHITELISTED,
1852 #[serde(rename = "PENDING")]
1853 PENDING,
1854}
1855
1856impl ::std::fmt::Display for BuildStatusType {
1857 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1858 match *self {
1859 BuildStatusType::REJECTED => write!(f, "{}", "REJECTED"),
1860 BuildStatusType::WHITELISTED => write!(f, "{}", "WHITELISTED"),
1861 BuildStatusType::PENDING => write!(f, "{}", "PENDING"),
1862 }
1863 }
1864}
1865
1866impl ::std::str::FromStr for BuildStatusType {
1867 type Err = ();
1868 fn from_str(s: &str) -> Result<Self, Self::Err> {
1869 match s {
1870 "REJECTED" => Ok(BuildStatusType::REJECTED),
1871 "WHITELISTED" => Ok(BuildStatusType::WHITELISTED),
1872 "PENDING" => Ok(BuildStatusType::PENDING),
1873 _ => Err(()),
1874 }
1875 }
1876}
1877
1878#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1879#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1880pub struct BuildUpdateRequest {
1881 #[serde(rename = "configs")]
1882 #[serde(skip_serializing_if = "Option::is_none")]
1883 pub configs: Option<HashMap<String, serde_json::Value>>,
1884}
1885
1886impl BuildUpdateRequest {
1887 pub fn new() -> BuildUpdateRequest {
1888 BuildUpdateRequest { configs: None }
1889 }
1890}
1891
1892#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1893#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1894pub struct CaCertificateConfig {
1895 #[serde(rename = "caPath")]
1897 #[serde(skip_serializing_if = "Option::is_none")]
1898 pub ca_path: Option<String>,
1899
1900 #[serde(rename = "caCert")]
1902 #[serde(skip_serializing_if = "Option::is_none")]
1903 pub ca_cert: Option<String>,
1904
1905 #[serde(rename = "system")]
1907 #[serde(skip_serializing_if = "Option::is_none")]
1908 pub system: Option<String>,
1909}
1910
1911impl CaCertificateConfig {
1912 pub fn new() -> CaCertificateConfig {
1913 CaCertificateConfig {
1914 ca_path: None,
1915 ca_cert: None,
1916 system: None,
1917 }
1918 }
1919}
1920
1921#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1922#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1923pub struct CaConfig {
1924 #[serde(rename = "ca_set")]
1925 #[serde(skip_serializing_if = "Option::is_none")]
1926 pub ca_set: Option<models::CaSet>,
1927
1928 #[serde(rename = "pinned")]
1929 #[serde(skip_serializing_if = "Option::is_none")]
1930 pub pinned: Option<Vec<crate::ByteArray>>,
1931}
1932
1933impl CaConfig {
1934 pub fn new() -> CaConfig {
1935 CaConfig {
1936 ca_set: None,
1937 pinned: None,
1938 }
1939 }
1940}
1941
1942#[allow(non_camel_case_types)]
1946#[repr(C)]
1947#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
1948#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
1949pub enum CaSet {
1950 #[serde(rename = "GLOBAL_ROOTS")]
1951 GLOBAL_ROOTS,
1952}
1953
1954impl ::std::fmt::Display for CaSet {
1955 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1956 match *self {
1957 CaSet::GLOBAL_ROOTS => write!(f, "{}", "GLOBAL_ROOTS"),
1958 }
1959 }
1960}
1961
1962impl ::std::str::FromStr for CaSet {
1963 type Err = ();
1964 fn from_str(s: &str) -> Result<Self, Self::Err> {
1965 match s {
1966 "GLOBAL_ROOTS" => Ok(CaSet::GLOBAL_ROOTS),
1967 _ => Err(()),
1968 }
1969 }
1970}
1971
1972#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1973#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
1974pub struct Certificate {
1975 #[serde(rename = "certificate_id")]
1977 #[serde(skip_serializing_if = "Option::is_none")]
1978 pub certificate_id: Option<uuid::Uuid>,
1979
1980 #[serde(rename = "status")]
1981 #[serde(skip_serializing_if = "Option::is_none")]
1982 pub status: Option<models::CertificateStatusType>,
1983
1984 #[serde(rename = "csr")]
1986 #[serde(skip_serializing_if = "Option::is_none")]
1987 pub csr: Option<String>,
1988
1989 #[serde(rename = "certificate")]
1991 #[serde(skip_serializing_if = "Option::is_none")]
1992 pub certificate: Option<String>,
1993}
1994
1995impl Certificate {
1996 pub fn new() -> Certificate {
1997 Certificate {
1998 certificate_id: None,
1999 status: None,
2000 csr: None,
2001 certificate: None,
2002 }
2003 }
2004}
2005
2006#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2007#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2008pub struct CertificateConfig {
2009 #[serde(rename = "issuer")]
2012 #[serde(skip_serializing_if = "Option::is_none")]
2013 pub issuer: Option<String>,
2014
2015 #[serde(rename = "subject")]
2017 #[serde(skip_serializing_if = "Option::is_none")]
2018 pub subject: Option<String>,
2019
2020 #[serde(rename = "altNames")]
2022 #[serde(skip_serializing_if = "Option::is_none")]
2023 pub alt_names: Option<Vec<String>>,
2024
2025 #[serde(rename = "keyType")]
2028 #[serde(skip_serializing_if = "Option::is_none")]
2029 pub key_type: Option<String>,
2030
2031 #[serde(rename = "keyParam")]
2033 #[serde(skip_serializing_if = "Option::is_none")]
2034 pub key_param: Option<serde_json::Value>,
2035
2036 #[serde(rename = "keyPath")]
2038 #[serde(skip_serializing_if = "Option::is_none")]
2039 pub key_path: Option<String>,
2040
2041 #[serde(rename = "certPath")]
2043 #[serde(skip_serializing_if = "Option::is_none")]
2044 pub cert_path: Option<String>,
2045
2046 #[serde(rename = "chainPath")]
2048 #[serde(skip_serializing_if = "Option::is_none")]
2049 pub chain_path: Option<String>,
2050}
2051
2052impl CertificateConfig {
2053 pub fn new() -> CertificateConfig {
2054 CertificateConfig {
2055 issuer: Some("MANAGER_CA".to_string()),
2056 subject: None,
2057 alt_names: None,
2058 key_type: Some("RSA".to_string()),
2059 key_param: None,
2060 key_path: None,
2061 cert_path: None,
2062 chain_path: None,
2063 }
2064 }
2065}
2066
2067#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2068#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2069pub struct CertificateDetails {
2070 #[serde(rename = "enclave_info")]
2071 #[serde(skip_serializing_if = "Option::is_none")]
2072 pub enclave_info: Option<models::EnclaveInfo>,
2073
2074 #[serde(rename = "subject_name")]
2076 pub subject_name: String,
2077
2078 #[serde(rename = "issuer_name")]
2080 pub issuer_name: String,
2081
2082 #[serde(rename = "valid_until")]
2084 pub valid_until: i64,
2085
2086 #[serde(rename = "valid_from")]
2088 pub valid_from: i64,
2089
2090 #[serde(rename = "cpusvn")]
2092 pub cpusvn: String,
2093
2094 #[serde(rename = "ias_quote_status")]
2096 pub ias_quote_status: String,
2097}
2098
2099impl CertificateDetails {
2100 pub fn new(
2101 subject_name: String,
2102 issuer_name: String,
2103 valid_until: i64,
2104 valid_from: i64,
2105 cpusvn: String,
2106 ias_quote_status: String,
2107 ) -> CertificateDetails {
2108 CertificateDetails {
2109 enclave_info: None,
2110 subject_name: subject_name,
2111 issuer_name: issuer_name,
2112 valid_until: valid_until,
2113 valid_from: valid_from,
2114 cpusvn: cpusvn,
2115 ias_quote_status: ias_quote_status,
2116 }
2117 }
2118}
2119
2120#[allow(non_camel_case_types)]
2125#[repr(C)]
2126#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
2127#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
2128pub enum CertificateStatusType {
2129 #[serde(rename = "PENDING")]
2130 PENDING,
2131 #[serde(rename = "REJECTED")]
2132 REJECTED,
2133 #[serde(rename = "ISSUED")]
2134 ISSUED,
2135 #[serde(rename = "REVOKED")]
2136 REVOKED,
2137 #[serde(rename = "EXPIRED")]
2138 EXPIRED,
2139}
2140
2141impl ::std::fmt::Display for CertificateStatusType {
2142 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2143 match *self {
2144 CertificateStatusType::PENDING => write!(f, "{}", "PENDING"),
2145 CertificateStatusType::REJECTED => write!(f, "{}", "REJECTED"),
2146 CertificateStatusType::ISSUED => write!(f, "{}", "ISSUED"),
2147 CertificateStatusType::REVOKED => write!(f, "{}", "REVOKED"),
2148 CertificateStatusType::EXPIRED => write!(f, "{}", "EXPIRED"),
2149 }
2150 }
2151}
2152
2153impl ::std::str::FromStr for CertificateStatusType {
2154 type Err = ();
2155 fn from_str(s: &str) -> Result<Self, Self::Err> {
2156 match s {
2157 "PENDING" => Ok(CertificateStatusType::PENDING),
2158 "REJECTED" => Ok(CertificateStatusType::REJECTED),
2159 "ISSUED" => Ok(CertificateStatusType::ISSUED),
2160 "REVOKED" => Ok(CertificateStatusType::REVOKED),
2161 "EXPIRED" => Ok(CertificateStatusType::EXPIRED),
2162 _ => Err(()),
2163 }
2164 }
2165}
2166
2167#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2168#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2169pub struct ConfirmEmailRequest {
2170 #[serde(rename = "confirm_token")]
2171 pub confirm_token: String,
2172}
2173
2174impl ConfirmEmailRequest {
2175 pub fn new(confirm_token: String) -> ConfirmEmailRequest {
2176 ConfirmEmailRequest {
2177 confirm_token: confirm_token,
2178 }
2179 }
2180}
2181
2182#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2183#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2184pub struct ConfirmEmailResponse {
2185 #[serde(rename = "user_email")]
2186 pub user_email: String,
2187}
2188
2189impl ConfirmEmailResponse {
2190 pub fn new(user_email: String) -> ConfirmEmailResponse {
2191 ConfirmEmailResponse {
2192 user_email: user_email,
2193 }
2194 }
2195}
2196
2197#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2198#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2199pub struct ConversionRequest {
2200 #[serde(rename = "inputImageName")]
2202 pub input_image_name: String,
2203
2204 #[serde(rename = "outputImageName")]
2206 pub output_image_name: String,
2207
2208 #[serde(rename = "inputAuthConfig")]
2209 #[serde(skip_serializing_if = "Option::is_none")]
2210 pub input_auth_config: Option<models::AuthConfig>,
2211
2212 #[serde(rename = "outputAuthConfig")]
2213 #[serde(skip_serializing_if = "Option::is_none")]
2214 pub output_auth_config: Option<models::AuthConfig>,
2215
2216 #[serde(rename = "authConfig")]
2217 #[serde(skip_serializing_if = "Option::is_none")]
2218 pub auth_config: Option<models::AuthConfig>,
2219
2220 #[serde(rename = "memSize")]
2222 #[serde(skip_serializing_if = "Option::is_none")]
2223 pub mem_size: Option<String>,
2224
2225 #[serde(rename = "threads")]
2227 #[serde(skip_serializing_if = "Option::is_none")]
2228 pub threads: Option<i32>,
2229
2230 #[serde(rename = "debug")]
2232 #[serde(skip_serializing_if = "Option::is_none")]
2233 pub debug: Option<bool>,
2234
2235 #[serde(rename = "entrypoint")]
2237 #[serde(skip_serializing_if = "Option::is_none")]
2238 pub entrypoint: Option<Vec<String>>,
2239
2240 #[serde(rename = "entrypointArgs")]
2242 #[serde(skip_serializing_if = "Option::is_none")]
2243 pub entrypoint_args: Option<Vec<String>>,
2244
2245 #[serde(rename = "encryptedDirs")]
2247 #[serde(skip_serializing_if = "Option::is_none")]
2248 pub encrypted_dirs: Option<Vec<String>>,
2249
2250 #[serde(rename = "manifestOptions")]
2252 #[serde(skip_serializing_if = "Option::is_none")]
2253 pub manifest_options: Option<serde_json::Value>,
2254
2255 #[serde(rename = "certificates")]
2256 #[serde(skip_serializing_if = "Option::is_none")]
2257 pub certificates: Option<Vec<models::CertificateConfig>>,
2258
2259 #[serde(rename = "caCertificates")]
2260 #[serde(skip_serializing_if = "Option::is_none")]
2261 pub ca_certificates: Option<Vec<models::CaCertificateConfig>>,
2262
2263 #[serde(rename = "signingKey")]
2264 #[serde(skip_serializing_if = "Option::is_none")]
2265 pub signing_key: Option<models::SigningKeyConfig>,
2266
2267 #[serde(rename = "externalPackages")]
2269 #[serde(skip_serializing_if = "Option::is_none")]
2270 pub external_packages: Option<String>,
2271
2272 #[serde(rename = "app")]
2273 #[serde(skip_serializing_if = "Option::is_none")]
2274 pub app: Option<serde_json::Value>,
2275
2276 #[serde(rename = "coreDumpPattern")]
2278 #[serde(skip_serializing_if = "Option::is_none")]
2279 pub core_dump_pattern: Option<String>,
2280
2281 #[serde(rename = "logFilePath")]
2283 #[serde(skip_serializing_if = "Option::is_none")]
2284 pub log_file_path: Option<String>,
2285
2286 #[serde(rename = "javaMode")]
2288 #[serde(skip_serializing_if = "Option::is_none")]
2289 pub java_mode: Option<String>,
2290
2291 #[serde(rename = "rwDirs")]
2293 #[serde(skip_serializing_if = "Option::is_none")]
2294 pub rw_dirs: Option<Vec<String>>,
2295
2296 #[serde(rename = "allowCmdlineArgs")]
2298 #[serde(skip_serializing_if = "Option::is_none")]
2299 pub allow_cmdline_args: Option<bool>,
2300
2301 #[serde(rename = "manifestEnv")]
2303 #[serde(skip_serializing_if = "Option::is_none")]
2304 pub manifest_env: Option<Vec<String>>,
2305}
2306
2307impl ConversionRequest {
2308 pub fn new(input_image_name: String, output_image_name: String) -> ConversionRequest {
2309 ConversionRequest {
2310 input_image_name: input_image_name,
2311 output_image_name: output_image_name,
2312 input_auth_config: None,
2313 output_auth_config: None,
2314 auth_config: None,
2315 mem_size: None,
2316 threads: None,
2317 debug: None,
2318 entrypoint: None,
2319 entrypoint_args: None,
2320 encrypted_dirs: None,
2321 manifest_options: None,
2322 certificates: None,
2323 ca_certificates: None,
2324 signing_key: None,
2325 external_packages: None,
2326 app: None,
2327 core_dump_pattern: None,
2328 log_file_path: None,
2329 java_mode: None,
2330 rw_dirs: None,
2331 allow_cmdline_args: None,
2332 manifest_env: None,
2333 }
2334 }
2335}
2336
2337#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2338#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2339pub struct ConversionResponse {
2340 #[serde(rename = "newImage")]
2342 #[serde(skip_serializing_if = "Option::is_none")]
2343 pub new_image: Option<String>,
2344
2345 #[serde(rename = "imageSHA")]
2347 #[serde(skip_serializing_if = "Option::is_none")]
2348 pub image_sha: Option<String>,
2349
2350 #[serde(rename = "imageSize")]
2352 #[serde(skip_serializing_if = "Option::is_none")]
2353 pub image_size: Option<isize>,
2354
2355 #[serde(rename = "isvprodid")]
2357 #[serde(skip_serializing_if = "Option::is_none")]
2358 pub isvprodid: Option<isize>,
2359
2360 #[serde(rename = "isvsvn")]
2362 #[serde(skip_serializing_if = "Option::is_none")]
2363 pub isvsvn: Option<isize>,
2364
2365 #[serde(rename = "mrenclave")]
2367 #[serde(skip_serializing_if = "Option::is_none")]
2368 pub mrenclave: Option<String>,
2369
2370 #[serde(rename = "mrsigner")]
2372 #[serde(skip_serializing_if = "Option::is_none")]
2373 pub mrsigner: Option<String>,
2374}
2375
2376impl ConversionResponse {
2377 pub fn new() -> ConversionResponse {
2378 ConversionResponse {
2379 new_image: None,
2380 image_sha: None,
2381 image_size: None,
2382 isvprodid: None,
2383 isvsvn: None,
2384 mrenclave: None,
2385 mrsigner: None,
2386 }
2387 }
2388}
2389
2390#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2391#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2392pub struct ConvertAppBuildRequest {
2393 #[serde(rename = "app_id")]
2395 pub app_id: uuid::Uuid,
2396
2397 #[serde(rename = "docker_version")]
2399 #[serde(skip_serializing_if = "Option::is_none")]
2400 pub docker_version: Option<String>,
2401
2402 #[serde(rename = "input_docker_version")]
2404 #[serde(skip_serializing_if = "Option::is_none")]
2405 pub input_docker_version: Option<String>,
2406
2407 #[serde(rename = "output_docker_version")]
2409 #[serde(skip_serializing_if = "Option::is_none")]
2410 pub output_docker_version: Option<String>,
2411
2412 #[serde(rename = "inputAuthConfig")]
2413 #[serde(skip_serializing_if = "Option::is_none")]
2414 pub input_auth_config: Option<models::AuthConfig>,
2415
2416 #[serde(rename = "outputAuthConfig")]
2417 #[serde(skip_serializing_if = "Option::is_none")]
2418 pub output_auth_config: Option<models::AuthConfig>,
2419
2420 #[serde(rename = "authConfig")]
2421 #[serde(skip_serializing_if = "Option::is_none")]
2422 pub auth_config: Option<models::AuthConfig>,
2423
2424 #[serde(rename = "debug")]
2426 #[serde(skip_serializing_if = "Option::is_none")]
2427 pub debug: Option<bool>,
2428
2429 #[serde(rename = "memSize")]
2431 #[serde(skip_serializing_if = "Option::is_none")]
2432 pub mem_size: Option<i64>,
2433
2434 #[serde(rename = "threads")]
2436 #[serde(skip_serializing_if = "Option::is_none")]
2437 pub threads: Option<i32>,
2438}
2439
2440impl ConvertAppBuildRequest {
2441 pub fn new(app_id: uuid::Uuid) -> ConvertAppBuildRequest {
2442 ConvertAppBuildRequest {
2443 app_id: app_id,
2444 docker_version: None,
2445 input_docker_version: None,
2446 output_docker_version: None,
2447 input_auth_config: None,
2448 output_auth_config: None,
2449 auth_config: None,
2450 debug: None,
2451 mem_size: None,
2452 threads: None,
2453 }
2454 }
2455}
2456
2457#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2458#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2459pub struct CreateBuildRequest {
2460 #[serde(rename = "docker_info")]
2461 #[serde(skip_serializing_if = "Option::is_none")]
2462 pub docker_info: Option<models::DockerInfo>,
2463
2464 #[serde(rename = "mrenclave")]
2466 pub mrenclave: String,
2467
2468 #[serde(rename = "mrsigner")]
2470 pub mrsigner: String,
2471
2472 #[serde(rename = "isvprodid")]
2474 pub isvprodid: i32,
2475
2476 #[serde(rename = "isvsvn")]
2478 pub isvsvn: i32,
2479
2480 #[serde(rename = "app_id")]
2482 #[serde(skip_serializing_if = "Option::is_none")]
2483 pub app_id: Option<uuid::Uuid>,
2484
2485 #[serde(rename = "app_name")]
2487 #[serde(skip_serializing_if = "Option::is_none")]
2488 pub app_name: Option<String>,
2489
2490 #[serde(rename = "mem_size")]
2492 #[serde(skip_serializing_if = "Option::is_none")]
2493 pub mem_size: Option<i64>,
2494
2495 #[serde(rename = "threads")]
2497 #[serde(skip_serializing_if = "Option::is_none")]
2498 pub threads: Option<i32>,
2499
2500 #[serde(rename = "advanced_settings")]
2501 #[serde(skip_serializing_if = "Option::is_none")]
2502 pub advanced_settings: Option<models::AdvancedSettings>,
2503}
2504
2505impl CreateBuildRequest {
2506 pub fn new(
2507 mrenclave: String,
2508 mrsigner: String,
2509 isvprodid: i32,
2510 isvsvn: i32,
2511 ) -> CreateBuildRequest {
2512 CreateBuildRequest {
2513 docker_info: None,
2514 mrenclave: mrenclave,
2515 mrsigner: mrsigner,
2516 isvprodid: isvprodid,
2517 isvsvn: isvsvn,
2518 app_id: None,
2519 app_name: None,
2520 mem_size: None,
2521 threads: None,
2522 advanced_settings: None,
2523 }
2524 }
2525}
2526
2527#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2528#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2529pub struct CreateDatasetRequest {
2530 #[serde(rename = "name")]
2531 pub name: String,
2532
2533 #[serde(rename = "description")]
2534 pub description: String,
2535
2536 #[serde(rename = "labels")]
2537 pub labels: HashMap<String, String>,
2538
2539 #[serde(rename = "location")]
2540 pub location: String,
2541
2542 #[serde(rename = "credentials")]
2543 pub credentials: models::DatasetCredentialsRequest,
2544}
2545
2546impl CreateDatasetRequest {
2547 pub fn new(
2548 name: String,
2549 description: String,
2550 labels: HashMap<String, String>,
2551 location: String,
2552 credentials: models::DatasetCredentialsRequest,
2553 ) -> CreateDatasetRequest {
2554 CreateDatasetRequest {
2555 name: name,
2556 description: description,
2557 labels: labels,
2558 location: location,
2559 credentials: credentials,
2560 }
2561 }
2562}
2563
2564#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2566#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2567pub struct CreateFinalWorkflowGraph {
2568 #[serde(rename = "name")]
2569 pub name: String,
2570
2571 #[serde(rename = "description")]
2572 pub description: String,
2573
2574 #[serde(rename = "contents")]
2575 pub contents: models::CreateWorkflowVersionRequest,
2576}
2577
2578impl CreateFinalWorkflowGraph {
2579 pub fn new(
2580 name: String,
2581 description: String,
2582 contents: models::CreateWorkflowVersionRequest,
2583 ) -> CreateFinalWorkflowGraph {
2584 CreateFinalWorkflowGraph {
2585 name: name,
2586 description: description,
2587 contents: contents,
2588 }
2589 }
2590}
2591
2592#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2594#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2595pub struct CreateWorkflowGraph {
2596 #[serde(rename = "name")]
2597 pub name: String,
2598
2599 #[serde(rename = "description")]
2600 pub description: String,
2601
2602 #[serde(rename = "objects")]
2603 pub objects: SortedHashMap<String, models::WorkflowObject>,
2604
2605 #[serde(rename = "edges")]
2606 pub edges: SortedHashMap<String, models::WorkflowEdge>,
2607
2608 #[serde(rename = "metadata")]
2609 #[serde(skip_serializing_if = "Option::is_none")]
2610 pub metadata: Option<models::WorkflowMetadata>,
2611}
2612
2613impl CreateWorkflowGraph {
2614 pub fn new(
2615 name: String,
2616 description: String,
2617 objects: SortedHashMap<String, models::WorkflowObject>,
2618 edges: SortedHashMap<String, models::WorkflowEdge>,
2619 ) -> CreateWorkflowGraph {
2620 CreateWorkflowGraph {
2621 name: name,
2622 description: description,
2623 objects: objects,
2624 edges: edges,
2625 metadata: None,
2626 }
2627 }
2628}
2629
2630#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2632#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2633pub struct CreateWorkflowVersionRequest {
2634 #[serde(rename = "objects")]
2635 pub objects: SortedHashMap<String, models::WorkflowObject>,
2636
2637 #[serde(rename = "edges")]
2638 pub edges: SortedHashMap<String, models::WorkflowEdge>,
2639
2640 #[serde(rename = "metadata")]
2641 #[serde(skip_serializing_if = "Option::is_none")]
2642 pub metadata: Option<models::WorkflowMetadata>,
2643}
2644
2645impl CreateWorkflowVersionRequest {
2646 pub fn new(
2647 objects: SortedHashMap<String, models::WorkflowObject>,
2648 edges: SortedHashMap<String, models::WorkflowEdge>,
2649 ) -> CreateWorkflowVersionRequest {
2650 CreateWorkflowVersionRequest {
2651 objects: objects,
2652 edges: edges,
2653 metadata: None,
2654 }
2655 }
2656}
2657
2658#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2660#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2661pub struct CredentialType {
2662 #[serde(rename = "default")]
2663 #[serde(skip_serializing_if = "Option::is_none")]
2664 pub default: Option<models::AuthConfig>,
2665}
2666
2667impl CredentialType {
2668 pub fn new() -> CredentialType {
2669 CredentialType { default: None }
2670 }
2671}
2672
2673#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2675#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2676pub struct Dataset {
2677 #[serde(rename = "dataset_id")]
2678 pub dataset_id: uuid::Uuid,
2679
2680 #[serde(rename = "name")]
2681 pub name: String,
2682
2683 #[serde(rename = "owner")]
2684 pub owner: uuid::Uuid,
2685
2686 #[serde(rename = "created_at")]
2688 pub created_at: i64,
2689
2690 #[serde(rename = "updated_at")]
2692 pub updated_at: i64,
2693
2694 #[serde(rename = "description")]
2695 pub description: String,
2696
2697 #[serde(rename = "location")]
2698 pub location: String,
2699
2700 #[serde(rename = "labels")]
2701 pub labels: HashMap<String, String>,
2702
2703 #[serde(rename = "credentials")]
2704 pub credentials: models::DatasetCredentials,
2705}
2706
2707impl Dataset {
2708 pub fn new(
2709 dataset_id: uuid::Uuid,
2710 name: String,
2711 owner: uuid::Uuid,
2712 created_at: i64,
2713 updated_at: i64,
2714 description: String,
2715 location: String,
2716 labels: HashMap<String, String>,
2717 credentials: models::DatasetCredentials,
2718 ) -> Dataset {
2719 Dataset {
2720 dataset_id: dataset_id,
2721 name: name,
2722 owner: owner,
2723 created_at: created_at,
2724 updated_at: updated_at,
2725 description: description,
2726 location: location,
2727 labels: labels,
2728 credentials: credentials,
2729 }
2730 }
2731}
2732
2733#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2735#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2736pub struct DatasetCredentials {
2737 #[serde(rename = "sdkms")]
2738 #[serde(skip_serializing_if = "Option::is_none")]
2739 pub sdkms: Option<models::SdkmsCredentials>,
2740}
2741
2742impl DatasetCredentials {
2743 pub fn new() -> DatasetCredentials {
2744 DatasetCredentials { sdkms: None }
2745 }
2746}
2747
2748#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2750#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2751pub struct DatasetCredentialsRequest {
2752 #[serde(rename = "contents")]
2753 pub contents: String,
2754}
2755
2756impl DatasetCredentialsRequest {
2757 pub fn new(contents: String) -> DatasetCredentialsRequest {
2758 DatasetCredentialsRequest { contents: contents }
2759 }
2760}
2761
2762#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2763#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2764pub struct DatasetUpdateRequest {
2765 #[serde(rename = "name")]
2766 #[serde(skip_serializing_if = "Option::is_none")]
2767 pub name: Option<String>,
2768
2769 #[serde(rename = "description")]
2770 #[serde(skip_serializing_if = "Option::is_none")]
2771 pub description: Option<String>,
2772
2773 #[serde(rename = "labels")]
2774 #[serde(skip_serializing_if = "Option::is_none")]
2775 pub labels: Option<HashMap<String, String>>,
2776
2777 #[serde(rename = "location")]
2778 #[serde(skip_serializing_if = "Option::is_none")]
2779 pub location: Option<String>,
2780
2781 #[serde(rename = "credentials")]
2782 #[serde(skip_serializing_if = "Option::is_none")]
2783 pub credentials: Option<models::DatasetCredentialsRequest>,
2784}
2785
2786impl DatasetUpdateRequest {
2787 pub fn new() -> DatasetUpdateRequest {
2788 DatasetUpdateRequest {
2789 name: None,
2790 description: None,
2791 labels: None,
2792 location: None,
2793 credentials: None,
2794 }
2795 }
2796}
2797
2798#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2800#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2801pub struct DenyRequest {
2802 #[serde(rename = "reason")]
2804 #[serde(skip_serializing_if = "Option::is_none")]
2805 pub reason: Option<String>,
2806}
2807
2808impl DenyRequest {
2809 pub fn new() -> DenyRequest {
2810 DenyRequest { reason: None }
2811 }
2812}
2813
2814#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2816#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2817pub struct DockerInfo {
2818 #[serde(rename = "docker_image_name")]
2820 pub docker_image_name: String,
2821
2822 #[serde(rename = "docker_version")]
2824 pub docker_version: String,
2825
2826 #[serde(rename = "docker_image_sha")]
2828 #[serde(skip_serializing_if = "Option::is_none")]
2829 pub docker_image_sha: Option<String>,
2830
2831 #[serde(rename = "docker_image_size")]
2833 #[serde(skip_serializing_if = "Option::is_none")]
2834 pub docker_image_size: Option<i64>,
2835}
2836
2837impl DockerInfo {
2838 pub fn new(docker_image_name: String, docker_version: String) -> DockerInfo {
2839 DockerInfo {
2840 docker_image_name: docker_image_name,
2841 docker_version: docker_version,
2842 docker_image_sha: None,
2843 docker_image_size: None,
2844 }
2845 }
2846}
2847
2848#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2850#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2851pub struct EnclaveInfo {
2852 #[serde(rename = "mrenclave")]
2854 pub mrenclave: String,
2855
2856 #[serde(rename = "mrsigner")]
2858 pub mrsigner: String,
2859
2860 #[serde(rename = "isvprodid")]
2862 pub isvprodid: i32,
2863
2864 #[serde(rename = "isvsvn")]
2866 pub isvsvn: i32,
2867}
2868
2869impl EnclaveInfo {
2870 pub fn new(mrenclave: String, mrsigner: String, isvprodid: i32, isvsvn: i32) -> EnclaveInfo {
2871 EnclaveInfo {
2872 mrenclave: mrenclave,
2873 mrsigner: mrsigner,
2874 isvprodid: isvprodid,
2875 isvsvn: isvsvn,
2876 }
2877 }
2878}
2879
2880#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2882#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2883pub struct Entity {
2884 #[serde(rename = "user")]
2886 #[serde(skip_serializing_if = "Option::is_none")]
2887 pub user: Option<uuid::Uuid>,
2888}
2889
2890impl Entity {
2891 pub fn new() -> Entity {
2892 Entity { user: None }
2893 }
2894}
2895
2896#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2897#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
2898pub struct Event {
2899 #[serde(rename = "message")]
2901 pub message: String,
2902
2903 #[serde(rename = "code")]
2904 pub code: models::EventType,
2905
2906 #[serde(rename = "severity")]
2907 #[serde(skip_serializing_if = "Option::is_none")]
2908 pub severity: Option<models::EventSeverity>,
2909}
2910
2911impl Event {
2912 pub fn new(message: String, code: models::EventType) -> Event {
2913 Event {
2914 message: message,
2915 code: code,
2916 severity: None,
2917 }
2918 }
2919}
2920
2921#[allow(non_camel_case_types)]
2926#[repr(C)]
2927#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
2928#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
2929pub enum EventActionType {
2930 #[serde(rename = "NODE_STATUS")]
2931 NODE_STATUS,
2932 #[serde(rename = "APP_STATUS")]
2933 APP_STATUS,
2934 #[serde(rename = "USER_APPROVAL")]
2935 USER_APPROVAL,
2936 #[serde(rename = "NODE_ATTESTATION")]
2937 NODE_ATTESTATION,
2938 #[serde(rename = "CERTIFICATE")]
2939 CERTIFICATE,
2940 #[serde(rename = "ADMIN")]
2941 ADMIN,
2942 #[serde(rename = "APP_HEARTBEAT")]
2943 APP_HEARTBEAT,
2944 #[serde(rename = "USER_AUTH")]
2945 USER_AUTH,
2946}
2947
2948impl ::std::fmt::Display for EventActionType {
2949 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2950 match *self {
2951 EventActionType::NODE_STATUS => write!(f, "{}", "NODE_STATUS"),
2952 EventActionType::APP_STATUS => write!(f, "{}", "APP_STATUS"),
2953 EventActionType::USER_APPROVAL => write!(f, "{}", "USER_APPROVAL"),
2954 EventActionType::NODE_ATTESTATION => write!(f, "{}", "NODE_ATTESTATION"),
2955 EventActionType::CERTIFICATE => write!(f, "{}", "CERTIFICATE"),
2956 EventActionType::ADMIN => write!(f, "{}", "ADMIN"),
2957 EventActionType::APP_HEARTBEAT => write!(f, "{}", "APP_HEARTBEAT"),
2958 EventActionType::USER_AUTH => write!(f, "{}", "USER_AUTH"),
2959 }
2960 }
2961}
2962
2963impl ::std::str::FromStr for EventActionType {
2964 type Err = ();
2965 fn from_str(s: &str) -> Result<Self, Self::Err> {
2966 match s {
2967 "NODE_STATUS" => Ok(EventActionType::NODE_STATUS),
2968 "APP_STATUS" => Ok(EventActionType::APP_STATUS),
2969 "USER_APPROVAL" => Ok(EventActionType::USER_APPROVAL),
2970 "NODE_ATTESTATION" => Ok(EventActionType::NODE_ATTESTATION),
2971 "CERTIFICATE" => Ok(EventActionType::CERTIFICATE),
2972 "ADMIN" => Ok(EventActionType::ADMIN),
2973 "APP_HEARTBEAT" => Ok(EventActionType::APP_HEARTBEAT),
2974 "USER_AUTH" => Ok(EventActionType::USER_AUTH),
2975 _ => Err(()),
2976 }
2977 }
2978}
2979
2980#[allow(non_camel_case_types)]
2985#[repr(C)]
2986#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
2987#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
2988pub enum EventActorType {
2989 #[serde(rename = "APP")]
2990 APP,
2991 #[serde(rename = "USER")]
2992 USER,
2993 #[serde(rename = "SYSTEM")]
2994 SYSTEM,
2995}
2996
2997impl ::std::fmt::Display for EventActorType {
2998 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2999 match *self {
3000 EventActorType::APP => write!(f, "{}", "APP"),
3001 EventActorType::USER => write!(f, "{}", "USER"),
3002 EventActorType::SYSTEM => write!(f, "{}", "SYSTEM"),
3003 }
3004 }
3005}
3006
3007impl ::std::str::FromStr for EventActorType {
3008 type Err = ();
3009 fn from_str(s: &str) -> Result<Self, Self::Err> {
3010 match s {
3011 "APP" => Ok(EventActorType::APP),
3012 "USER" => Ok(EventActorType::USER),
3013 "SYSTEM" => Ok(EventActorType::SYSTEM),
3014 _ => Err(()),
3015 }
3016 }
3017}
3018
3019#[allow(non_camel_case_types)]
3024#[repr(C)]
3025#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
3026#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
3027pub enum EventSeverity {
3028 #[serde(rename = "INFO")]
3029 INFO,
3030 #[serde(rename = "WARNING")]
3031 WARNING,
3032 #[serde(rename = "ERROR")]
3033 ERROR,
3034 #[serde(rename = "CRITICAL")]
3035 CRITICAL,
3036}
3037
3038impl ::std::fmt::Display for EventSeverity {
3039 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3040 match *self {
3041 EventSeverity::INFO => write!(f, "{}", "INFO"),
3042 EventSeverity::WARNING => write!(f, "{}", "WARNING"),
3043 EventSeverity::ERROR => write!(f, "{}", "ERROR"),
3044 EventSeverity::CRITICAL => write!(f, "{}", "CRITICAL"),
3045 }
3046 }
3047}
3048
3049impl ::std::str::FromStr for EventSeverity {
3050 type Err = ();
3051 fn from_str(s: &str) -> Result<Self, Self::Err> {
3052 match s {
3053 "INFO" => Ok(EventSeverity::INFO),
3054 "WARNING" => Ok(EventSeverity::WARNING),
3055 "ERROR" => Ok(EventSeverity::ERROR),
3056 "CRITICAL" => Ok(EventSeverity::CRITICAL),
3057 _ => Err(()),
3058 }
3059 }
3060}
3061
3062#[allow(non_camel_case_types)]
3067#[repr(C)]
3068#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
3069#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
3070pub enum EventType {
3071 #[serde(rename = "BAD_REQUEST")]
3072 BAD_REQUEST,
3073 #[serde(rename = "NODE_NOT_ENROLLED")]
3074 NODE_NOT_ENROLLED,
3075 #[serde(rename = "INVALID_NAME")]
3076 INVALID_NAME,
3077 #[serde(rename = "INVALID_VALUE")]
3078 INVALID_VALUE,
3079 #[serde(rename = "UN_AUTHORIZED")]
3080 UN_AUTHORIZED,
3081 #[serde(rename = "NO_ACCOUNT_SELECTED")]
3082 NO_ACCOUNT_SELECTED,
3083 #[serde(rename = "NO_ZONE_SELECTED")]
3084 NO_ZONE_SELECTED,
3085 #[serde(rename = "ATTESTATION_REQUIRED")]
3086 ATTESTATION_REQUIRED,
3087 #[serde(rename = "NOT_FOUND")]
3088 NOT_FOUND,
3089 #[serde(rename = "UNIQUE_VIOLATION")]
3090 UNIQUE_VIOLATION,
3091 #[serde(rename = "KEY_UNIQUE_VIOLATION")]
3092 KEY_UNIQUE_VIOLATION,
3093 #[serde(rename = "INVALID_STATE")]
3094 INVALID_STATE,
3095 #[serde(rename = "USER_ALREADY_EXISTS")]
3096 USER_ALREADY_EXISTS,
3097 #[serde(rename = "FORBIDDEN")]
3098 FORBIDDEN,
3099 #[serde(rename = "AUTH_FAILED")]
3100 AUTH_FAILED,
3101 #[serde(rename = "INVALID_SESSION")]
3102 INVALID_SESSION,
3103 #[serde(rename = "SESSION_EXPIRED")]
3104 SESSION_EXPIRED,
3105 #[serde(rename = "CERT_PARSE_ERROR")]
3106 CERT_PARSE_ERROR,
3107 #[serde(rename = "QUOTA_EXCEEDED")]
3108 QUOTA_EXCEEDED,
3109 #[serde(rename = "USER_ACCOUNT_PENDING")]
3110 USER_ACCOUNT_PENDING,
3111 #[serde(rename = "INTERNAL_SERVER_ERROR")]
3112 INTERNAL_SERVER_ERROR,
3113 #[serde(rename = "MISSING_REQUIRED_PARAMETER")]
3114 MISSING_REQUIRED_PARAMETER,
3115 #[serde(rename = "INVALID_PATH_PARAMETER")]
3116 INVALID_PATH_PARAMETER,
3117 #[serde(rename = "INVALID_HEADER")]
3118 INVALID_HEADER,
3119 #[serde(rename = "INVALID_QUERY_PARAMETER")]
3120 INVALID_QUERY_PARAMETER,
3121 #[serde(rename = "INVALID_BODY_PARAMETER")]
3122 INVALID_BODY_PARAMETER,
3123 #[serde(rename = "METHOD_NOT_ALLOWED")]
3124 METHOD_NOT_ALLOWED,
3125 #[serde(rename = "LATEST_EULA_NOT_ACCEPTED")]
3126 LATEST_EULA_NOT_ACCEPTED,
3127 #[serde(rename = "CONFLICT")]
3128 CONFLICT,
3129 #[serde(rename = "DCAP_ARTIFACT_RETRIEVAL_ERROR")]
3130 DCAP_ARTIFACT_RETRIEVAL_ERROR,
3131 #[serde(rename = "DCAP_ERROR")]
3132 DCAP_ERROR,
3133 #[serde(rename = "DCAP_ARTIFACT_SERIALIZATION_ERROR")]
3134 DCAP_ARTIFACT_SERIALIZATION_ERROR,
3135 #[serde(rename = "DCAP_ARTIFACT_DESERIALIZATION_ERROR")]
3136 DCAP_ARTIFACT_DESERIALIZATION_ERROR,
3137 #[serde(rename = "LOCKED")]
3138 LOCKED,
3139 #[serde(rename = "UNDERGOING_MAINTENANCE")]
3140 UNDERGOING_MAINTENANCE,
3141}
3142
3143impl ::std::fmt::Display for EventType {
3144 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3145 match *self {
3146 EventType::BAD_REQUEST => write!(f, "{}", "BAD_REQUEST"),
3147 EventType::NODE_NOT_ENROLLED => write!(f, "{}", "NODE_NOT_ENROLLED"),
3148 EventType::INVALID_NAME => write!(f, "{}", "INVALID_NAME"),
3149 EventType::INVALID_VALUE => write!(f, "{}", "INVALID_VALUE"),
3150 EventType::UN_AUTHORIZED => write!(f, "{}", "UN_AUTHORIZED"),
3151 EventType::NO_ACCOUNT_SELECTED => write!(f, "{}", "NO_ACCOUNT_SELECTED"),
3152 EventType::NO_ZONE_SELECTED => write!(f, "{}", "NO_ZONE_SELECTED"),
3153 EventType::ATTESTATION_REQUIRED => write!(f, "{}", "ATTESTATION_REQUIRED"),
3154 EventType::NOT_FOUND => write!(f, "{}", "NOT_FOUND"),
3155 EventType::UNIQUE_VIOLATION => write!(f, "{}", "UNIQUE_VIOLATION"),
3156 EventType::KEY_UNIQUE_VIOLATION => write!(f, "{}", "KEY_UNIQUE_VIOLATION"),
3157 EventType::INVALID_STATE => write!(f, "{}", "INVALID_STATE"),
3158 EventType::USER_ALREADY_EXISTS => write!(f, "{}", "USER_ALREADY_EXISTS"),
3159 EventType::FORBIDDEN => write!(f, "{}", "FORBIDDEN"),
3160 EventType::AUTH_FAILED => write!(f, "{}", "AUTH_FAILED"),
3161 EventType::INVALID_SESSION => write!(f, "{}", "INVALID_SESSION"),
3162 EventType::SESSION_EXPIRED => write!(f, "{}", "SESSION_EXPIRED"),
3163 EventType::CERT_PARSE_ERROR => write!(f, "{}", "CERT_PARSE_ERROR"),
3164 EventType::QUOTA_EXCEEDED => write!(f, "{}", "QUOTA_EXCEEDED"),
3165 EventType::USER_ACCOUNT_PENDING => write!(f, "{}", "USER_ACCOUNT_PENDING"),
3166 EventType::INTERNAL_SERVER_ERROR => write!(f, "{}", "INTERNAL_SERVER_ERROR"),
3167 EventType::MISSING_REQUIRED_PARAMETER => write!(f, "{}", "MISSING_REQUIRED_PARAMETER"),
3168 EventType::INVALID_PATH_PARAMETER => write!(f, "{}", "INVALID_PATH_PARAMETER"),
3169 EventType::INVALID_HEADER => write!(f, "{}", "INVALID_HEADER"),
3170 EventType::INVALID_QUERY_PARAMETER => write!(f, "{}", "INVALID_QUERY_PARAMETER"),
3171 EventType::INVALID_BODY_PARAMETER => write!(f, "{}", "INVALID_BODY_PARAMETER"),
3172 EventType::METHOD_NOT_ALLOWED => write!(f, "{}", "METHOD_NOT_ALLOWED"),
3173 EventType::LATEST_EULA_NOT_ACCEPTED => write!(f, "{}", "LATEST_EULA_NOT_ACCEPTED"),
3174 EventType::CONFLICT => write!(f, "{}", "CONFLICT"),
3175 EventType::DCAP_ARTIFACT_RETRIEVAL_ERROR => {
3176 write!(f, "{}", "DCAP_ARTIFACT_RETRIEVAL_ERROR")
3177 }
3178 EventType::DCAP_ERROR => write!(f, "{}", "DCAP_ERROR"),
3179 EventType::DCAP_ARTIFACT_SERIALIZATION_ERROR => {
3180 write!(f, "{}", "DCAP_ARTIFACT_SERIALIZATION_ERROR")
3181 }
3182 EventType::DCAP_ARTIFACT_DESERIALIZATION_ERROR => {
3183 write!(f, "{}", "DCAP_ARTIFACT_DESERIALIZATION_ERROR")
3184 }
3185 EventType::LOCKED => write!(f, "{}", "LOCKED"),
3186 EventType::UNDERGOING_MAINTENANCE => write!(f, "{}", "UNDERGOING_MAINTENANCE"),
3187 }
3188 }
3189}
3190
3191impl ::std::str::FromStr for EventType {
3192 type Err = ();
3193 fn from_str(s: &str) -> Result<Self, Self::Err> {
3194 match s {
3195 "BAD_REQUEST" => Ok(EventType::BAD_REQUEST),
3196 "NODE_NOT_ENROLLED" => Ok(EventType::NODE_NOT_ENROLLED),
3197 "INVALID_NAME" => Ok(EventType::INVALID_NAME),
3198 "INVALID_VALUE" => Ok(EventType::INVALID_VALUE),
3199 "UN_AUTHORIZED" => Ok(EventType::UN_AUTHORIZED),
3200 "NO_ACCOUNT_SELECTED" => Ok(EventType::NO_ACCOUNT_SELECTED),
3201 "NO_ZONE_SELECTED" => Ok(EventType::NO_ZONE_SELECTED),
3202 "ATTESTATION_REQUIRED" => Ok(EventType::ATTESTATION_REQUIRED),
3203 "NOT_FOUND" => Ok(EventType::NOT_FOUND),
3204 "UNIQUE_VIOLATION" => Ok(EventType::UNIQUE_VIOLATION),
3205 "KEY_UNIQUE_VIOLATION" => Ok(EventType::KEY_UNIQUE_VIOLATION),
3206 "INVALID_STATE" => Ok(EventType::INVALID_STATE),
3207 "USER_ALREADY_EXISTS" => Ok(EventType::USER_ALREADY_EXISTS),
3208 "FORBIDDEN" => Ok(EventType::FORBIDDEN),
3209 "AUTH_FAILED" => Ok(EventType::AUTH_FAILED),
3210 "INVALID_SESSION" => Ok(EventType::INVALID_SESSION),
3211 "SESSION_EXPIRED" => Ok(EventType::SESSION_EXPIRED),
3212 "CERT_PARSE_ERROR" => Ok(EventType::CERT_PARSE_ERROR),
3213 "QUOTA_EXCEEDED" => Ok(EventType::QUOTA_EXCEEDED),
3214 "USER_ACCOUNT_PENDING" => Ok(EventType::USER_ACCOUNT_PENDING),
3215 "INTERNAL_SERVER_ERROR" => Ok(EventType::INTERNAL_SERVER_ERROR),
3216 "MISSING_REQUIRED_PARAMETER" => Ok(EventType::MISSING_REQUIRED_PARAMETER),
3217 "INVALID_PATH_PARAMETER" => Ok(EventType::INVALID_PATH_PARAMETER),
3218 "INVALID_HEADER" => Ok(EventType::INVALID_HEADER),
3219 "INVALID_QUERY_PARAMETER" => Ok(EventType::INVALID_QUERY_PARAMETER),
3220 "INVALID_BODY_PARAMETER" => Ok(EventType::INVALID_BODY_PARAMETER),
3221 "METHOD_NOT_ALLOWED" => Ok(EventType::METHOD_NOT_ALLOWED),
3222 "LATEST_EULA_NOT_ACCEPTED" => Ok(EventType::LATEST_EULA_NOT_ACCEPTED),
3223 "CONFLICT" => Ok(EventType::CONFLICT),
3224 "DCAP_ARTIFACT_RETRIEVAL_ERROR" => Ok(EventType::DCAP_ARTIFACT_RETRIEVAL_ERROR),
3225 "DCAP_ERROR" => Ok(EventType::DCAP_ERROR),
3226 "DCAP_ARTIFACT_SERIALIZATION_ERROR" => Ok(EventType::DCAP_ARTIFACT_SERIALIZATION_ERROR),
3227 "DCAP_ARTIFACT_DESERIALIZATION_ERROR" => {
3228 Ok(EventType::DCAP_ARTIFACT_DESERIALIZATION_ERROR)
3229 }
3230 "LOCKED" => Ok(EventType::LOCKED),
3231 "UNDERGOING_MAINTENANCE" => Ok(EventType::UNDERGOING_MAINTENANCE),
3232 _ => Err(()),
3233 }
3234 }
3235}
3236
3237#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3238#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3239pub struct FinalWorkflow {
3240 #[serde(rename = "graph_id")]
3241 pub graph_id: uuid::Uuid,
3242
3243 #[serde(rename = "name")]
3244 pub name: String,
3245
3246 #[serde(rename = "created_at")]
3248 pub created_at: i64,
3249
3250 #[serde(rename = "updated_at")]
3252 pub updated_at: i64,
3253
3254 #[serde(rename = "description")]
3255 pub description: String,
3256
3257 #[serde(rename = "versions")]
3258 pub versions: HashMap<String, models::FinalWorkflowGraph>,
3259}
3260
3261impl FinalWorkflow {
3262 pub fn new(
3263 graph_id: uuid::Uuid,
3264 name: String,
3265 created_at: i64,
3266 updated_at: i64,
3267 description: String,
3268 versions: HashMap<String, models::FinalWorkflowGraph>,
3269 ) -> FinalWorkflow {
3270 FinalWorkflow {
3271 graph_id: graph_id,
3272 name: name,
3273 created_at: created_at,
3274 updated_at: updated_at,
3275 description: description,
3276 versions: versions,
3277 }
3278 }
3279}
3280
3281#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3283#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3284pub struct FinalWorkflowGraph {
3285 #[serde(rename = "created_at")]
3287 pub created_at: i64,
3288
3289 #[serde(rename = "objects")]
3290 pub objects: SortedHashMap<String, models::WorkflowObject>,
3291
3292 #[serde(rename = "edges")]
3293 pub edges: SortedHashMap<String, models::WorkflowEdge>,
3294
3295 #[serde(rename = "metadata")]
3296 #[serde(skip_serializing_if = "Option::is_none")]
3297 pub metadata: Option<models::WorkflowMetadata>,
3298
3299 #[serde(rename = "runtime_configs")]
3300 pub runtime_configs: SortedHashMap<String, models::WorkflowObjectRefApp>,
3301}
3302
3303impl FinalWorkflowGraph {
3304 pub fn new(
3305 created_at: i64,
3306 objects: SortedHashMap<String, models::WorkflowObject>,
3307 edges: SortedHashMap<String, models::WorkflowEdge>,
3308 runtime_configs: SortedHashMap<String, models::WorkflowObjectRefApp>,
3309 ) -> FinalWorkflowGraph {
3310 FinalWorkflowGraph {
3311 created_at: created_at,
3312 objects: objects,
3313 edges: edges,
3314 metadata: None,
3315 runtime_configs: runtime_configs,
3316 }
3317 }
3318}
3319
3320#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3321#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3322pub struct ForgotPasswordRequest {
3323 #[serde(rename = "user_email")]
3324 pub user_email: String,
3325}
3326
3327impl ForgotPasswordRequest {
3328 pub fn new(user_email: String) -> ForgotPasswordRequest {
3329 ForgotPasswordRequest {
3330 user_email: user_email,
3331 }
3332 }
3333}
3334
3335#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3336#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3337pub struct GetAllApplicationConfigsResponse {
3338 #[serde(rename = "metadata")]
3339 #[serde(skip_serializing_if = "Option::is_none")]
3340 pub metadata: Option<models::SearchMetadata>,
3341
3342 #[serde(rename = "items")]
3343 pub items: Vec<models::ApplicationConfigResponse>,
3344}
3345
3346impl GetAllApplicationConfigsResponse {
3347 pub fn new(items: Vec<models::ApplicationConfigResponse>) -> GetAllApplicationConfigsResponse {
3348 GetAllApplicationConfigsResponse {
3349 metadata: None,
3350 items: items,
3351 }
3352 }
3353}
3354
3355#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3356#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3357pub struct GetAllApprovalRequests {
3358 #[serde(rename = "metadata")]
3359 #[serde(skip_serializing_if = "Option::is_none")]
3360 pub metadata: Option<models::SearchMetadata>,
3361
3362 #[serde(rename = "items")]
3363 pub items: Vec<models::ApprovalRequest>,
3364}
3365
3366impl GetAllApprovalRequests {
3367 pub fn new(items: Vec<models::ApprovalRequest>) -> GetAllApprovalRequests {
3368 GetAllApprovalRequests {
3369 metadata: None,
3370 items: items,
3371 }
3372 }
3373}
3374
3375#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3376#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3377pub struct GetAllAppsResponse {
3378 #[serde(rename = "metadata")]
3379 #[serde(skip_serializing_if = "Option::is_none")]
3380 pub metadata: Option<models::SearchMetadata>,
3381
3382 #[serde(rename = "items")]
3383 pub items: Vec<models::App>,
3384}
3385
3386impl GetAllAppsResponse {
3387 pub fn new(items: Vec<models::App>) -> GetAllAppsResponse {
3388 GetAllAppsResponse {
3389 metadata: None,
3390 items: items,
3391 }
3392 }
3393}
3394
3395#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3396#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3397pub struct GetAllBuildDeploymentsResponse {
3398 #[serde(rename = "metadata")]
3399 #[serde(skip_serializing_if = "Option::is_none")]
3400 pub metadata: Option<models::SearchMetadata>,
3401
3402 #[serde(rename = "items")]
3403 pub items: Vec<models::AppNodeInfo>,
3404}
3405
3406impl GetAllBuildDeploymentsResponse {
3407 pub fn new(items: Vec<models::AppNodeInfo>) -> GetAllBuildDeploymentsResponse {
3408 GetAllBuildDeploymentsResponse {
3409 metadata: None,
3410 items: items,
3411 }
3412 }
3413}
3414
3415#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3416#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3417pub struct GetAllBuildsResponse {
3418 #[serde(rename = "metadata")]
3419 #[serde(skip_serializing_if = "Option::is_none")]
3420 pub metadata: Option<models::SearchMetadata>,
3421
3422 #[serde(rename = "items")]
3423 pub items: Vec<models::Build>,
3424}
3425
3426impl GetAllBuildsResponse {
3427 pub fn new(items: Vec<models::Build>) -> GetAllBuildsResponse {
3428 GetAllBuildsResponse {
3429 metadata: None,
3430 items: items,
3431 }
3432 }
3433}
3434
3435#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3436#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3437pub struct GetAllDatasetsResponse {
3438 #[serde(rename = "metadata")]
3439 #[serde(skip_serializing_if = "Option::is_none")]
3440 pub metadata: Option<models::SearchMetadata>,
3441
3442 #[serde(rename = "items")]
3443 pub items: Vec<models::Dataset>,
3444}
3445
3446impl GetAllDatasetsResponse {
3447 pub fn new(items: Vec<models::Dataset>) -> GetAllDatasetsResponse {
3448 GetAllDatasetsResponse {
3449 metadata: None,
3450 items: items,
3451 }
3452 }
3453}
3454
3455#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3456#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3457pub struct GetAllFinalWorkflowGraphsResponse {
3458 #[serde(rename = "metadata")]
3459 #[serde(skip_serializing_if = "Option::is_none")]
3460 pub metadata: Option<models::SearchMetadata>,
3461
3462 #[serde(rename = "items")]
3463 pub items: Vec<models::FinalWorkflow>,
3464}
3465
3466impl GetAllFinalWorkflowGraphsResponse {
3467 pub fn new(items: Vec<models::FinalWorkflow>) -> GetAllFinalWorkflowGraphsResponse {
3468 GetAllFinalWorkflowGraphsResponse {
3469 metadata: None,
3470 items: items,
3471 }
3472 }
3473}
3474
3475#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3476#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3477pub struct GetAllNodesResponse {
3478 #[serde(rename = "metadata")]
3479 #[serde(skip_serializing_if = "Option::is_none")]
3480 pub metadata: Option<models::SearchMetadata>,
3481
3482 #[serde(rename = "items")]
3483 pub items: Vec<models::Node>,
3484}
3485
3486impl GetAllNodesResponse {
3487 pub fn new(items: Vec<models::Node>) -> GetAllNodesResponse {
3488 GetAllNodesResponse {
3489 metadata: None,
3490 items: items,
3491 }
3492 }
3493}
3494
3495#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3496#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3497pub struct GetAllTasksResponse {
3498 #[serde(rename = "metadata")]
3499 #[serde(skip_serializing_if = "Option::is_none")]
3500 pub metadata: Option<models::SearchMetadata>,
3501
3502 #[serde(rename = "items")]
3503 pub items: Vec<models::Task>,
3504}
3505
3506impl GetAllTasksResponse {
3507 pub fn new(items: Vec<models::Task>) -> GetAllTasksResponse {
3508 GetAllTasksResponse {
3509 metadata: None,
3510 items: items,
3511 }
3512 }
3513}
3514
3515#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3516#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3517pub struct GetAllUsersResponse {
3518 #[serde(rename = "metadata")]
3519 #[serde(skip_serializing_if = "Option::is_none")]
3520 pub metadata: Option<models::SearchMetadata>,
3521
3522 #[serde(rename = "items")]
3523 pub items: Vec<models::User>,
3524}
3525
3526impl GetAllUsersResponse {
3527 pub fn new(items: Vec<models::User>) -> GetAllUsersResponse {
3528 GetAllUsersResponse {
3529 metadata: None,
3530 items: items,
3531 }
3532 }
3533}
3534
3535#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3536#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3537pub struct GetAllWorkflowGraphsResponse {
3538 #[serde(rename = "metadata")]
3539 #[serde(skip_serializing_if = "Option::is_none")]
3540 pub metadata: Option<models::SearchMetadata>,
3541
3542 #[serde(rename = "items")]
3543 pub items: Vec<models::WorkflowGraph>,
3544}
3545
3546impl GetAllWorkflowGraphsResponse {
3547 pub fn new(items: Vec<models::WorkflowGraph>) -> GetAllWorkflowGraphsResponse {
3548 GetAllWorkflowGraphsResponse {
3549 metadata: None,
3550 items: items,
3551 }
3552 }
3553}
3554
3555#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3556#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3557pub struct GetPckCertResponse {
3558 #[serde(rename = "pck_cert")]
3560 pub pck_cert: crate::ByteArray,
3561}
3562
3563impl GetPckCertResponse {
3564 pub fn new(pck_cert: crate::ByteArray) -> GetPckCertResponse {
3565 GetPckCertResponse { pck_cert: pck_cert }
3566 }
3567}
3568
3569#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3571#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3572#[serde(deny_unknown_fields)]
3573pub struct HashedConfig {
3574 #[serde(rename = "app_config")]
3575 pub app_config: SortedHashMap<String, models::ApplicationConfigContents>,
3576
3577 #[serde(rename = "labels")]
3578 pub labels: SortedHashMap<String, String>,
3579
3580 #[serde(rename = "zone_ca")]
3581 pub zone_ca: SortedVec<String>,
3582
3583 #[serde(rename = "workflow")]
3584 #[serde(skip_serializing_if = "Option::is_none")]
3585 pub workflow: Option<models::ApplicationConfigWorkflow>,
3586}
3587
3588impl HashedConfig {
3589 pub fn new(
3590 app_config: SortedHashMap<String, models::ApplicationConfigContents>,
3591 labels: SortedHashMap<String, String>,
3592 zone_ca: SortedVec<String>,
3593 ) -> HashedConfig {
3594 HashedConfig {
3595 app_config: app_config,
3596 labels: labels,
3597 zone_ca: zone_ca,
3598 workflow: None,
3599 }
3600 }
3601}
3602
3603#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3604#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3605pub struct ImageRegistryResponse {
3606 #[serde(rename = "registry")]
3607 #[serde(skip_serializing_if = "Option::is_none")]
3608 pub registry: Option<models::Registry>,
3609}
3610
3611impl ImageRegistryResponse {
3612 pub fn new() -> ImageRegistryResponse {
3613 ImageRegistryResponse { registry: None }
3614 }
3615}
3616
3617#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3618#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3619pub struct InviteUserRequest {
3620 #[serde(rename = "user_email")]
3622 pub user_email: String,
3623
3624 #[serde(rename = "roles")]
3625 pub roles: Vec<models::AccessRoles>,
3626
3627 #[serde(rename = "first_name")]
3628 #[serde(skip_serializing_if = "Option::is_none")]
3629 pub first_name: Option<String>,
3630
3631 #[serde(rename = "last_name")]
3632 #[serde(skip_serializing_if = "Option::is_none")]
3633 pub last_name: Option<String>,
3634}
3635
3636impl InviteUserRequest {
3637 pub fn new(user_email: String, roles: Vec<models::AccessRoles>) -> InviteUserRequest {
3638 InviteUserRequest {
3639 user_email: user_email,
3640 roles: roles,
3641 first_name: None,
3642 last_name: None,
3643 }
3644 }
3645}
3646
3647#[allow(non_camel_case_types)]
3652#[repr(C)]
3653#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
3654#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
3655pub enum JavaRuntime {
3656 #[serde(rename = "JAVA-ORACLE")]
3657 JAVA_ORACLE,
3658 #[serde(rename = "OPENJDK")]
3659 OPENJDK,
3660 #[serde(rename = "OPENJ9")]
3661 OPENJ9,
3662 #[serde(rename = "LIBERTY-JRE")]
3663 LIBERTY_JRE,
3664}
3665
3666impl ::std::fmt::Display for JavaRuntime {
3667 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3668 match *self {
3669 JavaRuntime::JAVA_ORACLE => write!(f, "{}", "JAVA-ORACLE"),
3670 JavaRuntime::OPENJDK => write!(f, "{}", "OPENJDK"),
3671 JavaRuntime::OPENJ9 => write!(f, "{}", "OPENJ9"),
3672 JavaRuntime::LIBERTY_JRE => write!(f, "{}", "LIBERTY-JRE"),
3673 }
3674 }
3675}
3676
3677impl ::std::str::FromStr for JavaRuntime {
3678 type Err = ();
3679 fn from_str(s: &str) -> Result<Self, Self::Err> {
3680 match s {
3681 "JAVA-ORACLE" => Ok(JavaRuntime::JAVA_ORACLE),
3682 "OPENJDK" => Ok(JavaRuntime::OPENJDK),
3683 "OPENJ9" => Ok(JavaRuntime::OPENJ9),
3684 "LIBERTY-JRE" => Ok(JavaRuntime::LIBERTY_JRE),
3685 _ => Err(()),
3686 }
3687 }
3688}
3689
3690#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3691#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3692pub struct LabelCount {
3693 #[serde(rename = "key")]
3694 pub key: String,
3695
3696 #[serde(rename = "value")]
3697 pub value: String,
3698
3699 #[serde(rename = "count")]
3700 pub count: i32,
3701}
3702
3703impl LabelCount {
3704 pub fn new(key: String, value: String, count: i32) -> LabelCount {
3705 LabelCount {
3706 key: key,
3707 value: value,
3708 count: count,
3709 }
3710 }
3711}
3712
3713#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3714#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3715pub struct LabelsCount {
3716 #[serde(rename = "items")]
3717 pub items: Vec<models::LabelCount>,
3718}
3719
3720impl LabelsCount {
3721 pub fn new(items: Vec<models::LabelCount>) -> LabelsCount {
3722 LabelsCount { items: items }
3723 }
3724}
3725
3726#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3727#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3728pub struct NewCertificateRequest {
3729 #[serde(rename = "csr")]
3731 #[serde(skip_serializing_if = "Option::is_none")]
3732 pub csr: Option<String>,
3733
3734 #[serde(rename = "node_id")]
3736 #[serde(skip_serializing_if = "Option::is_none")]
3737 pub node_id: Option<uuid::Uuid>,
3738}
3739
3740impl NewCertificateRequest {
3741 pub fn new() -> NewCertificateRequest {
3742 NewCertificateRequest {
3743 csr: None,
3744 node_id: None,
3745 }
3746 }
3747}
3748
3749#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3750#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3751pub struct Node {
3752 #[serde(rename = "name")]
3754 pub name: String,
3755
3756 #[serde(rename = "description")]
3758 #[serde(skip_serializing_if = "Option::is_none")]
3759 pub description: Option<String>,
3760
3761 #[serde(rename = "acct_id")]
3763 pub acct_id: uuid::Uuid,
3764
3765 #[serde(rename = "ipaddress")]
3767 #[serde(skip_serializing_if = "Option::is_none")]
3768 pub ipaddress: Option<String>,
3769
3770 #[serde(rename = "node_id")]
3772 pub node_id: uuid::Uuid,
3773
3774 #[serde(rename = "host_id")]
3776 #[serde(skip_serializing_if = "Option::is_none")]
3777 pub host_id: Option<String>,
3778
3779 #[serde(rename = "zone_id")]
3781 #[serde(skip_serializing_if = "Option::is_none")]
3782 pub zone_id: Option<uuid::Uuid>,
3783
3784 #[serde(rename = "status")]
3785 pub status: models::NodeStatus,
3786
3787 #[serde(rename = "attested_at")]
3789 #[serde(skip_serializing_if = "Option::is_none")]
3790 pub attested_at: Option<i64>,
3791
3792 #[serde(rename = "certificate")]
3794 #[serde(skip_serializing_if = "Option::is_none")]
3795 pub certificate: Option<String>,
3796
3797 #[serde(rename = "apps")]
3799 pub apps: Vec<models::AppNodeInfo>,
3800
3801 #[serde(rename = "sgx_info")]
3802 pub sgx_info: models::SgxInfo,
3803
3804 #[serde(rename = "labels")]
3805 #[serde(skip_serializing_if = "Option::is_none")]
3806 pub labels: Option<HashMap<String, String>>,
3807
3808 #[serde(rename = "platform")]
3810 #[serde(skip_serializing_if = "Option::is_none")]
3811 pub platform: Option<String>,
3812
3813 #[serde(rename = "attestation_type")]
3815 #[serde(skip_serializing_if = "Option::is_none")]
3816 pub attestation_type: Option<String>,
3817
3818 #[serde(rename = "error_report")]
3819 #[serde(skip_serializing_if = "Option::is_none")]
3820 pub error_report: Option<models::NodeErrorReport>,
3821}
3822
3823impl Node {
3824 pub fn new(
3825 name: String,
3826 acct_id: uuid::Uuid,
3827 node_id: uuid::Uuid,
3828 status: models::NodeStatus,
3829 apps: Vec<models::AppNodeInfo>,
3830 sgx_info: models::SgxInfo,
3831 ) -> Node {
3832 Node {
3833 name: name,
3834 description: None,
3835 acct_id: acct_id,
3836 ipaddress: None,
3837 node_id: node_id,
3838 host_id: None,
3839 zone_id: None,
3840 status: status,
3841 attested_at: None,
3842 certificate: None,
3843 apps: apps,
3844 sgx_info: sgx_info,
3845 labels: None,
3846 platform: None,
3847 attestation_type: None,
3848 error_report: None,
3849 }
3850 }
3851}
3852
3853#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3854#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3855pub struct NodeErrorReport {
3856 #[serde(rename = "message")]
3858 pub message: String,
3859
3860 #[serde(rename = "name")]
3861 pub name: models::NodeProvisionErrorType,
3862}
3863
3864impl NodeErrorReport {
3865 pub fn new(message: String, name: models::NodeProvisionErrorType) -> NodeErrorReport {
3866 NodeErrorReport {
3867 message: message,
3868 name: name,
3869 }
3870 }
3871}
3872
3873#[allow(non_camel_case_types)]
3878#[repr(C)]
3879#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
3880#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
3881pub enum NodeProvisionErrorType {
3882 #[serde(rename = "AESMD_FAILURE")]
3883 AESMD_FAILURE,
3884 #[serde(rename = "QUOTE_GENERATION_ERROR")]
3885 QUOTE_GENERATION_ERROR,
3886 #[serde(rename = "QUOTE_VERIFICATION_ERROR")]
3887 QUOTE_VERIFICATION_ERROR,
3888 #[serde(rename = "GROUP_OUT_OF_DATE")]
3889 GROUP_OUT_OF_DATE,
3890 #[serde(rename = "SIGRL_VERSION_MISMATCH")]
3891 SIGRL_VERSION_MISMATCH,
3892 #[serde(rename = "CONFIGURATION_NEEDED")]
3893 CONFIGURATION_NEEDED,
3894 #[serde(rename = "QUOTE_REVOKED")]
3895 QUOTE_REVOKED,
3896 #[serde(rename = "SIGNATURE_INVALID")]
3897 SIGNATURE_INVALID,
3898 #[serde(rename = "DCAP_ERROR")]
3899 DCAP_ERROR,
3900 #[serde(rename = "CPUSVN_OUT_OF_DATE")]
3901 CPUSVN_OUT_OF_DATE,
3902 #[serde(rename = "PSW_OUT_OF_DATE")]
3903 PSW_OUT_OF_DATE,
3904 #[serde(rename = "BAD_PSW")]
3905 BAD_PSW,
3906 #[serde(rename = "BAD DATA")]
3907 BAD_DATA,
3908}
3909
3910impl ::std::fmt::Display for NodeProvisionErrorType {
3911 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3912 match *self {
3913 NodeProvisionErrorType::AESMD_FAILURE => write!(f, "{}", "AESMD_FAILURE"),
3914 NodeProvisionErrorType::QUOTE_GENERATION_ERROR => {
3915 write!(f, "{}", "QUOTE_GENERATION_ERROR")
3916 }
3917 NodeProvisionErrorType::QUOTE_VERIFICATION_ERROR => {
3918 write!(f, "{}", "QUOTE_VERIFICATION_ERROR")
3919 }
3920 NodeProvisionErrorType::GROUP_OUT_OF_DATE => write!(f, "{}", "GROUP_OUT_OF_DATE"),
3921 NodeProvisionErrorType::SIGRL_VERSION_MISMATCH => {
3922 write!(f, "{}", "SIGRL_VERSION_MISMATCH")
3923 }
3924 NodeProvisionErrorType::CONFIGURATION_NEEDED => write!(f, "{}", "CONFIGURATION_NEEDED"),
3925 NodeProvisionErrorType::QUOTE_REVOKED => write!(f, "{}", "QUOTE_REVOKED"),
3926 NodeProvisionErrorType::SIGNATURE_INVALID => write!(f, "{}", "SIGNATURE_INVALID"),
3927 NodeProvisionErrorType::DCAP_ERROR => write!(f, "{}", "DCAP_ERROR"),
3928 NodeProvisionErrorType::CPUSVN_OUT_OF_DATE => write!(f, "{}", "CPUSVN_OUT_OF_DATE"),
3929 NodeProvisionErrorType::PSW_OUT_OF_DATE => write!(f, "{}", "PSW_OUT_OF_DATE"),
3930 NodeProvisionErrorType::BAD_PSW => write!(f, "{}", "BAD_PSW"),
3931 NodeProvisionErrorType::BAD_DATA => write!(f, "{}", "BAD DATA"),
3932 }
3933 }
3934}
3935
3936impl ::std::str::FromStr for NodeProvisionErrorType {
3937 type Err = ();
3938 fn from_str(s: &str) -> Result<Self, Self::Err> {
3939 match s {
3940 "AESMD_FAILURE" => Ok(NodeProvisionErrorType::AESMD_FAILURE),
3941 "QUOTE_GENERATION_ERROR" => Ok(NodeProvisionErrorType::QUOTE_GENERATION_ERROR),
3942 "QUOTE_VERIFICATION_ERROR" => Ok(NodeProvisionErrorType::QUOTE_VERIFICATION_ERROR),
3943 "GROUP_OUT_OF_DATE" => Ok(NodeProvisionErrorType::GROUP_OUT_OF_DATE),
3944 "SIGRL_VERSION_MISMATCH" => Ok(NodeProvisionErrorType::SIGRL_VERSION_MISMATCH),
3945 "CONFIGURATION_NEEDED" => Ok(NodeProvisionErrorType::CONFIGURATION_NEEDED),
3946 "QUOTE_REVOKED" => Ok(NodeProvisionErrorType::QUOTE_REVOKED),
3947 "SIGNATURE_INVALID" => Ok(NodeProvisionErrorType::SIGNATURE_INVALID),
3948 "DCAP_ERROR" => Ok(NodeProvisionErrorType::DCAP_ERROR),
3949 "CPUSVN_OUT_OF_DATE" => Ok(NodeProvisionErrorType::CPUSVN_OUT_OF_DATE),
3950 "PSW_OUT_OF_DATE" => Ok(NodeProvisionErrorType::PSW_OUT_OF_DATE),
3951 "BAD_PSW" => Ok(NodeProvisionErrorType::BAD_PSW),
3952 "BAD DATA" => Ok(NodeProvisionErrorType::BAD_DATA),
3953 _ => Err(()),
3954 }
3955 }
3956}
3957
3958#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3959#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
3960pub struct NodeProvisionRequest {
3961 #[serde(rename = "name")]
3963 pub name: String,
3964
3965 #[serde(rename = "description")]
3967 #[serde(skip_serializing_if = "Option::is_none")]
3968 pub description: Option<String>,
3969
3970 #[serde(rename = "ipaddress")]
3972 pub ipaddress: String,
3973
3974 #[serde(rename = "host_id")]
3976 #[serde(skip_serializing_if = "Option::is_none")]
3977 pub host_id: Option<String>,
3978
3979 #[serde(rename = "sgx_version")]
3981 pub sgx_version: String,
3982
3983 #[serde(rename = "attestation_request")]
3984 #[serde(skip_serializing_if = "Option::is_none")]
3985 pub attestation_request: Option<models::AttestationRequest>,
3986
3987 #[serde(rename = "error_report")]
3988 #[serde(skip_serializing_if = "Option::is_none")]
3989 pub error_report: Option<models::NodeErrorReport>,
3990}
3991
3992impl NodeProvisionRequest {
3993 pub fn new(name: String, ipaddress: String, sgx_version: String) -> NodeProvisionRequest {
3994 NodeProvisionRequest {
3995 name: name,
3996 description: None,
3997 ipaddress: ipaddress,
3998 host_id: None,
3999 sgx_version: sgx_version,
4000 attestation_request: None,
4001 error_report: None,
4002 }
4003 }
4004}
4005
4006#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4007#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4008pub struct NodeStatus {
4009 #[serde(rename = "status")]
4010 pub status: models::NodeStatusType,
4011
4012 #[serde(rename = "created_at")]
4014 pub created_at: i64,
4015
4016 #[serde(rename = "status_updated_at")]
4018 pub status_updated_at: i64,
4019
4020 #[serde(rename = "last_seen_at")]
4022 #[serde(skip_serializing_if = "Option::is_none")]
4023 pub last_seen_at: Option<i64>,
4024
4025 #[serde(rename = "last_seen_version")]
4027 #[serde(skip_serializing_if = "Option::is_none")]
4028 pub last_seen_version: Option<String>,
4029}
4030
4031impl NodeStatus {
4032 pub fn new(
4033 status: models::NodeStatusType,
4034 created_at: i64,
4035 status_updated_at: i64,
4036 ) -> NodeStatus {
4037 NodeStatus {
4038 status: status,
4039 created_at: created_at,
4040 status_updated_at: status_updated_at,
4041 last_seen_at: None,
4042 last_seen_version: None,
4043 }
4044 }
4045}
4046
4047#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4048#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4049pub struct NodeStatusRequest {
4050 #[serde(rename = "name")]
4052 pub name: String,
4053
4054 #[serde(rename = "description")]
4056 #[serde(skip_serializing_if = "Option::is_none")]
4057 pub description: Option<String>,
4058
4059 #[serde(rename = "ipaddress")]
4061 pub ipaddress: String,
4062
4063 #[serde(rename = "status")]
4064 #[serde(skip_serializing_if = "Option::is_none")]
4065 pub status: Option<models::NodeStatus>,
4066
4067 #[serde(rename = "sgx_version")]
4069 pub sgx_version: String,
4070}
4071
4072impl NodeStatusRequest {
4073 pub fn new(name: String, ipaddress: String, sgx_version: String) -> NodeStatusRequest {
4074 NodeStatusRequest {
4075 name: name,
4076 description: None,
4077 ipaddress: ipaddress,
4078 status: None,
4079 sgx_version: sgx_version,
4080 }
4081 }
4082}
4083
4084#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4085#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4086pub struct NodeStatusResponse {
4087 #[serde(rename = "node_refresh_interval")]
4089 pub node_refresh_interval: i64,
4090
4091 #[serde(rename = "node_renewal_threshold")]
4093 pub node_renewal_threshold: i32,
4094}
4095
4096impl NodeStatusResponse {
4097 pub fn new(node_refresh_interval: i64, node_renewal_threshold: i32) -> NodeStatusResponse {
4098 NodeStatusResponse {
4099 node_refresh_interval: node_refresh_interval,
4100 node_renewal_threshold: node_renewal_threshold,
4101 }
4102 }
4103}
4104
4105#[allow(non_camel_case_types)]
4110#[repr(C)]
4111#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
4112#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
4113pub enum NodeStatusType {
4114 #[serde(rename = "RUNNING")]
4115 RUNNING,
4116 #[serde(rename = "STOPPED")]
4117 STOPPED,
4118 #[serde(rename = "FAILED")]
4119 FAILED,
4120 #[serde(rename = "DEACTIVATED")]
4121 DEACTIVATED,
4122 #[serde(rename = "INPROGRESS")]
4123 INPROGRESS,
4124}
4125
4126impl ::std::fmt::Display for NodeStatusType {
4127 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4128 match *self {
4129 NodeStatusType::RUNNING => write!(f, "{}", "RUNNING"),
4130 NodeStatusType::STOPPED => write!(f, "{}", "STOPPED"),
4131 NodeStatusType::FAILED => write!(f, "{}", "FAILED"),
4132 NodeStatusType::DEACTIVATED => write!(f, "{}", "DEACTIVATED"),
4133 NodeStatusType::INPROGRESS => write!(f, "{}", "INPROGRESS"),
4134 }
4135 }
4136}
4137
4138impl ::std::str::FromStr for NodeStatusType {
4139 type Err = ();
4140 fn from_str(s: &str) -> Result<Self, Self::Err> {
4141 match s {
4142 "RUNNING" => Ok(NodeStatusType::RUNNING),
4143 "STOPPED" => Ok(NodeStatusType::STOPPED),
4144 "FAILED" => Ok(NodeStatusType::FAILED),
4145 "DEACTIVATED" => Ok(NodeStatusType::DEACTIVATED),
4146 "INPROGRESS" => Ok(NodeStatusType::INPROGRESS),
4147 _ => Err(()),
4148 }
4149 }
4150}
4151
4152#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4153#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4154pub struct NodeUpdateRequest {
4155 #[serde(rename = "patch")]
4156 pub patch: Vec<models::PatchDocument>,
4157}
4158
4159impl NodeUpdateRequest {
4160 pub fn new(patch: Vec<models::PatchDocument>) -> NodeUpdateRequest {
4161 NodeUpdateRequest { patch: patch }
4162 }
4163}
4164
4165#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4166#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4167pub struct OauthAuthCodeGrant {
4168 #[serde(rename = "name")]
4169 pub name: String,
4170
4171 #[serde(rename = "icon_url")]
4172 pub icon_url: String,
4173
4174 #[serde(rename = "authorization_url")]
4175 pub authorization_url: String,
4176
4177 #[serde(rename = "client_id")]
4178 pub client_id: String,
4179
4180 #[serde(rename = "redirect_uri")]
4181 pub redirect_uri: String,
4182
4183 #[serde(rename = "state")]
4184 pub state: String,
4185
4186 #[serde(rename = "idp_id")]
4187 pub idp_id: crate::ByteArray,
4188}
4189
4190impl OauthAuthCodeGrant {
4191 pub fn new(
4192 name: String,
4193 icon_url: String,
4194 authorization_url: String,
4195 client_id: String,
4196 redirect_uri: String,
4197 state: String,
4198 idp_id: crate::ByteArray,
4199 ) -> OauthAuthCodeGrant {
4200 OauthAuthCodeGrant {
4201 name: name,
4202 icon_url: icon_url,
4203 authorization_url: authorization_url,
4204 client_id: client_id,
4205 redirect_uri: redirect_uri,
4206 state: state,
4207 idp_id: idp_id,
4208 }
4209 }
4210}
4211
4212#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4213#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4214pub struct OauthCodeData {
4215 #[serde(rename = "idp_id")]
4216 pub idp_id: crate::ByteArray,
4217
4218 #[serde(rename = "code")]
4219 pub code: String,
4220
4221 #[serde(rename = "email")]
4222 pub email: String,
4223}
4224
4225impl OauthCodeData {
4226 pub fn new(idp_id: crate::ByteArray, code: String, email: String) -> OauthCodeData {
4227 OauthCodeData {
4228 idp_id: idp_id,
4229 code: code,
4230 email: email,
4231 }
4232 }
4233}
4234
4235#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4236#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4237pub struct PasswordChangeRequest {
4238 #[serde(rename = "current_password")]
4239 pub current_password: String,
4240
4241 #[serde(rename = "new_password")]
4242 pub new_password: String,
4243}
4244
4245impl PasswordChangeRequest {
4246 pub fn new(current_password: String, new_password: String) -> PasswordChangeRequest {
4247 PasswordChangeRequest {
4248 current_password: current_password,
4249 new_password: new_password,
4250 }
4251 }
4252}
4253
4254#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4255#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4256pub struct PasswordResetRequest {
4257 #[serde(rename = "reset_token")]
4258 pub reset_token: String,
4259
4260 #[serde(rename = "new_password")]
4261 pub new_password: String,
4262}
4263
4264impl PasswordResetRequest {
4265 pub fn new(reset_token: String, new_password: String) -> PasswordResetRequest {
4266 PasswordResetRequest {
4267 reset_token: reset_token,
4268 new_password: new_password,
4269 }
4270 }
4271}
4272
4273#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4275#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4276pub struct PatchDocument {
4277 #[serde(rename = "op")]
4278 pub op: models::PatchOperation,
4279
4280 #[serde(rename = "path")]
4282 pub path: String,
4283
4284 #[serde(rename = "value")]
4286 #[serde(skip_serializing_if = "Option::is_none")]
4287 pub value: Option<serde_json::Value>,
4288}
4289
4290impl PatchDocument {
4291 pub fn new(op: models::PatchOperation, path: String) -> PatchDocument {
4292 PatchDocument {
4293 op: op,
4294 path: path,
4295 value: None,
4296 }
4297 }
4298}
4299
4300#[allow(non_camel_case_types)]
4305#[repr(C)]
4306#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
4307#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
4308pub enum PatchOperation {
4309 #[serde(rename = "add")]
4310 ADD,
4311 #[serde(rename = "remove")]
4312 REMOVE,
4313 #[serde(rename = "replace")]
4314 REPLACE,
4315}
4316
4317impl ::std::fmt::Display for PatchOperation {
4318 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4319 match *self {
4320 PatchOperation::ADD => write!(f, "{}", "add"),
4321 PatchOperation::REMOVE => write!(f, "{}", "remove"),
4322 PatchOperation::REPLACE => write!(f, "{}", "replace"),
4323 }
4324 }
4325}
4326
4327impl ::std::str::FromStr for PatchOperation {
4328 type Err = ();
4329 fn from_str(s: &str) -> Result<Self, Self::Err> {
4330 match s {
4331 "add" => Ok(PatchOperation::ADD),
4332 "remove" => Ok(PatchOperation::REMOVE),
4333 "replace" => Ok(PatchOperation::REPLACE),
4334 _ => Err(()),
4335 }
4336 }
4337}
4338
4339#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4340#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4341pub struct ProcessInviteRequest {
4342 #[serde(rename = "accepts")]
4343 #[serde(skip_serializing_if = "Option::is_none")]
4344 pub accepts: Option<Vec<uuid::Uuid>>,
4345
4346 #[serde(rename = "rejects")]
4347 #[serde(skip_serializing_if = "Option::is_none")]
4348 pub rejects: Option<Vec<uuid::Uuid>>,
4349}
4350
4351impl ProcessInviteRequest {
4352 pub fn new() -> ProcessInviteRequest {
4353 ProcessInviteRequest {
4354 accepts: None,
4355 rejects: None,
4356 }
4357 }
4358}
4359
4360#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4361#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4362pub struct RefreshResponse {
4363 #[serde(rename = "session_info")]
4364 pub session_info: models::SessionInfo,
4365}
4366
4367impl RefreshResponse {
4368 pub fn new(session_info: models::SessionInfo) -> RefreshResponse {
4369 RefreshResponse {
4370 session_info: session_info,
4371 }
4372 }
4373}
4374
4375#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4376#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4377pub struct Registry {
4378 #[serde(rename = "url")]
4380 pub url: String,
4381
4382 #[serde(rename = "registry_id")]
4384 pub registry_id: uuid::Uuid,
4385
4386 #[serde(rename = "description")]
4388 #[serde(skip_serializing_if = "Option::is_none")]
4389 pub description: Option<String>,
4390
4391 #[serde(rename = "username")]
4393 #[serde(skip_serializing_if = "Option::is_none")]
4394 pub username: Option<String>,
4395}
4396
4397impl Registry {
4398 pub fn new(url: String, registry_id: uuid::Uuid) -> Registry {
4399 Registry {
4400 url: url,
4401 registry_id: registry_id,
4402 description: None,
4403 username: None,
4404 }
4405 }
4406}
4407
4408#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4409#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4410pub struct RegistryRequest {
4411 #[serde(rename = "url")]
4413 pub url: String,
4414
4415 #[serde(rename = "credential")]
4416 pub credential: models::CredentialType,
4417
4418 #[serde(rename = "description")]
4420 #[serde(skip_serializing_if = "Option::is_none")]
4421 pub description: Option<String>,
4422}
4423
4424impl RegistryRequest {
4425 pub fn new(url: String, credential: models::CredentialType) -> RegistryRequest {
4426 RegistryRequest {
4427 url: url,
4428 credential: credential,
4429 description: None,
4430 }
4431 }
4432}
4433
4434#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4435#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4436pub struct RequesterInfo {
4437 #[serde(rename = "user_id")]
4439 #[serde(skip_serializing_if = "Option::is_none")]
4440 pub user_id: Option<uuid::Uuid>,
4441
4442 #[serde(rename = "user_name")]
4444 #[serde(skip_serializing_if = "Option::is_none")]
4445 pub user_name: Option<String>,
4446
4447 #[serde(rename = "app_id")]
4449 #[serde(skip_serializing_if = "Option::is_none")]
4450 pub app_id: Option<uuid::Uuid>,
4451
4452 #[serde(rename = "app_name")]
4454 #[serde(skip_serializing_if = "Option::is_none")]
4455 pub app_name: Option<String>,
4456
4457 #[serde(rename = "requester_type")]
4458 pub requester_type: models::RequesterType,
4459}
4460
4461impl RequesterInfo {
4462 pub fn new(requester_type: models::RequesterType) -> RequesterInfo {
4463 RequesterInfo {
4464 user_id: None,
4465 user_name: None,
4466 app_id: None,
4467 app_name: None,
4468 requester_type: requester_type,
4469 }
4470 }
4471}
4472
4473#[allow(non_camel_case_types)]
4478#[repr(C)]
4479#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
4480#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
4481pub enum RequesterType {
4482 #[serde(rename = "USER")]
4483 USER,
4484 #[serde(rename = "APP")]
4485 APP,
4486 #[serde(rename = "SYSTEM")]
4487 SYSTEM,
4488}
4489
4490impl ::std::fmt::Display for RequesterType {
4491 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4492 match *self {
4493 RequesterType::USER => write!(f, "{}", "USER"),
4494 RequesterType::APP => write!(f, "{}", "APP"),
4495 RequesterType::SYSTEM => write!(f, "{}", "SYSTEM"),
4496 }
4497 }
4498}
4499
4500impl ::std::str::FromStr for RequesterType {
4501 type Err = ();
4502 fn from_str(s: &str) -> Result<Self, Self::Err> {
4503 match s {
4504 "USER" => Ok(RequesterType::USER),
4505 "APP" => Ok(RequesterType::APP),
4506 "SYSTEM" => Ok(RequesterType::SYSTEM),
4507 _ => Err(()),
4508 }
4509 }
4510}
4511
4512#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4514#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4515pub struct RuntimeAppConfig {
4516 #[serde(rename = "config")]
4517 pub config: models::HashedConfig,
4518
4519 #[serde(rename = "extra")]
4520 pub extra: models::ApplicationConfigExtra,
4521}
4522
4523impl RuntimeAppConfig {
4524 pub fn new(
4525 config: models::HashedConfig,
4526 extra: models::ApplicationConfigExtra,
4527 ) -> RuntimeAppConfig {
4528 RuntimeAppConfig {
4529 config: config,
4530 extra: extra,
4531 }
4532 }
4533}
4534
4535#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4537#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4538pub struct SdkmsCredentials {
4539 #[serde(rename = "credentials_url")]
4540 pub credentials_url: String,
4541
4542 #[serde(rename = "credentials_key_name")]
4543 pub credentials_key_name: String,
4544}
4545
4546impl SdkmsCredentials {
4547 pub fn new(credentials_url: String, credentials_key_name: String) -> SdkmsCredentials {
4548 SdkmsCredentials {
4549 credentials_url: credentials_url,
4550 credentials_key_name: credentials_key_name,
4551 }
4552 }
4553}
4554
4555#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4557#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4558pub struct SdkmsSigningKeyConfig {
4559 #[serde(rename = "name")]
4561 #[serde(skip_serializing_if = "Option::is_none")]
4562 pub name: Option<String>,
4563
4564 #[serde(rename = "apiKey")]
4566 #[serde(skip_serializing_if = "Option::is_none")]
4567 pub api_key: Option<String>,
4568}
4569
4570impl SdkmsSigningKeyConfig {
4571 pub fn new() -> SdkmsSigningKeyConfig {
4572 SdkmsSigningKeyConfig {
4573 name: None,
4574 api_key: None,
4575 }
4576 }
4577}
4578
4579#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4580#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4581pub struct SearchMetadata {
4582 #[serde(rename = "page")]
4584 pub page: isize,
4585
4586 #[serde(rename = "pages")]
4588 pub pages: isize,
4589
4590 #[serde(rename = "limit")]
4592 pub limit: isize,
4593
4594 #[serde(rename = "total_count")]
4596 pub total_count: isize,
4597
4598 #[serde(rename = "filtered_count")]
4600 pub filtered_count: isize,
4601}
4602
4603impl SearchMetadata {
4604 pub fn new(
4605 page: isize,
4606 pages: isize,
4607 limit: isize,
4608 total_count: isize,
4609 filtered_count: isize,
4610 ) -> SearchMetadata {
4611 SearchMetadata {
4612 page: page,
4613 pages: pages,
4614 limit: limit,
4615 total_count: total_count,
4616 filtered_count: filtered_count,
4617 }
4618 }
4619}
4620
4621#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4622#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4623pub struct SelectAccountResponse {
4624 #[serde(rename = "session_info")]
4625 pub session_info: models::SessionInfo,
4626}
4627
4628impl SelectAccountResponse {
4629 pub fn new(session_info: models::SessionInfo) -> SelectAccountResponse {
4630 SelectAccountResponse {
4631 session_info: session_info,
4632 }
4633 }
4634}
4635
4636#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4637#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4638pub struct SessionInfo {
4639 #[serde(rename = "subject_id")]
4640 pub subject_id: uuid::Uuid,
4641
4642 #[serde(rename = "session_expires_at")]
4644 pub session_expires_at: i64,
4645
4646 #[serde(rename = "session_token_expires_at")]
4648 pub session_token_expires_at: i64,
4649}
4650
4651impl SessionInfo {
4652 pub fn new(
4653 subject_id: uuid::Uuid,
4654 session_expires_at: i64,
4655 session_token_expires_at: i64,
4656 ) -> SessionInfo {
4657 SessionInfo {
4658 subject_id: subject_id,
4659 session_expires_at: session_expires_at,
4660 session_token_expires_at: session_token_expires_at,
4661 }
4662 }
4663}
4664
4665#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4667#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4668pub struct SgxInfo {
4669 #[serde(rename = "version")]
4671 #[serde(skip_serializing_if = "Option::is_none")]
4672 pub version: Option<String>,
4673}
4674
4675impl SgxInfo {
4676 pub fn new() -> SgxInfo {
4677 SgxInfo { version: None }
4678 }
4679}
4680
4681#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4683#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4684pub struct SigningKeyConfig {
4685 #[serde(rename = "default")]
4687 #[serde(skip_serializing_if = "Option::is_none")]
4688 pub default: Option<serde_json::Value>,
4689
4690 #[serde(rename = "sdkms")]
4691 #[serde(skip_serializing_if = "Option::is_none")]
4692 pub sdkms: Option<models::SdkmsSigningKeyConfig>,
4693}
4694
4695impl SigningKeyConfig {
4696 pub fn new() -> SigningKeyConfig {
4697 SigningKeyConfig {
4698 default: None,
4699 sdkms: None,
4700 }
4701 }
4702}
4703
4704#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4705#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4706pub struct SignupRequest {
4707 #[serde(rename = "user_email")]
4709 pub user_email: String,
4710
4711 #[serde(rename = "user_password")]
4713 pub user_password: String,
4714
4715 #[serde(rename = "first_name")]
4716 #[serde(skip_serializing_if = "Option::is_none")]
4717 pub first_name: Option<String>,
4718
4719 #[serde(rename = "last_name")]
4720 #[serde(skip_serializing_if = "Option::is_none")]
4721 pub last_name: Option<String>,
4722
4723 #[serde(rename = "recaptcha_response")]
4724 #[serde(skip_serializing_if = "Option::is_none")]
4725 pub recaptcha_response: Option<String>,
4726}
4727
4728impl SignupRequest {
4729 pub fn new(user_email: String, user_password: String) -> SignupRequest {
4730 SignupRequest {
4731 user_email: user_email,
4732 user_password: user_password,
4733 first_name: None,
4734 last_name: None,
4735 recaptcha_response: None,
4736 }
4737 }
4738}
4739
4740#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4741#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4742pub struct Task {
4743 #[serde(rename = "task_id")]
4745 pub task_id: uuid::Uuid,
4746
4747 #[serde(rename = "requester_info")]
4748 pub requester_info: models::RequesterInfo,
4749
4750 #[serde(rename = "entity_id")]
4752 pub entity_id: uuid::Uuid,
4753
4754 #[serde(rename = "task_type")]
4755 pub task_type: models::TaskType,
4756
4757 #[serde(rename = "status")]
4758 pub status: models::TaskStatus,
4759
4760 #[serde(rename = "description")]
4762 #[serde(skip_serializing_if = "Option::is_none")]
4763 pub description: Option<String>,
4764
4765 #[serde(rename = "approvals")]
4766 pub approvals: Vec<models::ApprovalInfo>,
4767
4768 #[serde(rename = "domains_added")]
4769 #[serde(skip_serializing_if = "Option::is_none")]
4770 pub domains_added: Option<Vec<String>>,
4771
4772 #[serde(rename = "domains_removed")]
4773 #[serde(skip_serializing_if = "Option::is_none")]
4774 pub domains_removed: Option<Vec<String>>,
4775}
4776
4777impl Task {
4778 pub fn new(
4779 task_id: uuid::Uuid,
4780 requester_info: models::RequesterInfo,
4781 entity_id: uuid::Uuid,
4782 task_type: models::TaskType,
4783 status: models::TaskStatus,
4784 approvals: Vec<models::ApprovalInfo>,
4785 ) -> Task {
4786 Task {
4787 task_id: task_id,
4788 requester_info: requester_info,
4789 entity_id: entity_id,
4790 task_type: task_type,
4791 status: status,
4792 description: None,
4793 approvals: approvals,
4794 domains_added: None,
4795 domains_removed: None,
4796 }
4797 }
4798}
4799
4800#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4801#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4802pub struct TaskResult {
4803 #[serde(rename = "task_id")]
4805 #[serde(skip_serializing_if = "Option::is_none")]
4806 pub task_id: Option<uuid::Uuid>,
4807
4808 #[serde(rename = "certificate_id")]
4810 #[serde(skip_serializing_if = "Option::is_none")]
4811 pub certificate_id: Option<uuid::Uuid>,
4812
4813 #[serde(rename = "node_id")]
4815 #[serde(skip_serializing_if = "Option::is_none")]
4816 pub node_id: Option<uuid::Uuid>,
4817
4818 #[serde(rename = "task_type")]
4819 #[serde(skip_serializing_if = "Option::is_none")]
4820 pub task_type: Option<models::TaskType>,
4821
4822 #[serde(rename = "task_status")]
4823 #[serde(skip_serializing_if = "Option::is_none")]
4824 pub task_status: Option<models::TaskStatus>,
4825
4826 #[serde(rename = "build_id")]
4828 #[serde(skip_serializing_if = "Option::is_none")]
4829 pub build_id: Option<uuid::Uuid>,
4830}
4831
4832impl TaskResult {
4833 pub fn new() -> TaskResult {
4834 TaskResult {
4835 task_id: None,
4836 certificate_id: None,
4837 node_id: None,
4838 task_type: None,
4839 task_status: None,
4840 build_id: None,
4841 }
4842 }
4843}
4844
4845#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4847#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4848pub struct TaskStatus {
4849 #[serde(rename = "created_at")]
4851 pub created_at: i64,
4852
4853 #[serde(rename = "status_updated_at")]
4855 pub status_updated_at: i64,
4856
4857 #[serde(rename = "status")]
4858 pub status: models::TaskStatusType,
4859}
4860
4861impl TaskStatus {
4862 pub fn new(
4863 created_at: i64,
4864 status_updated_at: i64,
4865 status: models::TaskStatusType,
4866 ) -> TaskStatus {
4867 TaskStatus {
4868 created_at: created_at,
4869 status_updated_at: status_updated_at,
4870 status: status,
4871 }
4872 }
4873}
4874
4875#[allow(non_camel_case_types)]
4880#[repr(C)]
4881#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
4882#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
4883pub enum TaskStatusType {
4884 #[serde(rename = "INPROGRESS")]
4885 INPROGRESS,
4886 #[serde(rename = "FAILED")]
4887 FAILED,
4888 #[serde(rename = "SUCCESS")]
4889 SUCCESS,
4890 #[serde(rename = "DENIED")]
4891 DENIED,
4892}
4893
4894impl ::std::fmt::Display for TaskStatusType {
4895 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4896 match *self {
4897 TaskStatusType::INPROGRESS => write!(f, "{}", "INPROGRESS"),
4898 TaskStatusType::FAILED => write!(f, "{}", "FAILED"),
4899 TaskStatusType::SUCCESS => write!(f, "{}", "SUCCESS"),
4900 TaskStatusType::DENIED => write!(f, "{}", "DENIED"),
4901 }
4902 }
4903}
4904
4905impl ::std::str::FromStr for TaskStatusType {
4906 type Err = ();
4907 fn from_str(s: &str) -> Result<Self, Self::Err> {
4908 match s {
4909 "INPROGRESS" => Ok(TaskStatusType::INPROGRESS),
4910 "FAILED" => Ok(TaskStatusType::FAILED),
4911 "SUCCESS" => Ok(TaskStatusType::SUCCESS),
4912 "DENIED" => Ok(TaskStatusType::DENIED),
4913 _ => Err(()),
4914 }
4915 }
4916}
4917
4918#[allow(non_camel_case_types)]
4923#[repr(C)]
4924#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
4925#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
4926pub enum TaskType {
4927 #[serde(rename = "NODE_ATTESTATION")]
4928 NODE_ATTESTATION,
4929 #[serde(rename = "CERTIFICATE_ISSUANCE")]
4930 CERTIFICATE_ISSUANCE,
4931 #[serde(rename = "BUILD_WHITELIST")]
4932 BUILD_WHITELIST,
4933 #[serde(rename = "DOMAIN_WHITELIST")]
4934 DOMAIN_WHITELIST,
4935}
4936
4937impl ::std::fmt::Display for TaskType {
4938 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4939 match *self {
4940 TaskType::NODE_ATTESTATION => write!(f, "{}", "NODE_ATTESTATION"),
4941 TaskType::CERTIFICATE_ISSUANCE => write!(f, "{}", "CERTIFICATE_ISSUANCE"),
4942 TaskType::BUILD_WHITELIST => write!(f, "{}", "BUILD_WHITELIST"),
4943 TaskType::DOMAIN_WHITELIST => write!(f, "{}", "DOMAIN_WHITELIST"),
4944 }
4945 }
4946}
4947
4948impl ::std::str::FromStr for TaskType {
4949 type Err = ();
4950 fn from_str(s: &str) -> Result<Self, Self::Err> {
4951 match s {
4952 "NODE_ATTESTATION" => Ok(TaskType::NODE_ATTESTATION),
4953 "CERTIFICATE_ISSUANCE" => Ok(TaskType::CERTIFICATE_ISSUANCE),
4954 "BUILD_WHITELIST" => Ok(TaskType::BUILD_WHITELIST),
4955 "DOMAIN_WHITELIST" => Ok(TaskType::DOMAIN_WHITELIST),
4956 _ => Err(()),
4957 }
4958 }
4959}
4960
4961#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4962#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4963pub struct TaskUpdateRequest {
4964 #[serde(rename = "status")]
4965 pub status: models::ApprovalStatus,
4966}
4967
4968impl TaskUpdateRequest {
4969 pub fn new(status: models::ApprovalStatus) -> TaskUpdateRequest {
4970 TaskUpdateRequest { status: status }
4971 }
4972}
4973
4974#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4975#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
4976pub struct TlsConfig {
4977 #[serde(rename = "disabled")]
4978 #[serde(skip_serializing_if = "Option::is_none")]
4979 pub disabled: Option<serde_json::Value>,
4980
4981 #[serde(rename = "opportunistic")]
4982 #[serde(skip_serializing_if = "Option::is_none")]
4983 pub opportunistic: Option<serde_json::Value>,
4984
4985 #[serde(rename = "required")]
4986 #[serde(skip_serializing_if = "Option::is_none")]
4987 pub required: Option<models::TlsConfigRequired>,
4988}
4989
4990impl TlsConfig {
4991 pub fn new() -> TlsConfig {
4992 TlsConfig {
4993 disabled: None,
4994 opportunistic: None,
4995 required: None,
4996 }
4997 }
4998}
4999
5000#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5001#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5002pub struct TlsConfigRequired {
5003 #[serde(rename = "validate_hostname")]
5004 pub validate_hostname: bool,
5005
5006 #[serde(rename = "client_key")]
5007 #[serde(skip_serializing_if = "Option::is_none")]
5008 pub client_key: Option<crate::ByteArray>,
5009
5010 #[serde(rename = "client_cert")]
5011 #[serde(skip_serializing_if = "Option::is_none")]
5012 pub client_cert: Option<crate::ByteArray>,
5013
5014 #[serde(rename = "ca")]
5015 pub ca: models::CaConfig,
5016}
5017
5018impl TlsConfigRequired {
5019 pub fn new(validate_hostname: bool, ca: models::CaConfig) -> TlsConfigRequired {
5020 TlsConfigRequired {
5021 validate_hostname: validate_hostname,
5022 client_key: None,
5023 client_cert: None,
5024 ca: ca,
5025 }
5026 }
5027}
5028
5029#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5031#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5032pub struct UpdateApplicationConfigRequest {
5033 #[serde(rename = "name")]
5034 #[serde(skip_serializing_if = "Option::is_none")]
5035 pub name: Option<String>,
5036
5037 #[serde(rename = "description")]
5038 #[serde(skip_serializing_if = "Option::is_none")]
5039 pub description: Option<String>,
5040
5041 #[serde(rename = "ports")]
5042 #[serde(skip_serializing_if = "Option::is_none")]
5043 pub ports: Option<SortedVec<String>>,
5044}
5045
5046impl UpdateApplicationConfigRequest {
5047 pub fn new() -> UpdateApplicationConfigRequest {
5048 UpdateApplicationConfigRequest {
5049 name: None,
5050 description: None,
5051 ports: None,
5052 }
5053 }
5054}
5055
5056#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5057#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5058pub struct UpdateRegistryRequest(Vec<PatchDocument>);
5059
5060impl ::std::convert::From<Vec<PatchDocument>> for UpdateRegistryRequest {
5061 fn from(x: Vec<PatchDocument>) -> Self {
5062 UpdateRegistryRequest(x)
5063 }
5064}
5065
5066impl ::std::convert::From<UpdateRegistryRequest> for Vec<PatchDocument> {
5067 fn from(x: UpdateRegistryRequest) -> Self {
5068 x.0
5069 }
5070}
5071
5072impl ::std::iter::FromIterator<PatchDocument> for UpdateRegistryRequest {
5073 fn from_iter<U: IntoIterator<Item = PatchDocument>>(u: U) -> Self {
5074 UpdateRegistryRequest(Vec::<PatchDocument>::from_iter(u))
5075 }
5076}
5077
5078impl ::std::iter::IntoIterator for UpdateRegistryRequest {
5079 type Item = PatchDocument;
5080 type IntoIter = ::std::vec::IntoIter<PatchDocument>;
5081
5082 fn into_iter(self) -> Self::IntoIter {
5083 self.0.into_iter()
5084 }
5085}
5086
5087impl<'a> ::std::iter::IntoIterator for &'a UpdateRegistryRequest {
5088 type Item = &'a PatchDocument;
5089 type IntoIter = ::std::slice::Iter<'a, PatchDocument>;
5090
5091 fn into_iter(self) -> Self::IntoIter {
5092 (&self.0).into_iter()
5093 }
5094}
5095
5096impl<'a> ::std::iter::IntoIterator for &'a mut UpdateRegistryRequest {
5097 type Item = &'a mut PatchDocument;
5098 type IntoIter = ::std::slice::IterMut<'a, PatchDocument>;
5099
5100 fn into_iter(self) -> Self::IntoIter {
5101 (&mut self.0).into_iter()
5102 }
5103}
5104
5105impl ::std::ops::Deref for UpdateRegistryRequest {
5106 type Target = Vec<PatchDocument>;
5107 fn deref(&self) -> &Self::Target {
5108 &self.0
5109 }
5110}
5111
5112impl ::std::ops::DerefMut for UpdateRegistryRequest {
5113 fn deref_mut(&mut self) -> &mut Self::Target {
5114 &mut self.0
5115 }
5116}
5117
5118#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5119#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5120pub struct UpdateUserRequest {
5121 #[serde(rename = "first_name")]
5123 #[serde(skip_serializing_if = "Option::is_none")]
5124 pub first_name: Option<String>,
5125
5126 #[serde(rename = "last_name")]
5128 #[serde(skip_serializing_if = "Option::is_none")]
5129 pub last_name: Option<String>,
5130
5131 #[serde(rename = "roles")]
5132 #[serde(skip_serializing_if = "Option::is_none")]
5133 pub roles: Option<Vec<models::AccessRoles>>,
5134}
5135
5136impl UpdateUserRequest {
5137 pub fn new() -> UpdateUserRequest {
5138 UpdateUserRequest {
5139 first_name: None,
5140 last_name: None,
5141 roles: None,
5142 }
5143 }
5144}
5145
5146#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5148#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5149pub struct UpdateWorkflowGraph {
5150 #[serde(rename = "name")]
5151 pub name: String,
5152
5153 #[serde(rename = "description")]
5154 pub description: String,
5155
5156 #[serde(rename = "version")]
5157 pub version: isize,
5158
5159 #[serde(rename = "objects")]
5160 pub objects: SortedHashMap<String, models::WorkflowObject>,
5161
5162 #[serde(rename = "edges")]
5163 pub edges: SortedHashMap<String, models::WorkflowEdge>,
5164
5165 #[serde(rename = "metadata")]
5166 #[serde(skip_serializing_if = "Option::is_none")]
5167 pub metadata: Option<models::WorkflowMetadata>,
5168}
5169
5170impl UpdateWorkflowGraph {
5171 pub fn new(
5172 name: String,
5173 description: String,
5174 version: isize,
5175 objects: SortedHashMap<String, models::WorkflowObject>,
5176 edges: SortedHashMap<String, models::WorkflowEdge>,
5177 ) -> UpdateWorkflowGraph {
5178 UpdateWorkflowGraph {
5179 name: name,
5180 description: description,
5181 version: version,
5182 objects: objects,
5183 edges: edges,
5184 metadata: None,
5185 }
5186 }
5187}
5188
5189#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5190#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5191pub struct User {
5192 #[serde(rename = "user_id")]
5194 pub user_id: uuid::Uuid,
5195
5196 #[serde(rename = "first_name")]
5198 #[serde(skip_serializing_if = "Option::is_none")]
5199 pub first_name: Option<String>,
5200
5201 #[serde(rename = "last_name")]
5203 #[serde(skip_serializing_if = "Option::is_none")]
5204 pub last_name: Option<String>,
5205
5206 #[serde(rename = "user_email")]
5208 pub user_email: String,
5209
5210 #[serde(rename = "last_logged_in_at")]
5212 #[serde(skip_serializing_if = "Option::is_none")]
5213 pub last_logged_in_at: Option<i64>,
5214
5215 #[serde(rename = "created_at")]
5217 #[serde(skip_serializing_if = "Option::is_none")]
5218 pub created_at: Option<i64>,
5219
5220 #[serde(rename = "email_verified")]
5222 #[serde(skip_serializing_if = "Option::is_none")]
5223 pub email_verified: Option<bool>,
5224
5225 #[serde(rename = "status")]
5226 #[serde(skip_serializing_if = "Option::is_none")]
5227 pub status: Option<models::UserStatus>,
5228
5229 #[serde(rename = "roles")]
5230 #[serde(skip_serializing_if = "Option::is_none")]
5231 pub roles: Option<Vec<models::AccessRoles>>,
5232
5233 #[serde(rename = "user_account_status")]
5234 #[serde(skip_serializing_if = "Option::is_none")]
5235 pub user_account_status: Option<models::UserAccountStatus>,
5236
5237 #[serde(rename = "accepted_latest_terms_and_conditions")]
5239 #[serde(skip_serializing_if = "Option::is_none")]
5240 pub accepted_latest_terms_and_conditions: Option<bool>,
5241}
5242
5243impl User {
5244 pub fn new(user_id: uuid::Uuid, user_email: String) -> User {
5245 User {
5246 user_id: user_id,
5247 first_name: None,
5248 last_name: None,
5249 user_email: user_email,
5250 last_logged_in_at: None,
5251 created_at: None,
5252 email_verified: None,
5253 status: None,
5254 roles: None,
5255 user_account_status: None,
5256 accepted_latest_terms_and_conditions: None,
5257 }
5258 }
5259}
5260
5261#[allow(non_camel_case_types)]
5266#[repr(C)]
5267#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
5268#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
5269pub enum UserAccountStatus {
5270 #[serde(rename = "ACTIVE")]
5271 ACTIVE,
5272 #[serde(rename = "PENDING")]
5273 PENDING,
5274 #[serde(rename = "DISABLED")]
5275 DISABLED,
5276}
5277
5278impl ::std::fmt::Display for UserAccountStatus {
5279 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
5280 match *self {
5281 UserAccountStatus::ACTIVE => write!(f, "{}", "ACTIVE"),
5282 UserAccountStatus::PENDING => write!(f, "{}", "PENDING"),
5283 UserAccountStatus::DISABLED => write!(f, "{}", "DISABLED"),
5284 }
5285 }
5286}
5287
5288impl ::std::str::FromStr for UserAccountStatus {
5289 type Err = ();
5290 fn from_str(s: &str) -> Result<Self, Self::Err> {
5291 match s {
5292 "ACTIVE" => Ok(UserAccountStatus::ACTIVE),
5293 "PENDING" => Ok(UserAccountStatus::PENDING),
5294 "DISABLED" => Ok(UserAccountStatus::DISABLED),
5295 _ => Err(()),
5296 }
5297 }
5298}
5299
5300#[allow(non_camel_case_types)]
5305#[repr(C)]
5306#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
5307#[cfg_attr(feature = "conversion", derive(LabelledGenericEnum))]
5308pub enum UserStatus {
5309 #[serde(rename = "ACTIVE")]
5310 ACTIVE,
5311 #[serde(rename = "PENDING")]
5312 PENDING,
5313 #[serde(rename = "DISABLED")]
5314 DISABLED,
5315}
5316
5317impl ::std::fmt::Display for UserStatus {
5318 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
5319 match *self {
5320 UserStatus::ACTIVE => write!(f, "{}", "ACTIVE"),
5321 UserStatus::PENDING => write!(f, "{}", "PENDING"),
5322 UserStatus::DISABLED => write!(f, "{}", "DISABLED"),
5323 }
5324 }
5325}
5326
5327impl ::std::str::FromStr for UserStatus {
5328 type Err = ();
5329 fn from_str(s: &str) -> Result<Self, Self::Err> {
5330 match s {
5331 "ACTIVE" => Ok(UserStatus::ACTIVE),
5332 "PENDING" => Ok(UserStatus::PENDING),
5333 "DISABLED" => Ok(UserStatus::DISABLED),
5334 _ => Err(()),
5335 }
5336 }
5337}
5338
5339#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5340#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5341pub struct ValidateTokenRequest {
5342 #[serde(rename = "reset_token")]
5343 pub reset_token: String,
5344}
5345
5346impl ValidateTokenRequest {
5347 pub fn new(reset_token: String) -> ValidateTokenRequest {
5348 ValidateTokenRequest {
5349 reset_token: reset_token,
5350 }
5351 }
5352}
5353
5354#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5355#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5356pub struct ValidateTokenResponse {
5357 #[serde(rename = "user_email")]
5358 pub user_email: String,
5359}
5360
5361impl ValidateTokenResponse {
5362 pub fn new(user_email: String) -> ValidateTokenResponse {
5363 ValidateTokenResponse {
5364 user_email: user_email,
5365 }
5366 }
5367}
5368
5369#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5370#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5371pub struct VersionInFinalWorkflow {
5372 #[serde(rename = "graph_id")]
5373 pub graph_id: uuid::Uuid,
5374
5375 #[serde(rename = "name")]
5376 pub name: String,
5377
5378 #[serde(rename = "description")]
5379 pub description: String,
5380
5381 #[serde(rename = "version")]
5382 pub version: String,
5383
5384 #[serde(rename = "contents")]
5385 pub contents: models::FinalWorkflowGraph,
5386}
5387
5388impl VersionInFinalWorkflow {
5389 pub fn new(
5390 graph_id: uuid::Uuid,
5391 name: String,
5392 description: String,
5393 version: String,
5394 contents: models::FinalWorkflowGraph,
5395 ) -> VersionInFinalWorkflow {
5396 VersionInFinalWorkflow {
5397 graph_id: graph_id,
5398 name: name,
5399 description: description,
5400 version: version,
5401 contents: contents,
5402 }
5403 }
5404}
5405
5406#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5407#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5408pub struct VersionResponse {
5409 #[serde(rename = "version")]
5411 #[serde(skip_serializing_if = "Option::is_none")]
5412 pub version: Option<String>,
5413}
5414
5415impl VersionResponse {
5416 pub fn new() -> VersionResponse {
5417 VersionResponse { version: None }
5418 }
5419}
5420
5421#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5422#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5423pub struct VersionedZoneId {
5424 #[serde(rename = "id")]
5425 pub id: uuid::Uuid,
5426
5427 #[serde(rename = "version")]
5428 #[serde(skip_serializing_if = "Option::is_none")]
5429 pub version: Option<i64>,
5430}
5431
5432impl VersionedZoneId {
5433 pub fn new(id: uuid::Uuid) -> VersionedZoneId {
5434 VersionedZoneId {
5435 id: id,
5436 version: None,
5437 }
5438 }
5439}
5440
5441#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5443#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5444pub struct WorkflowEdge {
5445 #[serde(rename = "source")]
5446 pub source: models::WorkflowEdgeLink,
5447
5448 #[serde(rename = "target")]
5449 pub target: models::WorkflowEdgeLink,
5450}
5451
5452impl WorkflowEdge {
5453 pub fn new(source: models::WorkflowEdgeLink, target: models::WorkflowEdgeLink) -> WorkflowEdge {
5454 WorkflowEdge {
5455 source: source,
5456 target: target,
5457 }
5458 }
5459}
5460
5461#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5462#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5463pub struct WorkflowEdgeLink {
5464 #[serde(rename = "id")]
5465 pub id: String,
5466
5467 #[serde(rename = "port")]
5468 #[serde(skip_serializing_if = "Option::is_none")]
5469 pub port: Option<String>,
5470}
5471
5472impl WorkflowEdgeLink {
5473 pub fn new(id: String) -> WorkflowEdgeLink {
5474 WorkflowEdgeLink { id: id, port: None }
5475 }
5476}
5477
5478#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5480#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5481pub struct WorkflowGraph {
5482 #[serde(rename = "graph_id")]
5483 pub graph_id: uuid::Uuid,
5484
5485 #[serde(rename = "name")]
5486 pub name: String,
5487
5488 #[serde(rename = "creator_id")]
5489 pub creator_id: uuid::Uuid,
5490
5491 #[serde(rename = "created_at")]
5493 pub created_at: i64,
5494
5495 #[serde(rename = "updated_at")]
5497 pub updated_at: i64,
5498
5499 #[serde(rename = "description")]
5500 pub description: String,
5501
5502 #[serde(rename = "version")]
5503 pub version: isize,
5504
5505 #[serde(rename = "objects")]
5506 pub objects: SortedHashMap<String, models::WorkflowObject>,
5507
5508 #[serde(rename = "edges")]
5509 pub edges: SortedHashMap<String, models::WorkflowEdge>,
5510
5511 #[serde(rename = "metadata")]
5512 #[serde(skip_serializing_if = "Option::is_none")]
5513 pub metadata: Option<models::WorkflowMetadata>,
5514}
5515
5516impl WorkflowGraph {
5517 pub fn new(
5518 graph_id: uuid::Uuid,
5519 name: String,
5520 creator_id: uuid::Uuid,
5521 created_at: i64,
5522 updated_at: i64,
5523 description: String,
5524 version: isize,
5525 objects: SortedHashMap<String, models::WorkflowObject>,
5526 edges: SortedHashMap<String, models::WorkflowEdge>,
5527 ) -> WorkflowGraph {
5528 WorkflowGraph {
5529 graph_id: graph_id,
5530 name: name,
5531 creator_id: creator_id,
5532 created_at: created_at,
5533 updated_at: updated_at,
5534 description: description,
5535 version: version,
5536 objects: objects,
5537 edges: edges,
5538 metadata: None,
5539 }
5540 }
5541}
5542
5543#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5545#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5546pub struct WorkflowLinkMetadata {
5547 #[serde(rename = "graph_id")]
5548 pub graph_id: uuid::Uuid,
5549
5550 #[serde(rename = "source_version")]
5551 pub source_version: isize,
5552}
5553
5554impl WorkflowLinkMetadata {
5555 pub fn new(graph_id: uuid::Uuid, source_version: isize) -> WorkflowLinkMetadata {
5556 WorkflowLinkMetadata {
5557 graph_id: graph_id,
5558 source_version: source_version,
5559 }
5560 }
5561}
5562
5563#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5565#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5566pub struct WorkflowMetadata {
5567 #[serde(rename = "nodes")]
5568 pub nodes: HashMap<String, models::WorkflowNodeMetadata>,
5569
5570 #[serde(rename = "parent")]
5571 #[serde(skip_serializing_if = "Option::is_none")]
5572 pub parent: Option<models::WorkflowLinkMetadata>,
5573}
5574
5575impl WorkflowMetadata {
5576 pub fn new(nodes: HashMap<String, models::WorkflowNodeMetadata>) -> WorkflowMetadata {
5577 WorkflowMetadata {
5578 nodes: nodes,
5579 parent: None,
5580 }
5581 }
5582}
5583
5584#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5586#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5587pub struct WorkflowNodeMetadata {
5588 #[serde(rename = "position")]
5589 pub position: models::WorkflowNodePositionMetadata,
5590}
5591
5592impl WorkflowNodeMetadata {
5593 pub fn new(position: models::WorkflowNodePositionMetadata) -> WorkflowNodeMetadata {
5594 WorkflowNodeMetadata { position: position }
5595 }
5596}
5597
5598#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5600#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5601pub struct WorkflowNodePositionMetadata {
5602 #[serde(rename = "x")]
5603 pub x: isize,
5604
5605 #[serde(rename = "y")]
5606 pub y: isize,
5607}
5608
5609impl WorkflowNodePositionMetadata {
5610 pub fn new(x: isize, y: isize) -> WorkflowNodePositionMetadata {
5611 WorkflowNodePositionMetadata { x: x, y: y }
5612 }
5613}
5614
5615#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5617#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5618pub struct WorkflowObject {
5619 #[serde(rename = "name")]
5620 pub name: String,
5621
5622 #[serde(rename = "user_id")]
5623 pub user_id: uuid::Uuid,
5624
5625 #[serde(rename = "description")]
5626 #[serde(skip_serializing_if = "Option::is_none")]
5627 pub description: Option<String>,
5628
5629 #[serde(rename = "ref")]
5630 pub _ref: models::WorkflowObjectRef,
5631}
5632
5633impl WorkflowObject {
5634 pub fn new(
5635 name: String,
5636 user_id: uuid::Uuid,
5637 _ref: models::WorkflowObjectRef,
5638 ) -> WorkflowObject {
5639 WorkflowObject {
5640 name: name,
5641 user_id: user_id,
5642 description: None,
5643 _ref: _ref,
5644 }
5645 }
5646}
5647
5648#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5650#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5651pub struct WorkflowObjectRef {
5652 #[serde(rename = "placeholder")]
5653 #[serde(skip_serializing_if = "Option::is_none")]
5654 pub placeholder: Option<models::WorkflowObjectRefPlaceholder>,
5655
5656 #[serde(rename = "dataset")]
5657 #[serde(skip_serializing_if = "Option::is_none")]
5658 pub dataset: Option<models::WorkflowObjectRefDataset>,
5659
5660 #[serde(rename = "app")]
5661 #[serde(skip_serializing_if = "Option::is_none")]
5662 pub app: Option<models::WorkflowObjectRefApp>,
5663}
5664
5665impl WorkflowObjectRef {
5666 pub fn new() -> WorkflowObjectRef {
5667 WorkflowObjectRef {
5668 placeholder: None,
5669 dataset: None,
5670 app: None,
5671 }
5672 }
5673}
5674
5675#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5677#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5678pub struct WorkflowObjectRefApp {
5679 #[serde(rename = "image_id")]
5680 pub image_id: uuid::Uuid,
5681
5682 #[serde(rename = "config_id")]
5683 pub config_id: String,
5684}
5685
5686impl WorkflowObjectRefApp {
5687 pub fn new(image_id: uuid::Uuid, config_id: String) -> WorkflowObjectRefApp {
5688 WorkflowObjectRefApp {
5689 image_id: image_id,
5690 config_id: config_id,
5691 }
5692 }
5693}
5694
5695#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5697#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5698pub struct WorkflowObjectRefDataset {
5699 #[serde(rename = "dataset_id")]
5700 pub dataset_id: uuid::Uuid,
5701}
5702
5703impl WorkflowObjectRefDataset {
5704 pub fn new(dataset_id: uuid::Uuid) -> WorkflowObjectRefDataset {
5705 WorkflowObjectRefDataset {
5706 dataset_id: dataset_id,
5707 }
5708 }
5709}
5710
5711#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5713#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5714pub struct WorkflowObjectRefPlaceholder {
5715 #[serde(rename = "kind")]
5717 pub kind: String,
5718}
5719
5720impl WorkflowObjectRefPlaceholder {
5721 pub fn new(kind: String) -> WorkflowObjectRefPlaceholder {
5722 WorkflowObjectRefPlaceholder { kind: kind }
5723 }
5724}
5725
5726#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5728#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5729pub struct Zone {
5730 #[serde(rename = "acct_id")]
5732 pub acct_id: uuid::Uuid,
5733
5734 #[serde(rename = "certificate")]
5736 pub certificate: String,
5737
5738 #[serde(rename = "zone_id")]
5740 pub zone_id: uuid::Uuid,
5741
5742 #[serde(rename = "name")]
5744 pub name: String,
5745
5746 #[serde(rename = "description")]
5748 #[serde(skip_serializing_if = "Option::is_none")]
5749 pub description: Option<String>,
5750
5751 #[serde(rename = "node_refresh_interval")]
5753 pub node_refresh_interval: i64,
5754
5755 #[serde(rename = "node_renewal_threshold")]
5757 pub node_renewal_threshold: i32,
5758}
5759
5760impl Zone {
5761 pub fn new(
5762 acct_id: uuid::Uuid,
5763 certificate: String,
5764 zone_id: uuid::Uuid,
5765 name: String,
5766 node_refresh_interval: i64,
5767 node_renewal_threshold: i32,
5768 ) -> Zone {
5769 Zone {
5770 acct_id: acct_id,
5771 certificate: certificate,
5772 zone_id: zone_id,
5773 name: name,
5774 description: None,
5775 node_refresh_interval: node_refresh_interval,
5776 node_renewal_threshold: node_renewal_threshold,
5777 }
5778 }
5779}
5780
5781#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5782#[cfg_attr(feature = "conversion", derive(LabelledGeneric))]
5783pub struct ZoneJoinToken {
5784 #[serde(rename = "token")]
5786 #[serde(skip_serializing_if = "Option::is_none")]
5787 pub token: Option<String>,
5788}
5789
5790impl ZoneJoinToken {
5791 pub fn new() -> ZoneJoinToken {
5792 ZoneJoinToken { token: None }
5793 }
5794}
5795
5796#[cfg(test)]
5797mod tests {
5798 use models;
5799
5800 #[test]
5801 fn test_deny_unknown_fields_should_work() {
5802 let json_data =
5803 r#"{"app_config":{},"labels":{},"zone_ca":[],"workflow":null,"UNKNOWN_FIELD":{}}"#;
5804 let result = serde_json::from_str::<models::HashedConfig>(&json_data);
5805 assert!(result.is_err());
5806
5807 let json_data = r#"{"UNKNOWN_FIELD":{},"workflow_id":"00000000-0000-0000-0000-000000000000","app_name":"","port_map":{},"app_acct_id":null,"app_group_id":null}"#;
5808 let result = serde_json::from_str::<models::ApplicationConfigWorkflow>(&json_data);
5809 assert!(result.is_err());
5810
5811 let json_data = r#"{"UNKNOWN_FIELD":{},"acct_id":null,"group_id":null}"#;
5812 let result = serde_json::from_str::<models::ApplicationPort>(&json_data);
5813 assert!(result.is_err());
5814
5815 let json_data = r#"{"UNKNOWN_FIELD":{},"id":"00000000-0000-0000-0000-000000000000","acct_id":null,"group_id":null}"#;
5816 let result = serde_json::from_str::<models::ApplicationConfigPortDataset>(&json_data);
5817 assert!(result.is_err());
5818
5819 let json_data = r#"{"UNKNOWN_FIELD":{},"id":"00000000-0000-0000-0000-000000000000","acct_id":null,"group_id":null}"#;
5820 let result = serde_json::from_str::<models::ApplicationConfigPortDataset>(&json_data);
5821 assert!(result.is_err());
5822
5823 let json_data = r#"{"UNKNOWN_VARIANT":{"id":"00000000-0000-0000-0000-000000000000","acct_id":null,"group_id":null}}"#;
5824 let result = serde_json::from_str::<models::ApplicationConfigPort>(&json_data);
5825 assert!(result.is_err());
5826 }
5827}