1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The status of an Amazon Web Services Organization and the accounts within that organization.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct OrganizationStatus {
    /// <p>The ID of an Amazon Web Services Organization.</p>
    pub organization_id: ::std::option::Option<::std::string::String>,
    /// <p>The status of the organization's AWS service access. This will be <code>ENABLED</code> or <code>DISABLED</code>.</p>
    pub organization_aws_service_access_status: ::std::option::Option<::std::string::String>,
    /// <p>The status of the SLR deployment for the account. This will be either <code>SUCCEEDED</code> or <code>IN_PROGRESS</code>.</p>
    pub slr_deployment_status: ::std::option::Option<::std::string::String>,
    /// <p>The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's accounts. This will be either <code>SUCCEEDED</code> or <code>IN_PROGRESS</code>.</p>
    pub account_status_list: ::std::option::Option<::std::vec::Vec<crate::types::AccountStatus>>,
}
impl OrganizationStatus {
    /// <p>The ID of an Amazon Web Services Organization.</p>
    pub fn organization_id(&self) -> ::std::option::Option<&str> {
        self.organization_id.as_deref()
    }
    /// <p>The status of the organization's AWS service access. This will be <code>ENABLED</code> or <code>DISABLED</code>.</p>
    pub fn organization_aws_service_access_status(&self) -> ::std::option::Option<&str> {
        self.organization_aws_service_access_status.as_deref()
    }
    /// <p>The status of the SLR deployment for the account. This will be either <code>SUCCEEDED</code> or <code>IN_PROGRESS</code>.</p>
    pub fn slr_deployment_status(&self) -> ::std::option::Option<&str> {
        self.slr_deployment_status.as_deref()
    }
    /// <p>The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's accounts. This will be either <code>SUCCEEDED</code> or <code>IN_PROGRESS</code>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.account_status_list.is_none()`.
    pub fn account_status_list(&self) -> &[crate::types::AccountStatus] {
        self.account_status_list.as_deref().unwrap_or_default()
    }
}
impl OrganizationStatus {
    /// Creates a new builder-style object to manufacture [`OrganizationStatus`](crate::types::OrganizationStatus).
    pub fn builder() -> crate::types::builders::OrganizationStatusBuilder {
        crate::types::builders::OrganizationStatusBuilder::default()
    }
}

/// A builder for [`OrganizationStatus`](crate::types::OrganizationStatus).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct OrganizationStatusBuilder {
    pub(crate) organization_id: ::std::option::Option<::std::string::String>,
    pub(crate) organization_aws_service_access_status: ::std::option::Option<::std::string::String>,
    pub(crate) slr_deployment_status: ::std::option::Option<::std::string::String>,
    pub(crate) account_status_list: ::std::option::Option<::std::vec::Vec<crate::types::AccountStatus>>,
}
impl OrganizationStatusBuilder {
    /// <p>The ID of an Amazon Web Services Organization.</p>
    pub fn organization_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.organization_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of an Amazon Web Services Organization.</p>
    pub fn set_organization_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.organization_id = input;
        self
    }
    /// <p>The ID of an Amazon Web Services Organization.</p>
    pub fn get_organization_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.organization_id
    }
    /// <p>The status of the organization's AWS service access. This will be <code>ENABLED</code> or <code>DISABLED</code>.</p>
    pub fn organization_aws_service_access_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.organization_aws_service_access_status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The status of the organization's AWS service access. This will be <code>ENABLED</code> or <code>DISABLED</code>.</p>
    pub fn set_organization_aws_service_access_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.organization_aws_service_access_status = input;
        self
    }
    /// <p>The status of the organization's AWS service access. This will be <code>ENABLED</code> or <code>DISABLED</code>.</p>
    pub fn get_organization_aws_service_access_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.organization_aws_service_access_status
    }
    /// <p>The status of the SLR deployment for the account. This will be either <code>SUCCEEDED</code> or <code>IN_PROGRESS</code>.</p>
    pub fn slr_deployment_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.slr_deployment_status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The status of the SLR deployment for the account. This will be either <code>SUCCEEDED</code> or <code>IN_PROGRESS</code>.</p>
    pub fn set_slr_deployment_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.slr_deployment_status = input;
        self
    }
    /// <p>The status of the SLR deployment for the account. This will be either <code>SUCCEEDED</code> or <code>IN_PROGRESS</code>.</p>
    pub fn get_slr_deployment_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.slr_deployment_status
    }
    /// Appends an item to `account_status_list`.
    ///
    /// To override the contents of this collection use [`set_account_status_list`](Self::set_account_status_list).
    ///
    /// <p>The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's accounts. This will be either <code>SUCCEEDED</code> or <code>IN_PROGRESS</code>.</p>
    pub fn account_status_list(mut self, input: crate::types::AccountStatus) -> Self {
        let mut v = self.account_status_list.unwrap_or_default();
        v.push(input);
        self.account_status_list = ::std::option::Option::Some(v);
        self
    }
    /// <p>The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's accounts. This will be either <code>SUCCEEDED</code> or <code>IN_PROGRESS</code>.</p>
    pub fn set_account_status_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AccountStatus>>) -> Self {
        self.account_status_list = input;
        self
    }
    /// <p>The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's accounts. This will be either <code>SUCCEEDED</code> or <code>IN_PROGRESS</code>.</p>
    pub fn get_account_status_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AccountStatus>> {
        &self.account_status_list
    }
    /// Consumes the builder and constructs a [`OrganizationStatus`](crate::types::OrganizationStatus).
    pub fn build(self) -> crate::types::OrganizationStatus {
        crate::types::OrganizationStatus {
            organization_id: self.organization_id,
            organization_aws_service_access_status: self.organization_aws_service_access_status,
            slr_deployment_status: self.slr_deployment_status,
            account_status_list: self.account_status_list,
        }
    }
}