em_client/
models.rs

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