Skip to main content

basaltic/models/
workspace.rs

1//! Generated typed wire models. Unknown string enum values are retained.
2#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
3pub struct UserAddRequestInput {
4    /// Email of the user to add
5    #[serde(rename = "email")]
6    pub email: String,
7
8    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
9    pub tags: Option<TagsInput>,
10    /// Groups to assign when the invitation is accepted. Each reference is validated in the caller organization before the invitation is created.
11    #[serde(rename = "groups", default, skip_serializing_if = "Option::is_none")]
12    pub groups: Option<Vec<GroupReferenceInput>>,
13}
14impl UserAddRequestInput {
15    /// Set the required fields; optional fields start omitted.
16    #[allow(clippy::too_many_arguments)]
17    pub fn new(email: String) -> Self {
18        Self {
19            email,
20            tags: None,
21            groups: None,
22        }
23    }
24}
25
26pub type TagsInput = std::collections::BTreeMap<String, String>;
27
28pub type GroupReferenceInput = String;
29
30pub type AddUserBody = UserAddRequestInput;
31
32#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
33pub struct UserAddResponse {
34    #[serde(rename = "invitation")]
35    pub invitation: Invitation,
36    /// Always `invited` — adding a user always goes through an invitation the invitee has to accept, whether or not they already have a platform account.
37    #[serde(rename = "status")]
38    pub status: UserAddResponseStatus,
39}
40
41#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
42pub struct Invitation {
43    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
44    pub id: Option<String>,
45    /// Email address of the invited user
46    #[serde(rename = "email", default, skip_serializing_if = "Option::is_none")]
47    pub email: Option<String>,
48    /// Groups the user will be added to upon accepting
49    #[serde(rename = "groups", default, skip_serializing_if = "Option::is_none")]
50    pub groups: Option<Vec<GroupSummary>>,
51
52    #[serde(
53        rename = "invited_by",
54        default,
55        skip_serializing_if = "Option::is_none"
56    )]
57    pub invited_by: Option<InvitationInvitedBy>,
58
59    #[serde(rename = "status", default, skip_serializing_if = "Option::is_none")]
60    pub status: Option<InvitationStatus>,
61
62    #[serde(
63        rename = "expires_at",
64        default,
65        skip_serializing_if = "Option::is_none"
66    )]
67    pub expires_at: Option<String>,
68
69    #[serde(
70        rename = "created_at",
71        default,
72        skip_serializing_if = "Option::is_none"
73    )]
74    pub created_at: Option<String>,
75
76    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
77    pub crn: Option<String>,
78}
79
80#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
81pub struct GroupSummary {
82    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
83    pub id: Option<String>,
84    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
85    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
86    pub name: Option<String>,
87}
88
89#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
90pub struct InvitationInvitedBy {
91    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
92    pub id: Option<String>,
93
94    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
95    pub name: Option<String>,
96    /// Human inviter email; omitted for machine identities.
97    #[serde(rename = "email", default, skip_serializing_if = "Option::is_none")]
98    pub email: Option<String>,
99    /// Actual actor type. Assumed-role invitations record the session UUID in id.
100    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
101    pub type_: Option<InvitationInvitedByType>,
102    /// Canonical Workspace user CRN or account IAM service-account/session CRN captured when invited.
103    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
104    pub crn: Option<String>,
105    /// Owning account for a service-account or assumed-role inviter; omitted for a human inviter.
106    #[serde(
107        rename = "account_id",
108        default,
109        skip_serializing_if = "Option::is_none"
110    )]
111    pub account_id: Option<String>,
112}
113
114#[derive(Clone, Debug, PartialEq, Eq)]
115pub enum InvitationInvitedByType {
116    User,
117    ServiceAccount,
118    AssumedRole,
119    Unknown(String),
120}
121impl InvitationInvitedByType {
122    pub fn as_str(&self) -> &str {
123        match self {
124            Self::User => "user",
125            Self::ServiceAccount => "service_account",
126            Self::AssumedRole => "assumed_role",
127            Self::Unknown(value) => value,
128        }
129    }
130}
131impl serde::Serialize for InvitationInvitedByType {
132    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
133        serializer.serialize_str(self.as_str())
134    }
135}
136impl<'de> serde::Deserialize<'de> for InvitationInvitedByType {
137    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
138        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
139        Ok(match value.as_str() {
140            "user" => Self::User,
141            "service_account" => Self::ServiceAccount,
142            "assumed_role" => Self::AssumedRole,
143            _ => Self::Unknown(value),
144        })
145    }
146}
147
148#[derive(Clone, Debug, PartialEq, Eq)]
149pub enum InvitationStatus {
150    Pending,
151    Accepted,
152    Expired,
153    Cancelled,
154    Unknown(String),
155}
156impl InvitationStatus {
157    pub fn as_str(&self) -> &str {
158        match self {
159            Self::Pending => "pending",
160            Self::Accepted => "accepted",
161            Self::Expired => "expired",
162            Self::Cancelled => "cancelled",
163            Self::Unknown(value) => value,
164        }
165    }
166}
167impl serde::Serialize for InvitationStatus {
168    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
169        serializer.serialize_str(self.as_str())
170    }
171}
172impl<'de> serde::Deserialize<'de> for InvitationStatus {
173    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
174        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
175        Ok(match value.as_str() {
176            "pending" => Self::Pending,
177            "accepted" => Self::Accepted,
178            "expired" => Self::Expired,
179            "cancelled" => Self::Cancelled,
180            _ => Self::Unknown(value),
181        })
182    }
183}
184
185#[derive(Clone, Debug, PartialEq, Eq)]
186pub enum UserAddResponseStatus {
187    Invited,
188    Unknown(String),
189}
190impl UserAddResponseStatus {
191    pub fn as_str(&self) -> &str {
192        match self {
193            Self::Invited => "invited",
194            Self::Unknown(value) => value,
195        }
196    }
197}
198impl serde::Serialize for UserAddResponseStatus {
199    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
200        serializer.serialize_str(self.as_str())
201    }
202}
203impl<'de> serde::Deserialize<'de> for UserAddResponseStatus {
204    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
205        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
206        Ok(match value.as_str() {
207            "invited" => Self::Invited,
208            _ => Self::Unknown(value),
209        })
210    }
211}
212
213pub type AddUserResponse = UserAddResponse;
214
215#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
216pub struct UserGroupAddRequestInput {
217    #[serde(rename = "group")]
218    pub group: GroupReferenceInput,
219}
220impl UserGroupAddRequestInput {
221    /// Set the required fields; optional fields start omitted.
222    #[allow(clippy::too_many_arguments)]
223    pub fn new(group: GroupReferenceInput) -> Self {
224        Self { group }
225    }
226}
227
228pub type AddUserToGroupBody = UserGroupAddRequestInput;
229
230#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
231pub struct AccountRoleAssignmentCreateRequestInput {
232    #[serde(rename = "principal_type")]
233    pub principal_type: AccountRoleAssignmentCreateRequestInputPrincipalType,
234    /// Immutable UUID of a user or users-only group in this organization.
235    #[serde(rename = "principal_id")]
236    pub principal_id: String,
237    /// Immutable UUID of a role owned by the target account.
238    #[serde(rename = "role_id")]
239    pub role_id: String,
240}
241impl AccountRoleAssignmentCreateRequestInput {
242    /// Set the required fields; optional fields start omitted.
243    #[allow(clippy::too_many_arguments)]
244    pub fn new(
245        principal_type: AccountRoleAssignmentCreateRequestInputPrincipalType,
246        principal_id: String,
247        role_id: String,
248    ) -> Self {
249        Self {
250            principal_type,
251            principal_id,
252            role_id,
253        }
254    }
255}
256
257#[derive(Clone, Debug, PartialEq, Eq)]
258pub enum AccountRoleAssignmentCreateRequestInputPrincipalType {
259    User,
260    Group,
261    Unknown(String),
262}
263impl AccountRoleAssignmentCreateRequestInputPrincipalType {
264    pub fn as_str(&self) -> &str {
265        match self {
266            Self::User => "user",
267            Self::Group => "group",
268            Self::Unknown(value) => value,
269        }
270    }
271}
272impl serde::Serialize for AccountRoleAssignmentCreateRequestInputPrincipalType {
273    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
274        serializer.serialize_str(self.as_str())
275    }
276}
277impl<'de> serde::Deserialize<'de> for AccountRoleAssignmentCreateRequestInputPrincipalType {
278    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
279        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
280        Ok(match value.as_str() {
281            "user" => Self::User,
282            "group" => Self::Group,
283            _ => Self::Unknown(value),
284        })
285    }
286}
287
288pub type AssignAccountRoleBody = AccountRoleAssignmentCreateRequestInput;
289
290#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
291pub struct AccountRoleAssignmentResponse {
292    #[serde(
293        rename = "role_assignment",
294        default,
295        skip_serializing_if = "Option::is_none"
296    )]
297    pub role_assignment: Option<AccountRoleAssignment>,
298}
299
300#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
301pub struct AccountRoleAssignment {
302    /// Organization-qualified identity of this assignment in its target account.
303    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
304    pub crn: Option<String>,
305
306    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
307    pub id: Option<String>,
308
309    #[serde(
310        rename = "account_id",
311        default,
312        skip_serializing_if = "Option::is_none"
313    )]
314    pub account_id: Option<String>,
315
316    #[serde(rename = "role_id", default, skip_serializing_if = "Option::is_none")]
317    pub role_id: Option<String>,
318
319    #[serde(rename = "role_name", default, skip_serializing_if = "Option::is_none")]
320    pub role_name: Option<String>,
321
322    #[serde(
323        rename = "principal_type",
324        default,
325        skip_serializing_if = "Option::is_none"
326    )]
327    pub principal_type: Option<AccountRoleAssignmentPrincipalType>,
328
329    #[serde(
330        rename = "principal_id",
331        default,
332        skip_serializing_if = "Option::is_none"
333    )]
334    pub principal_id: Option<String>,
335
336    #[serde(
337        rename = "created_at",
338        default,
339        skip_serializing_if = "Option::is_none"
340    )]
341    pub created_at: Option<String>,
342}
343
344#[derive(Clone, Debug, PartialEq, Eq)]
345pub enum AccountRoleAssignmentPrincipalType {
346    User,
347    Group,
348    Unknown(String),
349}
350impl AccountRoleAssignmentPrincipalType {
351    pub fn as_str(&self) -> &str {
352        match self {
353            Self::User => "user",
354            Self::Group => "group",
355            Self::Unknown(value) => value,
356        }
357    }
358}
359impl serde::Serialize for AccountRoleAssignmentPrincipalType {
360    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
361        serializer.serialize_str(self.as_str())
362    }
363}
364impl<'de> serde::Deserialize<'de> for AccountRoleAssignmentPrincipalType {
365    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
366        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
367        Ok(match value.as_str() {
368            "user" => Self::User,
369            "group" => Self::Group,
370            _ => Self::Unknown(value),
371        })
372    }
373}
374
375pub type AssignAccountRoleResponse = AccountRoleAssignmentResponse;
376
377#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
378pub struct PolicyAttachRequestInput {
379    #[serde(rename = "policy")]
380    pub policy: PolicyReferenceInput,
381}
382impl PolicyAttachRequestInput {
383    /// Set the required fields; optional fields start omitted.
384    #[allow(clippy::too_many_arguments)]
385    pub fn new(policy: PolicyReferenceInput) -> Self {
386        Self { policy }
387    }
388}
389
390pub type PolicyReferenceInput = String;
391
392pub type AttachGroupPolicyBody = PolicyAttachRequestInput;
393
394#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
395pub struct OrganizationPolicyAttachRequestInput {
396    /// Immutable UUID of the organization policy to attach.
397    #[serde(rename = "policy_id")]
398    pub policy_id: String,
399}
400impl OrganizationPolicyAttachRequestInput {
401    /// Set the required fields; optional fields start omitted.
402    #[allow(clippy::too_many_arguments)]
403    pub fn new(policy_id: String) -> Self {
404        Self { policy_id }
405    }
406}
407
408pub type AttachRolePolicyBody = OrganizationPolicyAttachRequestInput;
409
410pub type AttachServiceAccountPolicyBody = OrganizationPolicyAttachRequestInput;
411
412pub type AttachUserPolicyBody = PolicyAttachRequestInput;
413
414#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
415pub struct CreateAccountRequestInput {
416    #[serde(rename = "name")]
417    pub name: String,
418
419    #[serde(rename = "handle")]
420    pub handle: String,
421
422    #[serde(
423        rename = "description",
424        default,
425        skip_serializing_if = "Option::is_none"
426    )]
427    pub description: Option<String>,
428}
429impl CreateAccountRequestInput {
430    /// Set the required fields; optional fields start omitted.
431    #[allow(clippy::too_many_arguments)]
432    pub fn new(name: String, handle: String) -> Self {
433        Self {
434            name,
435            handle,
436            description: None,
437        }
438    }
439}
440
441pub type CreateAccountBody = CreateAccountRequestInput;
442
443#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
444pub struct AccountResponse {
445    #[serde(rename = "account", default, skip_serializing_if = "Option::is_none")]
446    pub account: Option<Account>,
447}
448
449#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
450pub struct Account {
451    /// Internal UUID. Used for joins; the handle is the public identifier.
452    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
453    pub id: Option<String>,
454
455    #[serde(
456        rename = "organization_id",
457        default,
458        skip_serializing_if = "Option::is_none"
459    )]
460    pub organization_id: Option<String>,
461
462    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
463    pub name: Option<String>,
464    /// Globally-unique, immutable handle (URL-safe identifier). Sent as X-Account-Id on every request that needs account context and embedded in CRNs.
465    #[serde(rename = "handle", default, skip_serializing_if = "Option::is_none")]
466    pub handle: Option<String>,
467
468    #[serde(
469        rename = "description",
470        default,
471        skip_serializing_if = "Option::is_none"
472    )]
473    pub description: Option<String>,
474
475    #[serde(rename = "status", default, skip_serializing_if = "Option::is_none")]
476    pub status: Option<AccountStatus>,
477
478    #[serde(
479        rename = "created_at",
480        default,
481        skip_serializing_if = "Option::is_none"
482    )]
483    pub created_at: Option<String>,
484
485    #[serde(
486        rename = "updated_at",
487        default,
488        skip_serializing_if = "Option::is_none"
489    )]
490    pub updated_at: Option<String>,
491    /// Canonical Workspace resource identity.
492    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
493    pub crn: Option<String>,
494    /// Returned on creation. Immutable ID of the AccountAdministrator role trusted only to the account creator.
495    #[serde(
496        rename = "bootstrap_role_id",
497        default,
498        skip_serializing_if = "Option::is_none"
499    )]
500    pub bootstrap_role_id: Option<String>,
501    /// Returned on creation. Assume this role to administer the new account; source AssumeRole permission is still required.
502    #[serde(
503        rename = "bootstrap_role_crn",
504        default,
505        skip_serializing_if = "Option::is_none"
506    )]
507    pub bootstrap_role_crn: Option<String>,
508}
509
510#[derive(Clone, Debug, PartialEq, Eq)]
511pub enum AccountStatus {
512    Active,
513    Suspended,
514    Deleted,
515    Unknown(String),
516}
517impl AccountStatus {
518    pub fn as_str(&self) -> &str {
519        match self {
520            Self::Active => "active",
521            Self::Suspended => "suspended",
522            Self::Deleted => "deleted",
523            Self::Unknown(value) => value,
524        }
525    }
526}
527impl serde::Serialize for AccountStatus {
528    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
529        serializer.serialize_str(self.as_str())
530    }
531}
532impl<'de> serde::Deserialize<'de> for AccountStatus {
533    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
534        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
535        Ok(match value.as_str() {
536            "active" => Self::Active,
537            "suspended" => Self::Suspended,
538            "deleted" => Self::Deleted,
539            _ => Self::Unknown(value),
540        })
541    }
542}
543
544pub type CreateAccountResponse = AccountResponse;
545
546#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
547pub struct GroupCreateRequestInput {
548    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
549    #[serde(rename = "name")]
550    pub name: String,
551
552    #[serde(
553        rename = "description",
554        default,
555        skip_serializing_if = "Option::is_none"
556    )]
557    pub description: Option<String>,
558}
559impl GroupCreateRequestInput {
560    /// Set the required fields; optional fields start omitted.
561    #[allow(clippy::too_many_arguments)]
562    pub fn new(name: String) -> Self {
563        Self {
564            name,
565            description: None,
566        }
567    }
568}
569
570pub type CreateGroupBody = GroupCreateRequestInput;
571
572#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
573pub struct CreateGroupResult {
574    #[serde(rename = "group", default, skip_serializing_if = "Option::is_none")]
575    pub group: Option<Group>,
576}
577
578#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
579pub struct Group {
580    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
581    pub id: Option<String>,
582    /// Cloud Resource Name
583    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
584    pub crn: Option<String>,
585    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
586    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
587    pub name: Option<String>,
588
589    #[serde(
590        rename = "description",
591        default,
592        skip_serializing_if = "Option::is_none"
593    )]
594    pub description: Option<String>,
595
596    #[serde(
597        rename = "created_at",
598        default,
599        skip_serializing_if = "Option::is_none"
600    )]
601    pub created_at: Option<String>,
602
603    #[serde(
604        rename = "updated_at",
605        default,
606        skip_serializing_if = "Option::is_none"
607    )]
608    pub updated_at: Option<String>,
609}
610
611pub type CreateGroupResponse = CreateGroupResult;
612
613#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
614pub struct PolicyCreateRequestInput {
615    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
616    #[serde(rename = "name")]
617    pub name: String,
618
619    #[serde(
620        rename = "description",
621        default,
622        skip_serializing_if = "Option::is_none"
623    )]
624    pub description: Option<String>,
625
626    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
627    pub tags: Option<TagsInput>,
628
629    #[serde(rename = "document")]
630    pub document: PolicyDocumentInput,
631}
632impl PolicyCreateRequestInput {
633    /// Set the required fields; optional fields start omitted.
634    #[allow(clippy::too_many_arguments)]
635    pub fn new(name: String, document: PolicyDocumentInput) -> Self {
636        Self {
637            name,
638            description: None,
639            tags: None,
640            document,
641        }
642    }
643}
644
645#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
646pub struct PolicyDocumentInput {
647    #[serde(rename = "version")]
648    pub version: PolicyDocumentInputVersion,
649
650    #[serde(rename = "statements")]
651    pub statements: Vec<PolicyStatementInput>,
652}
653impl PolicyDocumentInput {
654    /// Set the required fields; optional fields start omitted.
655    #[allow(clippy::too_many_arguments)]
656    pub fn new(version: PolicyDocumentInputVersion, statements: Vec<PolicyStatementInput>) -> Self {
657        Self {
658            version,
659            statements,
660        }
661    }
662}
663
664#[derive(Clone, Debug, PartialEq, Eq)]
665pub enum PolicyDocumentInputVersion {
666    Value20240101,
667    Unknown(String),
668}
669impl PolicyDocumentInputVersion {
670    pub fn as_str(&self) -> &str {
671        match self {
672            Self::Value20240101 => "2024-01-01",
673            Self::Unknown(value) => value,
674        }
675    }
676}
677impl serde::Serialize for PolicyDocumentInputVersion {
678    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
679        serializer.serialize_str(self.as_str())
680    }
681}
682impl<'de> serde::Deserialize<'de> for PolicyDocumentInputVersion {
683    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
684        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
685        Ok(match value.as_str() {
686            "2024-01-01" => Self::Value20240101,
687            _ => Self::Unknown(value),
688        })
689    }
690}
691
692#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
693pub struct PolicyStatementInput {
694    /// Statement identifier
695    #[serde(rename = "sid", default, skip_serializing_if = "Option::is_none")]
696    pub sid: Option<String>,
697
698    #[serde(rename = "effect")]
699    pub effect: PolicyStatementInputEffect,
700    /// Actions in service:action format
701    #[serde(rename = "actions", default, skip_serializing_if = "Option::is_none")]
702    pub actions: Option<Vec<String>>,
703    /// The statement covers every action *except* these. Pairs naturally with `effect: deny` to carve a hole out of a broad allow; with `effect: allow` it grants everything the listed patterns don't name, including actions added by future services.
704    #[serde(
705        rename = "not_actions",
706        default,
707        skip_serializing_if = "Option::is_none"
708    )]
709    pub not_actions: Option<Vec<String>>,
710    /// Resource identifiers or patterns
711    #[serde(rename = "resources", default, skip_serializing_if = "Option::is_none")]
712    pub resources: Option<Vec<String>>,
713    /// The statement covers every resource *except* these. Same trade-off as `not_actions`: with `effect: allow` it reaches resources that do not exist yet.
714    #[serde(
715        rename = "not_resources",
716        default,
717        skip_serializing_if = "Option::is_none"
718    )]
719    pub not_resources: Option<Vec<String>>,
720    /// Optional conditions for the statement
721    #[serde(
722        rename = "conditions",
723        default,
724        skip_serializing_if = "Option::is_none"
725    )]
726    pub conditions: Option<Vec<PolicyConditionInput>>,
727}
728impl PolicyStatementInput {
729    /// Set the required fields; optional fields start omitted.
730    #[allow(clippy::too_many_arguments)]
731    pub fn new(effect: PolicyStatementInputEffect) -> Self {
732        Self {
733            sid: None,
734            effect,
735            actions: None,
736            not_actions: None,
737            resources: None,
738            not_resources: None,
739            conditions: None,
740        }
741    }
742}
743
744#[derive(Clone, Debug, PartialEq, Eq)]
745pub enum PolicyStatementInputEffect {
746    Allow,
747    Deny,
748    Unknown(String),
749}
750impl PolicyStatementInputEffect {
751    pub fn as_str(&self) -> &str {
752        match self {
753            Self::Allow => "allow",
754            Self::Deny => "deny",
755            Self::Unknown(value) => value,
756        }
757    }
758}
759impl serde::Serialize for PolicyStatementInputEffect {
760    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
761        serializer.serialize_str(self.as_str())
762    }
763}
764impl<'de> serde::Deserialize<'de> for PolicyStatementInputEffect {
765    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
766        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
767        Ok(match value.as_str() {
768            "allow" => Self::Allow,
769            "deny" => Self::Deny,
770            _ => Self::Unknown(value),
771        })
772    }
773}
774
775#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
776pub struct PolicyConditionInput {
777    /// The comparison operator
778    #[serde(rename = "operator")]
779    pub operator: PolicyConditionInputOperator,
780    /// The condition key to evaluate
781    #[serde(rename = "key")]
782    pub key: String,
783    /// Values to compare against
784    #[serde(rename = "values")]
785    pub values: Vec<String>,
786    /// Evaluates `operator` against a multi-valued context key (a set, such as `basalt:TagKeys` — the tag keys a request carries) rather than a single value. Omit for an ordinary single-valued condition. - `for_all_values` — holds when every member of the request set satisfies `operator`. An absent or empty set holds vacuously, so a request carrying no tags is not fenced by a tag-key restriction. - `for_any_value` — holds when at least one member does. An absent or empty set does not hold.
787    #[serde(
788        rename = "set_operator",
789        default,
790        skip_serializing_if = "Option::is_none"
791    )]
792    pub set_operator: Option<PolicyConditionInputSetOperator>,
793}
794impl PolicyConditionInput {
795    /// Set the required fields; optional fields start omitted.
796    #[allow(clippy::too_many_arguments)]
797    pub fn new(operator: PolicyConditionInputOperator, key: String, values: Vec<String>) -> Self {
798        Self {
799            operator,
800            key,
801            values,
802            set_operator: None,
803        }
804    }
805}
806
807#[derive(Clone, Debug, PartialEq, Eq)]
808pub enum PolicyConditionInputOperator {
809    Equals,
810    NotEquals,
811    StartsWith,
812    EndsWith,
813    Contains,
814    In,
815    NotIn,
816    GreaterThan,
817    LessThan,
818    GreaterThanOrEquals,
819    LessThanOrEquals,
820    Exists,
821    NotExists,
822    IpAddress,
823    NotIpAddress,
824    Unknown(String),
825}
826impl PolicyConditionInputOperator {
827    pub fn as_str(&self) -> &str {
828        match self {
829            Self::Equals => "equals",
830            Self::NotEquals => "not_equals",
831            Self::StartsWith => "starts_with",
832            Self::EndsWith => "ends_with",
833            Self::Contains => "contains",
834            Self::In => "in",
835            Self::NotIn => "not_in",
836            Self::GreaterThan => "greater_than",
837            Self::LessThan => "less_than",
838            Self::GreaterThanOrEquals => "greater_than_or_equals",
839            Self::LessThanOrEquals => "less_than_or_equals",
840            Self::Exists => "exists",
841            Self::NotExists => "not_exists",
842            Self::IpAddress => "ip_address",
843            Self::NotIpAddress => "not_ip_address",
844            Self::Unknown(value) => value,
845        }
846    }
847}
848impl serde::Serialize for PolicyConditionInputOperator {
849    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
850        serializer.serialize_str(self.as_str())
851    }
852}
853impl<'de> serde::Deserialize<'de> for PolicyConditionInputOperator {
854    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
855        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
856        Ok(match value.as_str() {
857            "equals" => Self::Equals,
858            "not_equals" => Self::NotEquals,
859            "starts_with" => Self::StartsWith,
860            "ends_with" => Self::EndsWith,
861            "contains" => Self::Contains,
862            "in" => Self::In,
863            "not_in" => Self::NotIn,
864            "greater_than" => Self::GreaterThan,
865            "less_than" => Self::LessThan,
866            "greater_than_or_equals" => Self::GreaterThanOrEquals,
867            "less_than_or_equals" => Self::LessThanOrEquals,
868            "exists" => Self::Exists,
869            "not_exists" => Self::NotExists,
870            "ip_address" => Self::IpAddress,
871            "not_ip_address" => Self::NotIpAddress,
872            _ => Self::Unknown(value),
873        })
874    }
875}
876
877#[derive(Clone, Debug, PartialEq, Eq)]
878pub enum PolicyConditionInputSetOperator {
879    ForAllValues,
880    ForAnyValue,
881    Unknown(String),
882}
883impl PolicyConditionInputSetOperator {
884    pub fn as_str(&self) -> &str {
885        match self {
886            Self::ForAllValues => "for_all_values",
887            Self::ForAnyValue => "for_any_value",
888            Self::Unknown(value) => value,
889        }
890    }
891}
892impl serde::Serialize for PolicyConditionInputSetOperator {
893    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
894        serializer.serialize_str(self.as_str())
895    }
896}
897impl<'de> serde::Deserialize<'de> for PolicyConditionInputSetOperator {
898    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
899        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
900        Ok(match value.as_str() {
901            "for_all_values" => Self::ForAllValues,
902            "for_any_value" => Self::ForAnyValue,
903            _ => Self::Unknown(value),
904        })
905    }
906}
907
908pub type CreatePolicyBody = PolicyCreateRequestInput;
909
910#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
911pub struct CreatePolicyResult {
912    #[serde(rename = "policy", default, skip_serializing_if = "Option::is_none")]
913    pub policy: Option<Policy>,
914}
915
916#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
917pub struct Policy {
918    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
919    pub id: Option<String>,
920    /// Managed policy CRN; absent on inline policy projections in effective-policy lists.
921    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
922    pub crn: Option<String>,
923    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
924    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
925    pub name: Option<String>,
926
927    #[serde(
928        rename = "description",
929        default,
930        skip_serializing_if = "Option::is_none"
931    )]
932    pub description: Option<String>,
933
934    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
935    pub tags: Option<Tags>,
936    /// Whether this is a system-managed policy (cannot be modified or deleted)
937    #[serde(rename = "is_system", default, skip_serializing_if = "Option::is_none")]
938    pub is_system: Option<bool>,
939
940    #[serde(rename = "document", default, skip_serializing_if = "Option::is_none")]
941    pub document: Option<PolicyDocument>,
942    /// Creation timestamp (not present for system policies)
943    #[serde(
944        rename = "created_at",
945        default,
946        skip_serializing_if = "Option::is_none"
947    )]
948    pub created_at: Option<String>,
949    /// Last update timestamp (not present for system policies)
950    #[serde(
951        rename = "updated_at",
952        default,
953        skip_serializing_if = "Option::is_none"
954    )]
955    pub updated_at: Option<String>,
956}
957
958pub type Tags = std::collections::BTreeMap<String, String>;
959
960#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
961pub struct PolicyDocument {
962    #[serde(rename = "version")]
963    pub version: PolicyDocumentVersion,
964
965    #[serde(rename = "statements")]
966    pub statements: Vec<PolicyStatement>,
967}
968
969#[derive(Clone, Debug, PartialEq, Eq)]
970pub enum PolicyDocumentVersion {
971    Value20240101,
972    Unknown(String),
973}
974impl PolicyDocumentVersion {
975    pub fn as_str(&self) -> &str {
976        match self {
977            Self::Value20240101 => "2024-01-01",
978            Self::Unknown(value) => value,
979        }
980    }
981}
982impl serde::Serialize for PolicyDocumentVersion {
983    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
984        serializer.serialize_str(self.as_str())
985    }
986}
987impl<'de> serde::Deserialize<'de> for PolicyDocumentVersion {
988    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
989        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
990        Ok(match value.as_str() {
991            "2024-01-01" => Self::Value20240101,
992            _ => Self::Unknown(value),
993        })
994    }
995}
996
997#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
998pub struct PolicyStatement {
999    /// Statement identifier
1000    #[serde(rename = "sid", default, skip_serializing_if = "Option::is_none")]
1001    pub sid: Option<String>,
1002
1003    #[serde(rename = "effect")]
1004    pub effect: PolicyStatementEffect,
1005    /// Actions in service:action format
1006    #[serde(rename = "actions", default, skip_serializing_if = "Option::is_none")]
1007    pub actions: Option<Vec<String>>,
1008    /// The statement covers every action *except* these. Pairs naturally with `effect: deny` to carve a hole out of a broad allow; with `effect: allow` it grants everything the listed patterns don't name, including actions added by future services.
1009    #[serde(
1010        rename = "not_actions",
1011        default,
1012        skip_serializing_if = "Option::is_none"
1013    )]
1014    pub not_actions: Option<Vec<String>>,
1015    /// Resource identifiers or patterns
1016    #[serde(rename = "resources", default, skip_serializing_if = "Option::is_none")]
1017    pub resources: Option<Vec<String>>,
1018    /// The statement covers every resource *except* these. Same trade-off as `not_actions`: with `effect: allow` it reaches resources that do not exist yet.
1019    #[serde(
1020        rename = "not_resources",
1021        default,
1022        skip_serializing_if = "Option::is_none"
1023    )]
1024    pub not_resources: Option<Vec<String>>,
1025    /// Optional conditions for the statement
1026    #[serde(
1027        rename = "conditions",
1028        default,
1029        skip_serializing_if = "Option::is_none"
1030    )]
1031    pub conditions: Option<Vec<PolicyCondition>>,
1032}
1033
1034#[derive(Clone, Debug, PartialEq, Eq)]
1035pub enum PolicyStatementEffect {
1036    Allow,
1037    Deny,
1038    Unknown(String),
1039}
1040impl PolicyStatementEffect {
1041    pub fn as_str(&self) -> &str {
1042        match self {
1043            Self::Allow => "allow",
1044            Self::Deny => "deny",
1045            Self::Unknown(value) => value,
1046        }
1047    }
1048}
1049impl serde::Serialize for PolicyStatementEffect {
1050    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1051        serializer.serialize_str(self.as_str())
1052    }
1053}
1054impl<'de> serde::Deserialize<'de> for PolicyStatementEffect {
1055    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1056        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1057        Ok(match value.as_str() {
1058            "allow" => Self::Allow,
1059            "deny" => Self::Deny,
1060            _ => Self::Unknown(value),
1061        })
1062    }
1063}
1064
1065#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1066pub struct PolicyCondition {
1067    /// The comparison operator
1068    #[serde(rename = "operator")]
1069    pub operator: PolicyConditionOperator,
1070    /// The condition key to evaluate
1071    #[serde(rename = "key")]
1072    pub key: String,
1073    /// Values to compare against
1074    #[serde(rename = "values")]
1075    pub values: Vec<String>,
1076    /// Evaluates `operator` against a multi-valued context key (a set, such as `basalt:TagKeys` — the tag keys a request carries) rather than a single value. Omit for an ordinary single-valued condition. - `for_all_values` — holds when every member of the request set satisfies `operator`. An absent or empty set holds vacuously, so a request carrying no tags is not fenced by a tag-key restriction. - `for_any_value` — holds when at least one member does. An absent or empty set does not hold.
1077    #[serde(
1078        rename = "set_operator",
1079        default,
1080        skip_serializing_if = "Option::is_none"
1081    )]
1082    pub set_operator: Option<PolicyConditionSetOperator>,
1083}
1084
1085#[derive(Clone, Debug, PartialEq, Eq)]
1086pub enum PolicyConditionOperator {
1087    Equals,
1088    NotEquals,
1089    StartsWith,
1090    EndsWith,
1091    Contains,
1092    In,
1093    NotIn,
1094    GreaterThan,
1095    LessThan,
1096    GreaterThanOrEquals,
1097    LessThanOrEquals,
1098    Exists,
1099    NotExists,
1100    IpAddress,
1101    NotIpAddress,
1102    Unknown(String),
1103}
1104impl PolicyConditionOperator {
1105    pub fn as_str(&self) -> &str {
1106        match self {
1107            Self::Equals => "equals",
1108            Self::NotEquals => "not_equals",
1109            Self::StartsWith => "starts_with",
1110            Self::EndsWith => "ends_with",
1111            Self::Contains => "contains",
1112            Self::In => "in",
1113            Self::NotIn => "not_in",
1114            Self::GreaterThan => "greater_than",
1115            Self::LessThan => "less_than",
1116            Self::GreaterThanOrEquals => "greater_than_or_equals",
1117            Self::LessThanOrEquals => "less_than_or_equals",
1118            Self::Exists => "exists",
1119            Self::NotExists => "not_exists",
1120            Self::IpAddress => "ip_address",
1121            Self::NotIpAddress => "not_ip_address",
1122            Self::Unknown(value) => value,
1123        }
1124    }
1125}
1126impl serde::Serialize for PolicyConditionOperator {
1127    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1128        serializer.serialize_str(self.as_str())
1129    }
1130}
1131impl<'de> serde::Deserialize<'de> for PolicyConditionOperator {
1132    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1133        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1134        Ok(match value.as_str() {
1135            "equals" => Self::Equals,
1136            "not_equals" => Self::NotEquals,
1137            "starts_with" => Self::StartsWith,
1138            "ends_with" => Self::EndsWith,
1139            "contains" => Self::Contains,
1140            "in" => Self::In,
1141            "not_in" => Self::NotIn,
1142            "greater_than" => Self::GreaterThan,
1143            "less_than" => Self::LessThan,
1144            "greater_than_or_equals" => Self::GreaterThanOrEquals,
1145            "less_than_or_equals" => Self::LessThanOrEquals,
1146            "exists" => Self::Exists,
1147            "not_exists" => Self::NotExists,
1148            "ip_address" => Self::IpAddress,
1149            "not_ip_address" => Self::NotIpAddress,
1150            _ => Self::Unknown(value),
1151        })
1152    }
1153}
1154
1155#[derive(Clone, Debug, PartialEq, Eq)]
1156pub enum PolicyConditionSetOperator {
1157    ForAllValues,
1158    ForAnyValue,
1159    Unknown(String),
1160}
1161impl PolicyConditionSetOperator {
1162    pub fn as_str(&self) -> &str {
1163        match self {
1164            Self::ForAllValues => "for_all_values",
1165            Self::ForAnyValue => "for_any_value",
1166            Self::Unknown(value) => value,
1167        }
1168    }
1169}
1170impl serde::Serialize for PolicyConditionSetOperator {
1171    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1172        serializer.serialize_str(self.as_str())
1173    }
1174}
1175impl<'de> serde::Deserialize<'de> for PolicyConditionSetOperator {
1176    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1177        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1178        Ok(match value.as_str() {
1179            "for_all_values" => Self::ForAllValues,
1180            "for_any_value" => Self::ForAnyValue,
1181            _ => Self::Unknown(value),
1182        })
1183    }
1184}
1185
1186pub type CreatePolicyResponse = CreatePolicyResult;
1187
1188pub type GetAccountResponse = AccountResponse;
1189
1190pub type GetAccountResource = Account;
1191
1192#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1193pub struct GetAccountScope {
1194    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1195    pub limit: Option<i64>,
1196}
1197
1198#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1199pub struct AccountOnboardingResponse {
1200    #[serde(rename = "onboarding")]
1201    pub onboarding: AccountOnboarding,
1202}
1203
1204#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1205pub struct AccountOnboarding {
1206    #[serde(rename = "account_id")]
1207    pub account_id: String,
1208
1209    #[serde(rename = "region")]
1210    pub region: String,
1211
1212    #[serde(rename = "provisioning_status")]
1213    pub provisioning_status: AccountOnboardingProvisioningStatus,
1214
1215    #[serde(rename = "provisioning_step")]
1216    pub provisioning_step: String,
1217
1218    #[serde(
1219        rename = "error_code",
1220        default,
1221        skip_serializing_if = "Option::is_none"
1222    )]
1223    pub error_code: Option<String>,
1224
1225    #[serde(rename = "dismissed")]
1226    pub dismissed: bool,
1227
1228    #[serde(rename = "welcome_seen")]
1229    pub welcome_seen: bool,
1230
1231    #[serde(rename = "connection_recorded")]
1232    pub connection_recorded: bool,
1233
1234    #[serde(rename = "steps")]
1235    pub steps: Vec<AccountOnboardingStepsItem>,
1236
1237    #[serde(rename = "vpc_id", default, skip_serializing_if = "Option::is_none")]
1238    pub vpc_id: Option<String>,
1239
1240    #[serde(rename = "subnet_id", default, skip_serializing_if = "Option::is_none")]
1241    pub subnet_id: Option<String>,
1242
1243    #[serde(
1244        rename = "security_group_id",
1245        default,
1246        skip_serializing_if = "Option::is_none"
1247    )]
1248    pub security_group_id: Option<String>,
1249
1250    #[serde(
1251        rename = "instance_id",
1252        default,
1253        skip_serializing_if = "Option::is_none"
1254    )]
1255    pub instance_id: Option<String>,
1256
1257    #[serde(
1258        rename = "confirmed_instance_id",
1259        default,
1260        skip_serializing_if = "Option::is_none"
1261    )]
1262    pub confirmed_instance_id: Option<String>,
1263}
1264
1265#[derive(Clone, Debug, PartialEq, Eq)]
1266pub enum AccountOnboardingProvisioningStatus {
1267    Pending,
1268    Provisioning,
1269    Ready,
1270    Failed,
1271    Existing,
1272    Unknown(String),
1273}
1274impl AccountOnboardingProvisioningStatus {
1275    pub fn as_str(&self) -> &str {
1276        match self {
1277            Self::Pending => "pending",
1278            Self::Provisioning => "provisioning",
1279            Self::Ready => "ready",
1280            Self::Failed => "failed",
1281            Self::Existing => "existing",
1282            Self::Unknown(value) => value,
1283        }
1284    }
1285}
1286impl serde::Serialize for AccountOnboardingProvisioningStatus {
1287    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1288        serializer.serialize_str(self.as_str())
1289    }
1290}
1291impl<'de> serde::Deserialize<'de> for AccountOnboardingProvisioningStatus {
1292    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1293        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1294        Ok(match value.as_str() {
1295            "pending" => Self::Pending,
1296            "provisioning" => Self::Provisioning,
1297            "ready" => Self::Ready,
1298            "failed" => Self::Failed,
1299            "existing" => Self::Existing,
1300            _ => Self::Unknown(value),
1301        })
1302    }
1303}
1304
1305#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1306pub struct AccountOnboardingStepsItem {
1307    #[serde(rename = "id")]
1308    pub id: AccountOnboardingStepsItemId,
1309
1310    #[serde(rename = "complete")]
1311    pub complete: bool,
1312}
1313
1314#[derive(Clone, Debug, PartialEq, Eq)]
1315pub enum AccountOnboardingStepsItemId {
1316    Ssh,
1317    Launch,
1318    Connect,
1319    Unknown(String),
1320}
1321impl AccountOnboardingStepsItemId {
1322    pub fn as_str(&self) -> &str {
1323        match self {
1324            Self::Ssh => "ssh",
1325            Self::Launch => "launch",
1326            Self::Connect => "connect",
1327            Self::Unknown(value) => value,
1328        }
1329    }
1330}
1331impl serde::Serialize for AccountOnboardingStepsItemId {
1332    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1333        serializer.serialize_str(self.as_str())
1334    }
1335}
1336impl<'de> serde::Deserialize<'de> for AccountOnboardingStepsItemId {
1337    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1338        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1339        Ok(match value.as_str() {
1340            "ssh" => Self::Ssh,
1341            "launch" => Self::Launch,
1342            "connect" => Self::Connect,
1343            _ => Self::Unknown(value),
1344        })
1345    }
1346}
1347
1348pub type GetAccountOnboardingResponse = AccountOnboardingResponse;
1349
1350#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1351pub struct GetAccountResourcesResult {
1352    #[serde(rename = "has_resources")]
1353    pub has_resources: bool,
1354}
1355
1356pub type GetAccountResourcesResponse = GetAccountResourcesResult;
1357
1358#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1359pub struct GetGroupResult {
1360    #[serde(rename = "group", default, skip_serializing_if = "Option::is_none")]
1361    pub group: Option<Group>,
1362}
1363
1364pub type GetGroupResponse = GetGroupResult;
1365
1366pub type GetGroupResource = Group;
1367
1368#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1369pub struct GetGroupScope {
1370    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1371    pub limit: Option<i64>,
1372}
1373
1374#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1375pub struct InlinePolicyResponse {
1376    #[serde(
1377        rename = "inline_policy",
1378        default,
1379        skip_serializing_if = "Option::is_none"
1380    )]
1381    pub inline_policy: Option<InlinePolicy>,
1382}
1383
1384#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1385pub struct InlinePolicy {
1386    /// Canonical principal-scoped inline policy identity; named principals use their immutable name, users use UUID.
1387    #[serde(rename = "crn")]
1388    pub crn: String,
1389
1390    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
1391    pub id: Option<String>,
1392    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
1393    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1394    pub name: Option<String>,
1395
1396    #[serde(rename = "document", default, skip_serializing_if = "Option::is_none")]
1397    pub document: Option<PolicyDocument>,
1398
1399    #[serde(
1400        rename = "created_at",
1401        default,
1402        skip_serializing_if = "Option::is_none"
1403    )]
1404    pub created_at: Option<String>,
1405
1406    #[serde(
1407        rename = "updated_at",
1408        default,
1409        skip_serializing_if = "Option::is_none"
1410    )]
1411    pub updated_at: Option<String>,
1412}
1413
1414pub type GetGroupInlinePolicyResponse = InlinePolicyResponse;
1415
1416pub type GetGroupInlinePolicyResource = InlinePolicy;
1417
1418#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1419pub struct GetGroupInlinePolicyScope {}
1420
1421#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1422pub struct GetInvitationResult {
1423    #[serde(
1424        rename = "invitation",
1425        default,
1426        skip_serializing_if = "Option::is_none"
1427    )]
1428    pub invitation: Option<Invitation>,
1429}
1430
1431pub type GetInvitationResponse = GetInvitationResult;
1432
1433pub type GetInvitationResource = Invitation;
1434
1435#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1436pub struct GetInvitationScope {
1437    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1438    pub limit: Option<i64>,
1439}
1440
1441#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1442pub struct OrganizationResponse {
1443    #[serde(
1444        rename = "organization",
1445        default,
1446        skip_serializing_if = "Option::is_none"
1447    )]
1448    pub organization: Option<Organization>,
1449}
1450
1451#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1452pub struct Organization {
1453    /// Language for organization billing and operational emails, independent of each user's console preference.
1454    #[serde(rename = "language", default, skip_serializing_if = "Option::is_none")]
1455    pub language: Option<OrganizationLanguage>,
1456    /// IANA timezone for formatting organization emails. Does not change billing periods or resource schedules.
1457    #[serde(rename = "time_zone", default, skip_serializing_if = "Option::is_none")]
1458    pub time_zone: Option<String>,
1459
1460    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
1461    pub id: Option<String>,
1462
1463    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1464    pub name: Option<String>,
1465
1466    #[serde(
1467        rename = "description",
1468        default,
1469        skip_serializing_if = "Option::is_none"
1470    )]
1471    pub description: Option<String>,
1472    /// ID of the organization owner
1473    #[serde(rename = "owner_id", default, skip_serializing_if = "Option::is_none")]
1474    pub owner_id: Option<String>,
1475    /// Lifecycle state. A newly created organization is `pending` until its owner has verified a phone number and attached a payment method; until then every resource API refuses it with `ORGANIZATION_ONBOARDING_REQUIRED`. `suspended` is a billing or administrative hold, and `terminated` is irreversible.
1476    #[serde(rename = "status", default, skip_serializing_if = "Option::is_none")]
1477    pub status: Option<OrganizationStatus>,
1478    /// Why the organization is suspended; absent unless it is. The two are the same `status` but not the same situation — a `billing` hold is one the customer can clear by settling their account, and the platform still grants organization context for it so they can reach billing to do so. A `manual` hold is an operator decision and grants nothing.
1479    #[serde(
1480        rename = "suspension_reason",
1481        default,
1482        skip_serializing_if = "Option::is_none"
1483    )]
1484    pub suspension_reason: Option<OrganizationSuspensionReason>,
1485
1486    #[serde(
1487        rename = "created_at",
1488        default,
1489        skip_serializing_if = "Option::is_none"
1490    )]
1491    pub created_at: Option<String>,
1492
1493    #[serde(
1494        rename = "updated_at",
1495        default,
1496        skip_serializing_if = "Option::is_none"
1497    )]
1498    pub updated_at: Option<String>,
1499    /// Canonical Workspace resource identity.
1500    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1501    pub crn: Option<String>,
1502}
1503
1504#[derive(Clone, Debug, PartialEq, Eq)]
1505pub enum OrganizationLanguage {
1506    En,
1507    PtBR,
1508    Es,
1509    Unknown(String),
1510}
1511impl OrganizationLanguage {
1512    pub fn as_str(&self) -> &str {
1513        match self {
1514            Self::En => "en",
1515            Self::PtBR => "pt-BR",
1516            Self::Es => "es",
1517            Self::Unknown(value) => value,
1518        }
1519    }
1520}
1521impl serde::Serialize for OrganizationLanguage {
1522    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1523        serializer.serialize_str(self.as_str())
1524    }
1525}
1526impl<'de> serde::Deserialize<'de> for OrganizationLanguage {
1527    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1528        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1529        Ok(match value.as_str() {
1530            "en" => Self::En,
1531            "pt-BR" => Self::PtBR,
1532            "es" => Self::Es,
1533            _ => Self::Unknown(value),
1534        })
1535    }
1536}
1537
1538#[derive(Clone, Debug, PartialEq, Eq)]
1539pub enum OrganizationStatus {
1540    Pending,
1541    Active,
1542    Suspended,
1543    Terminated,
1544    Unknown(String),
1545}
1546impl OrganizationStatus {
1547    pub fn as_str(&self) -> &str {
1548        match self {
1549            Self::Pending => "pending",
1550            Self::Active => "active",
1551            Self::Suspended => "suspended",
1552            Self::Terminated => "terminated",
1553            Self::Unknown(value) => value,
1554        }
1555    }
1556}
1557impl serde::Serialize for OrganizationStatus {
1558    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1559        serializer.serialize_str(self.as_str())
1560    }
1561}
1562impl<'de> serde::Deserialize<'de> for OrganizationStatus {
1563    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1564        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1565        Ok(match value.as_str() {
1566            "pending" => Self::Pending,
1567            "active" => Self::Active,
1568            "suspended" => Self::Suspended,
1569            "terminated" => Self::Terminated,
1570            _ => Self::Unknown(value),
1571        })
1572    }
1573}
1574
1575#[derive(Clone, Debug, PartialEq, Eq)]
1576pub enum OrganizationSuspensionReason {
1577    Billing,
1578    Manual,
1579    Unknown(String),
1580}
1581impl OrganizationSuspensionReason {
1582    pub fn as_str(&self) -> &str {
1583        match self {
1584            Self::Billing => "billing",
1585            Self::Manual => "manual",
1586            Self::Unknown(value) => value,
1587        }
1588    }
1589}
1590impl serde::Serialize for OrganizationSuspensionReason {
1591    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1592        serializer.serialize_str(self.as_str())
1593    }
1594}
1595impl<'de> serde::Deserialize<'de> for OrganizationSuspensionReason {
1596    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1597        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1598        Ok(match value.as_str() {
1599            "billing" => Self::Billing,
1600            "manual" => Self::Manual,
1601            _ => Self::Unknown(value),
1602        })
1603    }
1604}
1605
1606pub type GetOrganizationResponse = OrganizationResponse;
1607
1608pub type GetOrganizationResource = Organization;
1609
1610#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1611pub struct GetOrganizationScope {
1612    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1613    pub limit: Option<i64>,
1614}
1615
1616#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1617pub struct GetPolicyResult {
1618    #[serde(rename = "policy", default, skip_serializing_if = "Option::is_none")]
1619    pub policy: Option<Policy>,
1620}
1621
1622pub type GetPolicyResponse = GetPolicyResult;
1623
1624pub type GetPolicyResource = Policy;
1625
1626#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1627pub struct GetPolicyScope {
1628    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1629    pub limit: Option<i64>,
1630}
1631
1632#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1633pub struct GetUserResult {
1634    #[serde(rename = "user", default, skip_serializing_if = "Option::is_none")]
1635    pub user: Option<User>,
1636}
1637
1638#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1639pub struct User {
1640    /// Globally unique permanent login handle; empty until the user completes username selection.
1641    #[serde(rename = "username", default, skip_serializing_if = "Option::is_none")]
1642    pub username: Option<String>,
1643
1644    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
1645    pub id: Option<String>,
1646    /// Cloud Resource Name
1647    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1648    pub crn: Option<String>,
1649
1650    #[serde(rename = "email", default, skip_serializing_if = "Option::is_none")]
1651    pub email: Option<String>,
1652
1653    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1654    pub name: Option<String>,
1655
1656    #[serde(
1657        rename = "linux_identity",
1658        default,
1659        skip_serializing_if = "Option::is_none"
1660    )]
1661    pub linux_identity: Option<LinuxIdentity>,
1662
1663    #[serde(rename = "added_at", default, skip_serializing_if = "Option::is_none")]
1664    pub added_at: Option<String>,
1665
1666    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
1667    pub tags: Option<Tags>,
1668}
1669
1670#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1671pub struct LinuxIdentity {
1672    /// Home allocated to this identity. New human identities use /home/bsu_&lt;uid&gt; and service accounts use /home/bsa_&lt;uid&gt;. Existing identities retain their home. Read this value instead of deriving it from the username.
1673    #[serde(rename = "home_directory")]
1674    pub home_directory: String,
1675
1676    #[serde(rename = "username")]
1677    pub username: String,
1678
1679    #[serde(rename = "uid")]
1680    pub uid: i64,
1681
1682    #[serde(rename = "gid")]
1683    pub gid: i64,
1684}
1685
1686pub type GetUserResponse = GetUserResult;
1687
1688pub type GetUserResource = User;
1689
1690#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1691pub struct GetUserScope {
1692    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1693    pub limit: Option<i64>,
1694}
1695
1696pub type GetUserInlinePolicyResponse = InlinePolicyResponse;
1697
1698pub type GetUserInlinePolicyResource = InlinePolicy;
1699
1700#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1701pub struct GetUserInlinePolicyScope {}
1702
1703#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1704pub struct PermissionBoundaryResponse {
1705    #[serde(rename = "policy")]
1706    pub policy: Policy,
1707}
1708
1709pub type GetUserPermissionBoundaryResponse = PermissionBoundaryResponse;
1710
1711#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1712pub struct AccountRoleAssignmentListResponse {
1713    #[serde(
1714        rename = "role_assignments",
1715        default,
1716        skip_serializing_if = "Option::is_none"
1717    )]
1718    pub role_assignments: Option<Vec<AccountRoleAssignment>>,
1719}
1720
1721pub type ListAccountRoleAssignmentsResponse = AccountRoleAssignmentListResponse;
1722
1723pub type ListAccountRoleAssignmentsItem = AccountRoleAssignment;
1724
1725#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1726pub struct AccountRoleListResponse {
1727    #[serde(
1728        rename = "account_roles",
1729        default,
1730        skip_serializing_if = "Option::is_none"
1731    )]
1732    pub account_roles: Option<Vec<AccountRole>>,
1733}
1734
1735#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1736pub struct AccountRole {
1737    #[serde(
1738        rename = "account_id",
1739        default,
1740        skip_serializing_if = "Option::is_none"
1741    )]
1742    pub account_id: Option<String>,
1743
1744    #[serde(
1745        rename = "account_handle",
1746        default,
1747        skip_serializing_if = "Option::is_none"
1748    )]
1749    pub account_handle: Option<String>,
1750
1751    #[serde(
1752        rename = "account_name",
1753        default,
1754        skip_serializing_if = "Option::is_none"
1755    )]
1756    pub account_name: Option<String>,
1757
1758    #[serde(rename = "role_id", default, skip_serializing_if = "Option::is_none")]
1759    pub role_id: Option<String>,
1760
1761    #[serde(rename = "role_name", default, skip_serializing_if = "Option::is_none")]
1762    pub role_name: Option<String>,
1763
1764    #[serde(rename = "role_crn", default, skip_serializing_if = "Option::is_none")]
1765    pub role_crn: Option<String>,
1766}
1767
1768pub type ListAccountRolesResponse = AccountRoleListResponse;
1769
1770pub type ListAccountRolesItem = AccountRole;
1771
1772#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1773pub struct ListAccountsParameters {
1774    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1775    pub name: Option<String>,
1776
1777    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1778    pub crn: Option<String>,
1779
1780    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1781    pub limit: Option<i64>,
1782
1783    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
1784    pub marker: Option<String>,
1785}
1786
1787pub type ListAccountsQuery = ListAccountsParameters;
1788
1789#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1790pub struct AccountListResponse {
1791    #[serde(rename = "accounts", default, skip_serializing_if = "Option::is_none")]
1792    pub accounts: Option<Vec<Account>>,
1793
1794    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
1795    pub meta: Option<PaginationMeta>,
1796}
1797
1798#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1799pub struct PaginationMeta {
1800    /// Total number of items
1801    #[serde(rename = "total", default, skip_serializing_if = "Option::is_none")]
1802    pub total: Option<i64>,
1803    /// Number of items per page
1804    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1805    pub limit: Option<i64>,
1806    /// Opaque cursor for the next page. Pass it back as the `marker` query parameter; treat it as a token, not a value to parse.
1807    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
1808    pub marker: Option<String>,
1809    /// Whether there are more items
1810    #[serde(rename = "has_more", default, skip_serializing_if = "Option::is_none")]
1811    pub has_more: Option<bool>,
1812}
1813
1814pub type ListAccountsResponse = AccountListResponse;
1815
1816pub type ListAccountsItem = Account;
1817
1818#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1819pub struct ListGroupInlinePoliciesParameters {
1820    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1821    pub name: Option<String>,
1822
1823    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1824    pub crn: Option<String>,
1825}
1826
1827pub type ListGroupInlinePoliciesQuery = ListGroupInlinePoliciesParameters;
1828
1829#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1830pub struct InlinePolicyListResponse {
1831    #[serde(
1832        rename = "inline_policies",
1833        default,
1834        skip_serializing_if = "Option::is_none"
1835    )]
1836    pub inline_policies: Option<Vec<InlinePolicy>>,
1837}
1838
1839pub type ListGroupInlinePoliciesResponse = InlinePolicyListResponse;
1840
1841pub type ListGroupInlinePoliciesItem = InlinePolicy;
1842
1843#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1844pub struct ListGroupPoliciesParameters {
1845    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1846    pub name: Option<String>,
1847
1848    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1849    pub crn: Option<String>,
1850}
1851
1852pub type ListGroupPoliciesQuery = ListGroupPoliciesParameters;
1853
1854#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1855pub struct PrincipalPoliciesListResponse {
1856    #[serde(rename = "policies", default, skip_serializing_if = "Option::is_none")]
1857    pub policies: Option<Vec<Policy>>,
1858}
1859
1860pub type ListGroupPoliciesResponse = PrincipalPoliciesListResponse;
1861
1862pub type ListGroupPoliciesItem = Policy;
1863
1864#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1865pub struct ListGroupUsersParameters {
1866    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1867    pub name: Option<String>,
1868
1869    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1870    pub crn: Option<String>,
1871
1872    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1873    pub limit: Option<i64>,
1874
1875    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
1876    pub marker: Option<String>,
1877}
1878
1879pub type ListGroupUsersQuery = ListGroupUsersParameters;
1880
1881#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1882pub struct GroupUsersListResponse {
1883    #[serde(rename = "users", default, skip_serializing_if = "Option::is_none")]
1884    pub users: Option<Vec<GroupUser>>,
1885
1886    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
1887    pub meta: Option<PaginationMeta>,
1888}
1889
1890#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1891pub struct GroupUser {
1892    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
1893    pub id: Option<String>,
1894    /// CRN of the user
1895    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1896    pub crn: Option<String>,
1897
1898    #[serde(rename = "email", default, skip_serializing_if = "Option::is_none")]
1899    pub email: Option<String>,
1900    /// Display name of the user
1901    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1902    pub name: Option<String>,
1903
1904    #[serde(rename = "added_at", default, skip_serializing_if = "Option::is_none")]
1905    pub added_at: Option<String>,
1906}
1907
1908pub type ListGroupUsersResponse = GroupUsersListResponse;
1909
1910pub type ListGroupUsersItem = GroupUser;
1911
1912#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1913pub struct ListGroupsParameters {
1914    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1915    pub name: Option<String>,
1916
1917    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1918    pub crn: Option<String>,
1919
1920    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1921    pub limit: Option<i64>,
1922
1923    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
1924    pub marker: Option<String>,
1925}
1926
1927pub type ListGroupsQuery = ListGroupsParameters;
1928
1929#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1930pub struct GroupListResponse {
1931    #[serde(rename = "groups", default, skip_serializing_if = "Option::is_none")]
1932    pub groups: Option<Vec<Group>>,
1933
1934    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
1935    pub meta: Option<PaginationMeta>,
1936}
1937
1938pub type ListGroupsResponse = GroupListResponse;
1939
1940pub type ListGroupsItem = Group;
1941
1942#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1943pub struct ListInvitationsParameters {
1944    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1945    pub name: Option<String>,
1946
1947    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1948    pub crn: Option<String>,
1949
1950    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1951    pub limit: Option<i64>,
1952
1953    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
1954    pub marker: Option<String>,
1955}
1956
1957pub type ListInvitationsQuery = ListInvitationsParameters;
1958
1959#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1960pub struct InvitationListResponse {
1961    #[serde(
1962        rename = "invitations",
1963        default,
1964        skip_serializing_if = "Option::is_none"
1965    )]
1966    pub invitations: Option<Vec<Invitation>>,
1967
1968    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
1969    pub meta: Option<PaginationMeta>,
1970}
1971
1972pub type ListInvitationsResponse = InvitationListResponse;
1973
1974pub type ListInvitationsItem = Invitation;
1975
1976#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1977pub struct ListOrganizationsParameters {
1978    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1979    pub name: Option<String>,
1980
1981    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1982    pub crn: Option<String>,
1983
1984    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1985    pub limit: Option<i64>,
1986
1987    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
1988    pub marker: Option<String>,
1989}
1990
1991pub type ListOrganizationsQuery = ListOrganizationsParameters;
1992
1993#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1994pub struct OrganizationListResponse {
1995    #[serde(
1996        rename = "organizations",
1997        default,
1998        skip_serializing_if = "Option::is_none"
1999    )]
2000    pub organizations: Option<Vec<OrganizationWithMembership>>,
2001
2002    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
2003    pub meta: Option<PaginationMeta>,
2004}
2005
2006#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2007pub struct OrganizationWithMembership {
2008    /// Language for organization billing and operational emails, independent of each user's console preference.
2009    #[serde(rename = "language", default, skip_serializing_if = "Option::is_none")]
2010    pub language: Option<OrganizationWithMembershipLanguage>,
2011    /// IANA timezone for formatting organization emails. Does not change billing periods or resource schedules.
2012    #[serde(rename = "time_zone", default, skip_serializing_if = "Option::is_none")]
2013    pub time_zone: Option<String>,
2014
2015    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
2016    pub id: Option<String>,
2017
2018    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2019    pub name: Option<String>,
2020
2021    #[serde(
2022        rename = "description",
2023        default,
2024        skip_serializing_if = "Option::is_none"
2025    )]
2026    pub description: Option<String>,
2027    /// ID of the organization owner
2028    #[serde(rename = "owner_id", default, skip_serializing_if = "Option::is_none")]
2029    pub owner_id: Option<String>,
2030    /// Lifecycle state. A newly created organization is `pending` until its owner has verified a phone number and attached a payment method; until then every resource API refuses it with `ORGANIZATION_ONBOARDING_REQUIRED`. `suspended` is a billing or administrative hold, and `terminated` is irreversible.
2031    #[serde(rename = "status", default, skip_serializing_if = "Option::is_none")]
2032    pub status: Option<OrganizationWithMembershipStatus>,
2033    /// Why the organization is suspended; absent unless it is. The two are the same `status` but not the same situation — a `billing` hold is one the customer can clear by settling their account, and the platform still grants organization context for it so they can reach billing to do so. A `manual` hold is an operator decision and grants nothing.
2034    #[serde(
2035        rename = "suspension_reason",
2036        default,
2037        skip_serializing_if = "Option::is_none"
2038    )]
2039    pub suspension_reason: Option<OrganizationWithMembershipSuspensionReason>,
2040
2041    #[serde(
2042        rename = "created_at",
2043        default,
2044        skip_serializing_if = "Option::is_none"
2045    )]
2046    pub created_at: Option<String>,
2047
2048    #[serde(
2049        rename = "updated_at",
2050        default,
2051        skip_serializing_if = "Option::is_none"
2052    )]
2053    pub updated_at: Option<String>,
2054    /// Canonical Workspace resource identity.
2055    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2056    pub crn: Option<String>,
2057}
2058
2059#[derive(Clone, Debug, PartialEq, Eq)]
2060pub enum OrganizationWithMembershipLanguage {
2061    En,
2062    PtBR,
2063    Es,
2064    Unknown(String),
2065}
2066impl OrganizationWithMembershipLanguage {
2067    pub fn as_str(&self) -> &str {
2068        match self {
2069            Self::En => "en",
2070            Self::PtBR => "pt-BR",
2071            Self::Es => "es",
2072            Self::Unknown(value) => value,
2073        }
2074    }
2075}
2076impl serde::Serialize for OrganizationWithMembershipLanguage {
2077    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
2078        serializer.serialize_str(self.as_str())
2079    }
2080}
2081impl<'de> serde::Deserialize<'de> for OrganizationWithMembershipLanguage {
2082    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2083        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
2084        Ok(match value.as_str() {
2085            "en" => Self::En,
2086            "pt-BR" => Self::PtBR,
2087            "es" => Self::Es,
2088            _ => Self::Unknown(value),
2089        })
2090    }
2091}
2092
2093#[derive(Clone, Debug, PartialEq, Eq)]
2094pub enum OrganizationWithMembershipStatus {
2095    Pending,
2096    Active,
2097    Suspended,
2098    Terminated,
2099    Unknown(String),
2100}
2101impl OrganizationWithMembershipStatus {
2102    pub fn as_str(&self) -> &str {
2103        match self {
2104            Self::Pending => "pending",
2105            Self::Active => "active",
2106            Self::Suspended => "suspended",
2107            Self::Terminated => "terminated",
2108            Self::Unknown(value) => value,
2109        }
2110    }
2111}
2112impl serde::Serialize for OrganizationWithMembershipStatus {
2113    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
2114        serializer.serialize_str(self.as_str())
2115    }
2116}
2117impl<'de> serde::Deserialize<'de> for OrganizationWithMembershipStatus {
2118    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2119        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
2120        Ok(match value.as_str() {
2121            "pending" => Self::Pending,
2122            "active" => Self::Active,
2123            "suspended" => Self::Suspended,
2124            "terminated" => Self::Terminated,
2125            _ => Self::Unknown(value),
2126        })
2127    }
2128}
2129
2130#[derive(Clone, Debug, PartialEq, Eq)]
2131pub enum OrganizationWithMembershipSuspensionReason {
2132    Billing,
2133    Manual,
2134    Unknown(String),
2135}
2136impl OrganizationWithMembershipSuspensionReason {
2137    pub fn as_str(&self) -> &str {
2138        match self {
2139            Self::Billing => "billing",
2140            Self::Manual => "manual",
2141            Self::Unknown(value) => value,
2142        }
2143    }
2144}
2145impl serde::Serialize for OrganizationWithMembershipSuspensionReason {
2146    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
2147        serializer.serialize_str(self.as_str())
2148    }
2149}
2150impl<'de> serde::Deserialize<'de> for OrganizationWithMembershipSuspensionReason {
2151    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2152        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
2153        Ok(match value.as_str() {
2154            "billing" => Self::Billing,
2155            "manual" => Self::Manual,
2156            _ => Self::Unknown(value),
2157        })
2158    }
2159}
2160
2161pub type ListOrganizationsResponse = OrganizationListResponse;
2162
2163pub type ListOrganizationsItem = OrganizationWithMembership;
2164
2165#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2166pub struct ListPoliciesParameters {
2167    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2168    pub name: Option<String>,
2169
2170    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2171    pub crn: Option<String>,
2172
2173    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2174    pub limit: Option<i64>,
2175
2176    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2177    pub marker: Option<String>,
2178}
2179
2180pub type ListPoliciesQuery = ListPoliciesParameters;
2181
2182#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2183pub struct PolicyListResponse {
2184    #[serde(rename = "policies", default, skip_serializing_if = "Option::is_none")]
2185    pub policies: Option<Vec<Policy>>,
2186
2187    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
2188    pub meta: Option<PaginationMeta>,
2189}
2190
2191pub type ListPoliciesResponse = PolicyListResponse;
2192
2193pub type ListPoliciesItem = Policy;
2194
2195#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2196pub struct ListPolicyGroupsParameters {
2197    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2198    pub name: Option<String>,
2199
2200    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2201    pub crn: Option<String>,
2202
2203    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2204    pub limit: Option<i64>,
2205
2206    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2207    pub marker: Option<String>,
2208}
2209
2210pub type ListPolicyGroupsQuery = ListPolicyGroupsParameters;
2211
2212#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2213pub struct PolicyGroupsListResponse {
2214    #[serde(rename = "groups", default, skip_serializing_if = "Option::is_none")]
2215    pub groups: Option<Vec<Group>>,
2216
2217    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
2218    pub meta: Option<PaginationMeta>,
2219}
2220
2221pub type ListPolicyGroupsResponse = PolicyGroupsListResponse;
2222
2223pub type ListPolicyGroupsItem = Group;
2224
2225#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2226pub struct ListPolicyRolesParameters {
2227    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2228    pub name: Option<String>,
2229
2230    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2231    pub crn: Option<String>,
2232
2233    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2234    pub limit: Option<i64>,
2235
2236    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2237    pub marker: Option<String>,
2238}
2239
2240pub type ListPolicyRolesQuery = ListPolicyRolesParameters;
2241
2242#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2243pub struct PolicyRolesListResponse {
2244    #[serde(rename = "roles", default, skip_serializing_if = "Option::is_none")]
2245    pub roles: Option<Vec<AccountPrincipalReference>>,
2246
2247    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
2248    pub meta: Option<PaginationMeta>,
2249}
2250
2251#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2252pub struct AccountPrincipalReference {
2253    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
2254    pub id: Option<String>,
2255
2256    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2257    pub name: Option<String>,
2258
2259    #[serde(
2260        rename = "account_id",
2261        default,
2262        skip_serializing_if = "Option::is_none"
2263    )]
2264    pub account_id: Option<String>,
2265
2266    #[serde(
2267        rename = "account_handle",
2268        default,
2269        skip_serializing_if = "Option::is_none"
2270    )]
2271    pub account_handle: Option<String>,
2272}
2273
2274pub type ListPolicyRolesResponse = PolicyRolesListResponse;
2275
2276pub type ListPolicyRolesItem = AccountPrincipalReference;
2277
2278#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2279pub struct ListPolicyServiceAccountsParameters {
2280    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2281    pub name: Option<String>,
2282
2283    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2284    pub crn: Option<String>,
2285
2286    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2287    pub limit: Option<i64>,
2288
2289    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2290    pub marker: Option<String>,
2291}
2292
2293pub type ListPolicyServiceAccountsQuery = ListPolicyServiceAccountsParameters;
2294
2295#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2296pub struct PolicyServiceAccountsListResponse {
2297    #[serde(
2298        rename = "service_accounts",
2299        default,
2300        skip_serializing_if = "Option::is_none"
2301    )]
2302    pub service_accounts: Option<Vec<AccountPrincipalReference>>,
2303
2304    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
2305    pub meta: Option<PaginationMeta>,
2306}
2307
2308pub type ListPolicyServiceAccountsResponse = PolicyServiceAccountsListResponse;
2309
2310pub type ListPolicyServiceAccountsItem = AccountPrincipalReference;
2311
2312#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2313pub struct ListPolicyUsersParameters {
2314    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2315    pub name: Option<String>,
2316
2317    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2318    pub crn: Option<String>,
2319
2320    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2321    pub limit: Option<i64>,
2322
2323    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2324    pub marker: Option<String>,
2325}
2326
2327pub type ListPolicyUsersQuery = ListPolicyUsersParameters;
2328
2329#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2330pub struct PolicyUsersListResponse {
2331    #[serde(rename = "users", default, skip_serializing_if = "Option::is_none")]
2332    pub users: Option<Vec<User>>,
2333
2334    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
2335    pub meta: Option<PaginationMeta>,
2336}
2337
2338pub type ListPolicyUsersResponse = PolicyUsersListResponse;
2339
2340pub type ListPolicyUsersItem = User;
2341
2342#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2343pub struct ListRolePoliciesParameters {
2344    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2345    pub name: Option<String>,
2346
2347    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2348    pub crn: Option<String>,
2349}
2350
2351pub type ListRolePoliciesQuery = ListRolePoliciesParameters;
2352
2353#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2354pub struct RolePoliciesListResponse {
2355    #[serde(rename = "policies", default, skip_serializing_if = "Option::is_none")]
2356    pub policies: Option<Vec<Policy>>,
2357}
2358
2359pub type ListRolePoliciesResponse = RolePoliciesListResponse;
2360
2361pub type ListRolePoliciesItem = Policy;
2362
2363#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2364pub struct ListServiceAccountPoliciesParameters {
2365    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2366    pub name: Option<String>,
2367
2368    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2369    pub crn: Option<String>,
2370}
2371
2372pub type ListServiceAccountPoliciesQuery = ListServiceAccountPoliciesParameters;
2373
2374pub type ListServiceAccountPoliciesResponse = PrincipalPoliciesListResponse;
2375
2376pub type ListServiceAccountPoliciesItem = Policy;
2377
2378#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2379pub struct ListUserGroupsParameters {
2380    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2381    pub name: Option<String>,
2382
2383    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2384    pub crn: Option<String>,
2385}
2386
2387pub type ListUserGroupsQuery = ListUserGroupsParameters;
2388
2389pub type ListUserGroupsResponse = GroupListResponse;
2390
2391pub type ListUserGroupsItem = Group;
2392
2393#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2394pub struct ListUserInlinePoliciesParameters {
2395    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2396    pub name: Option<String>,
2397
2398    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2399    pub crn: Option<String>,
2400}
2401
2402pub type ListUserInlinePoliciesQuery = ListUserInlinePoliciesParameters;
2403
2404pub type ListUserInlinePoliciesResponse = InlinePolicyListResponse;
2405
2406pub type ListUserInlinePoliciesItem = InlinePolicy;
2407
2408#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2409pub struct ListUserPoliciesParameters {
2410    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2411    pub name: Option<String>,
2412
2413    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2414    pub crn: Option<String>,
2415}
2416
2417pub type ListUserPoliciesQuery = ListUserPoliciesParameters;
2418
2419pub type ListUserPoliciesResponse = PrincipalPoliciesListResponse;
2420
2421pub type ListUserPoliciesItem = Policy;
2422
2423#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2424pub struct ListUsersParameters {
2425    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2426    pub name: Option<String>,
2427
2428    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
2429    pub crn: Option<String>,
2430
2431    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
2432    pub limit: Option<i64>,
2433
2434    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
2435    pub marker: Option<String>,
2436}
2437
2438pub type ListUsersQuery = ListUsersParameters;
2439
2440#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2441pub struct UserListResponse {
2442    #[serde(rename = "users", default, skip_serializing_if = "Option::is_none")]
2443    pub users: Option<Vec<User>>,
2444
2445    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
2446    pub meta: Option<PaginationMeta>,
2447}
2448
2449pub type ListUsersResponse = UserListResponse;
2450
2451pub type ListUsersItem = User;
2452
2453#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2454pub struct PutInlinePolicyRequestInput {
2455    #[serde(rename = "document")]
2456    pub document: PolicyDocumentInput,
2457}
2458impl PutInlinePolicyRequestInput {
2459    /// Set the required fields; optional fields start omitted.
2460    #[allow(clippy::too_many_arguments)]
2461    pub fn new(document: PolicyDocumentInput) -> Self {
2462        Self { document }
2463    }
2464}
2465
2466pub type PutGroupInlinePolicyBody = PutInlinePolicyRequestInput;
2467
2468pub type PutGroupInlinePolicyResponse = InlinePolicyResponse;
2469
2470pub type PutUserInlinePolicyBody = PutInlinePolicyRequestInput;
2471
2472pub type PutUserInlinePolicyResponse = InlinePolicyResponse;
2473
2474pub type RetryAccountProvisioningResponse = AccountOnboardingResponse;
2475
2476#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2477pub struct SetBoundaryRequestInput {
2478    #[serde(rename = "policy")]
2479    pub policy: PolicyReferenceInput,
2480}
2481impl SetBoundaryRequestInput {
2482    /// Set the required fields; optional fields start omitted.
2483    #[allow(clippy::too_many_arguments)]
2484    pub fn new(policy: PolicyReferenceInput) -> Self {
2485        Self { policy }
2486    }
2487}
2488
2489pub type SetUserPermissionBoundaryBody = SetBoundaryRequestInput;
2490
2491#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2492pub struct UpdateAccountRequestInput {
2493    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2494    pub name: Option<String>,
2495
2496    #[serde(
2497        rename = "description",
2498        default,
2499        skip_serializing_if = "Option::is_none"
2500    )]
2501    pub description: Option<String>,
2502}
2503
2504pub type UpdateAccountBody = UpdateAccountRequestInput;
2505
2506pub type UpdateAccountResponse = AccountResponse;
2507
2508#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2509pub struct AccountOnboardingUpdateRequestInput {
2510    #[serde(rename = "dismissed", default, skip_serializing_if = "Option::is_none")]
2511    pub dismissed: Option<bool>,
2512
2513    #[serde(
2514        rename = "welcome_seen",
2515        default,
2516        skip_serializing_if = "Option::is_none"
2517    )]
2518    pub welcome_seen: Option<bool>,
2519
2520    #[serde(
2521        rename = "instance_id",
2522        default,
2523        skip_serializing_if = "Option::is_none"
2524    )]
2525    pub instance_id: Option<String>,
2526
2527    #[serde(
2528        rename = "confirmed_instance_id",
2529        default,
2530        skip_serializing_if = "Option::is_none"
2531    )]
2532    pub confirmed_instance_id: Option<String>,
2533}
2534
2535pub type UpdateAccountOnboardingBody = AccountOnboardingUpdateRequestInput;
2536
2537pub type UpdateAccountOnboardingResponse = AccountOnboardingResponse;
2538
2539#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2540pub struct GroupUpdateRequestInput {
2541    #[serde(
2542        rename = "description",
2543        default,
2544        skip_serializing_if = "Option::is_none"
2545    )]
2546    pub description: Option<String>,
2547}
2548
2549pub type UpdateGroupBody = GroupUpdateRequestInput;
2550
2551#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2552pub struct UpdateGroupResult {
2553    #[serde(rename = "group", default, skip_serializing_if = "Option::is_none")]
2554    pub group: Option<Group>,
2555}
2556
2557pub type UpdateGroupResponse = UpdateGroupResult;
2558
2559#[derive(Clone, serde::Serialize, serde::Deserialize)]
2560pub struct OrganizationUpdateRequestInput {
2561    /// Language for organization billing and operational emails, independent of each user's console preference.
2562    #[serde(rename = "language", default, skip_serializing_if = "Option::is_none")]
2563    pub language: Option<OrganizationUpdateRequestInputLanguage>,
2564    /// IANA timezone for formatting organization emails. Does not change billing periods or resource schedules.
2565    #[serde(rename = "time_zone", default, skip_serializing_if = "Option::is_none")]
2566    pub time_zone: Option<String>,
2567
2568    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
2569    pub name: Option<String>,
2570
2571    #[serde(
2572        rename = "description",
2573        default,
2574        skip_serializing_if = "Option::is_none"
2575    )]
2576    pub description: Option<String>,
2577    /// Google reCAPTCHA token for bot protection
2578    #[serde(rename = "captcha_token")]
2579    pub captcha_token: String,
2580}
2581impl std::fmt::Debug for OrganizationUpdateRequestInput {
2582    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2583        let mut d = f.debug_struct("OrganizationUpdateRequestInput");
2584        d.field("language", &self.language);
2585        d.field("time_zone", &self.time_zone);
2586        d.field("name", &self.name);
2587        d.field("description", &self.description);
2588        d.field("captcha_token", &"[REDACTED]");
2589        d.finish()
2590    }
2591}
2592impl OrganizationUpdateRequestInput {
2593    /// Set the required fields; optional fields start omitted.
2594    #[allow(clippy::too_many_arguments)]
2595    pub fn new(captcha_token: String) -> Self {
2596        Self {
2597            language: None,
2598            time_zone: None,
2599            name: None,
2600            description: None,
2601            captcha_token,
2602        }
2603    }
2604}
2605
2606#[derive(Clone, Debug, PartialEq, Eq)]
2607pub enum OrganizationUpdateRequestInputLanguage {
2608    En,
2609    PtBR,
2610    Es,
2611    Unknown(String),
2612}
2613impl OrganizationUpdateRequestInputLanguage {
2614    pub fn as_str(&self) -> &str {
2615        match self {
2616            Self::En => "en",
2617            Self::PtBR => "pt-BR",
2618            Self::Es => "es",
2619            Self::Unknown(value) => value,
2620        }
2621    }
2622}
2623impl serde::Serialize for OrganizationUpdateRequestInputLanguage {
2624    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
2625        serializer.serialize_str(self.as_str())
2626    }
2627}
2628impl<'de> serde::Deserialize<'de> for OrganizationUpdateRequestInputLanguage {
2629    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2630        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
2631        Ok(match value.as_str() {
2632            "en" => Self::En,
2633            "pt-BR" => Self::PtBR,
2634            "es" => Self::Es,
2635            _ => Self::Unknown(value),
2636        })
2637    }
2638}
2639
2640pub type UpdateOrganizationBody = OrganizationUpdateRequestInput;
2641
2642pub type UpdateOrganizationResponse = OrganizationResponse;
2643
2644#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2645pub struct PolicyUpdateRequestInput {
2646    #[serde(
2647        rename = "description",
2648        default,
2649        skip_serializing_if = "Option::is_none"
2650    )]
2651    pub description: Option<String>,
2652
2653    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
2654    pub tags: Option<TagsInput>,
2655
2656    #[serde(rename = "document", default, skip_serializing_if = "Option::is_none")]
2657    pub document: Option<PolicyDocumentInput>,
2658}
2659
2660pub type UpdatePolicyBody = PolicyUpdateRequestInput;
2661
2662#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2663pub struct UpdatePolicyResult {
2664    #[serde(rename = "policy", default, skip_serializing_if = "Option::is_none")]
2665    pub policy: Option<Policy>,
2666}
2667
2668pub type UpdatePolicyResponse = UpdatePolicyResult;