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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about the enabled control.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct EnabledControlDetails {
    /// <p>The ARN of the enabled control.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The control identifier of the enabled control. For information on how to find the <code>controlIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
    pub control_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the organizational unit. For information on how to find the <code>targetIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
    pub target_identifier: ::std::option::Option<::std::string::String>,
    /// <p>Target AWS Regions for the enabled control.</p>
    pub target_regions: ::std::option::Option<::std::vec::Vec<crate::types::Region>>,
    /// <p>The deployment summary of the enabled control.</p>
    pub status_summary: ::std::option::Option<crate::types::EnablementStatusSummary>,
    /// <p>The drift status of the enabled control.</p>
    pub drift_status_summary: ::std::option::Option<crate::types::DriftStatusSummary>,
}
impl EnabledControlDetails {
    /// <p>The ARN of the enabled control.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The control identifier of the enabled control. For information on how to find the <code>controlIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
    pub fn control_identifier(&self) -> ::std::option::Option<&str> {
        self.control_identifier.as_deref()
    }
    /// <p>The ARN of the organizational unit. For information on how to find the <code>targetIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
    pub fn target_identifier(&self) -> ::std::option::Option<&str> {
        self.target_identifier.as_deref()
    }
    /// <p>Target AWS Regions for the enabled control.</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 `.target_regions.is_none()`.
    pub fn target_regions(&self) -> &[crate::types::Region] {
        self.target_regions.as_deref().unwrap_or_default()
    }
    /// <p>The deployment summary of the enabled control.</p>
    pub fn status_summary(&self) -> ::std::option::Option<&crate::types::EnablementStatusSummary> {
        self.status_summary.as_ref()
    }
    /// <p>The drift status of the enabled control.</p>
    pub fn drift_status_summary(&self) -> ::std::option::Option<&crate::types::DriftStatusSummary> {
        self.drift_status_summary.as_ref()
    }
}
impl EnabledControlDetails {
    /// Creates a new builder-style object to manufacture [`EnabledControlDetails`](crate::types::EnabledControlDetails).
    pub fn builder() -> crate::types::builders::EnabledControlDetailsBuilder {
        crate::types::builders::EnabledControlDetailsBuilder::default()
    }
}

/// A builder for [`EnabledControlDetails`](crate::types::EnabledControlDetails).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct EnabledControlDetailsBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) control_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) target_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) target_regions: ::std::option::Option<::std::vec::Vec<crate::types::Region>>,
    pub(crate) status_summary: ::std::option::Option<crate::types::EnablementStatusSummary>,
    pub(crate) drift_status_summary: ::std::option::Option<crate::types::DriftStatusSummary>,
}
impl EnabledControlDetailsBuilder {
    /// <p>The ARN of the enabled control.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the enabled control.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The ARN of the enabled control.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The control identifier of the enabled control. For information on how to find the <code>controlIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
    pub fn control_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.control_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The control identifier of the enabled control. For information on how to find the <code>controlIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
    pub fn set_control_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.control_identifier = input;
        self
    }
    /// <p>The control identifier of the enabled control. For information on how to find the <code>controlIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
    pub fn get_control_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.control_identifier
    }
    /// <p>The ARN of the organizational unit. For information on how to find the <code>targetIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
    pub fn target_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.target_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the organizational unit. For information on how to find the <code>targetIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
    pub fn set_target_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.target_identifier = input;
        self
    }
    /// <p>The ARN of the organizational unit. For information on how to find the <code>targetIdentifier</code>, see <a href="https://docs.aws.amazon.com/controltower/latest/APIReference/Welcome.html">the overview page</a>.</p>
    pub fn get_target_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.target_identifier
    }
    /// Appends an item to `target_regions`.
    ///
    /// To override the contents of this collection use [`set_target_regions`](Self::set_target_regions).
    ///
    /// <p>Target AWS Regions for the enabled control.</p>
    pub fn target_regions(mut self, input: crate::types::Region) -> Self {
        let mut v = self.target_regions.unwrap_or_default();
        v.push(input);
        self.target_regions = ::std::option::Option::Some(v);
        self
    }
    /// <p>Target AWS Regions for the enabled control.</p>
    pub fn set_target_regions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Region>>) -> Self {
        self.target_regions = input;
        self
    }
    /// <p>Target AWS Regions for the enabled control.</p>
    pub fn get_target_regions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Region>> {
        &self.target_regions
    }
    /// <p>The deployment summary of the enabled control.</p>
    pub fn status_summary(mut self, input: crate::types::EnablementStatusSummary) -> Self {
        self.status_summary = ::std::option::Option::Some(input);
        self
    }
    /// <p>The deployment summary of the enabled control.</p>
    pub fn set_status_summary(mut self, input: ::std::option::Option<crate::types::EnablementStatusSummary>) -> Self {
        self.status_summary = input;
        self
    }
    /// <p>The deployment summary of the enabled control.</p>
    pub fn get_status_summary(&self) -> &::std::option::Option<crate::types::EnablementStatusSummary> {
        &self.status_summary
    }
    /// <p>The drift status of the enabled control.</p>
    pub fn drift_status_summary(mut self, input: crate::types::DriftStatusSummary) -> Self {
        self.drift_status_summary = ::std::option::Option::Some(input);
        self
    }
    /// <p>The drift status of the enabled control.</p>
    pub fn set_drift_status_summary(mut self, input: ::std::option::Option<crate::types::DriftStatusSummary>) -> Self {
        self.drift_status_summary = input;
        self
    }
    /// <p>The drift status of the enabled control.</p>
    pub fn get_drift_status_summary(&self) -> &::std::option::Option<crate::types::DriftStatusSummary> {
        &self.drift_status_summary
    }
    /// Consumes the builder and constructs a [`EnabledControlDetails`](crate::types::EnabledControlDetails).
    pub fn build(self) -> crate::types::EnabledControlDetails {
        crate::types::EnabledControlDetails {
            arn: self.arn,
            control_identifier: self.control_identifier,
            target_identifier: self.target_identifier,
            target_regions: self.target_regions,
            status_summary: self.status_summary,
            drift_status_summary: self.drift_status_summary,
        }
    }
}