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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The structure that contains information about a specified operation's results for a given account in a given Region.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StackSetOperationResultSummary {
    /// <p>[Self-managed permissions] The name of the Amazon Web Services account for this operation result.</p>
    pub account: ::std::option::Option<::std::string::String>,
    /// <p>The name of the Amazon Web Services Region for this operation result.</p>
    pub region: ::std::option::Option<::std::string::String>,
    /// <p>The result status of the stack set operation for the given account in the given Region.</p>
    /// <ul>
    /// <li>
    /// <p><code>CANCELLED</code>: The operation in the specified account and Region has been canceled. This is either because a user has stopped the stack set operation, or because the failure tolerance of the stack set operation has been exceeded.</p></li>
    /// <li>
    /// <p><code>FAILED</code>: The operation in the specified account and Region failed.</p>
    /// <p>If the stack set operation fails in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.</p></li>
    /// <li>
    /// <p><code>RUNNING</code>: The operation in the specified account and Region is currently in progress.</p></li>
    /// <li>
    /// <p><code>PENDING</code>: The operation in the specified account and Region has yet to start.</p></li>
    /// <li>
    /// <p><code>SUCCEEDED</code>: The operation in the specified account and Region completed successfully.</p></li>
    /// </ul>
    pub status: ::std::option::Option<crate::types::StackSetOperationResultStatus>,
    /// <p>The reason for the assigned result status.</p>
    pub status_reason: ::std::option::Option<::std::string::String>,
    /// <p>The results of the account gate function CloudFormation invokes, if present, before proceeding with stack set operations in an account.</p>
    pub account_gate_result: ::std::option::Option<crate::types::AccountGateResult>,
    /// <p>[Service-managed permissions] The organization root ID or organizational unit (OU) IDs that you specified for <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html">DeploymentTargets</a>.</p>
    pub organizational_unit_id: ::std::option::Option<::std::string::String>,
}
impl StackSetOperationResultSummary {
    /// <p>[Self-managed permissions] The name of the Amazon Web Services account for this operation result.</p>
    pub fn account(&self) -> ::std::option::Option<&str> {
        self.account.as_deref()
    }
    /// <p>The name of the Amazon Web Services Region for this operation result.</p>
    pub fn region(&self) -> ::std::option::Option<&str> {
        self.region.as_deref()
    }
    /// <p>The result status of the stack set operation for the given account in the given Region.</p>
    /// <ul>
    /// <li>
    /// <p><code>CANCELLED</code>: The operation in the specified account and Region has been canceled. This is either because a user has stopped the stack set operation, or because the failure tolerance of the stack set operation has been exceeded.</p></li>
    /// <li>
    /// <p><code>FAILED</code>: The operation in the specified account and Region failed.</p>
    /// <p>If the stack set operation fails in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.</p></li>
    /// <li>
    /// <p><code>RUNNING</code>: The operation in the specified account and Region is currently in progress.</p></li>
    /// <li>
    /// <p><code>PENDING</code>: The operation in the specified account and Region has yet to start.</p></li>
    /// <li>
    /// <p><code>SUCCEEDED</code>: The operation in the specified account and Region completed successfully.</p></li>
    /// </ul>
    pub fn status(&self) -> ::std::option::Option<&crate::types::StackSetOperationResultStatus> {
        self.status.as_ref()
    }
    /// <p>The reason for the assigned result status.</p>
    pub fn status_reason(&self) -> ::std::option::Option<&str> {
        self.status_reason.as_deref()
    }
    /// <p>The results of the account gate function CloudFormation invokes, if present, before proceeding with stack set operations in an account.</p>
    pub fn account_gate_result(&self) -> ::std::option::Option<&crate::types::AccountGateResult> {
        self.account_gate_result.as_ref()
    }
    /// <p>[Service-managed permissions] The organization root ID or organizational unit (OU) IDs that you specified for <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html">DeploymentTargets</a>.</p>
    pub fn organizational_unit_id(&self) -> ::std::option::Option<&str> {
        self.organizational_unit_id.as_deref()
    }
}
impl StackSetOperationResultSummary {
    /// Creates a new builder-style object to manufacture [`StackSetOperationResultSummary`](crate::types::StackSetOperationResultSummary).
    pub fn builder() -> crate::types::builders::StackSetOperationResultSummaryBuilder {
        crate::types::builders::StackSetOperationResultSummaryBuilder::default()
    }
}

/// A builder for [`StackSetOperationResultSummary`](crate::types::StackSetOperationResultSummary).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct StackSetOperationResultSummaryBuilder {
    pub(crate) account: ::std::option::Option<::std::string::String>,
    pub(crate) region: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::StackSetOperationResultStatus>,
    pub(crate) status_reason: ::std::option::Option<::std::string::String>,
    pub(crate) account_gate_result: ::std::option::Option<crate::types::AccountGateResult>,
    pub(crate) organizational_unit_id: ::std::option::Option<::std::string::String>,
}
impl StackSetOperationResultSummaryBuilder {
    /// <p>[Self-managed permissions] The name of the Amazon Web Services account for this operation result.</p>
    pub fn account(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>[Self-managed permissions] The name of the Amazon Web Services account for this operation result.</p>
    pub fn set_account(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account = input;
        self
    }
    /// <p>[Self-managed permissions] The name of the Amazon Web Services account for this operation result.</p>
    pub fn get_account(&self) -> &::std::option::Option<::std::string::String> {
        &self.account
    }
    /// <p>The name of the Amazon Web Services Region for this operation result.</p>
    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Amazon Web Services Region for this operation result.</p>
    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.region = input;
        self
    }
    /// <p>The name of the Amazon Web Services Region for this operation result.</p>
    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.region
    }
    /// <p>The result status of the stack set operation for the given account in the given Region.</p>
    /// <ul>
    /// <li>
    /// <p><code>CANCELLED</code>: The operation in the specified account and Region has been canceled. This is either because a user has stopped the stack set operation, or because the failure tolerance of the stack set operation has been exceeded.</p></li>
    /// <li>
    /// <p><code>FAILED</code>: The operation in the specified account and Region failed.</p>
    /// <p>If the stack set operation fails in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.</p></li>
    /// <li>
    /// <p><code>RUNNING</code>: The operation in the specified account and Region is currently in progress.</p></li>
    /// <li>
    /// <p><code>PENDING</code>: The operation in the specified account and Region has yet to start.</p></li>
    /// <li>
    /// <p><code>SUCCEEDED</code>: The operation in the specified account and Region completed successfully.</p></li>
    /// </ul>
    pub fn status(mut self, input: crate::types::StackSetOperationResultStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The result status of the stack set operation for the given account in the given Region.</p>
    /// <ul>
    /// <li>
    /// <p><code>CANCELLED</code>: The operation in the specified account and Region has been canceled. This is either because a user has stopped the stack set operation, or because the failure tolerance of the stack set operation has been exceeded.</p></li>
    /// <li>
    /// <p><code>FAILED</code>: The operation in the specified account and Region failed.</p>
    /// <p>If the stack set operation fails in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.</p></li>
    /// <li>
    /// <p><code>RUNNING</code>: The operation in the specified account and Region is currently in progress.</p></li>
    /// <li>
    /// <p><code>PENDING</code>: The operation in the specified account and Region has yet to start.</p></li>
    /// <li>
    /// <p><code>SUCCEEDED</code>: The operation in the specified account and Region completed successfully.</p></li>
    /// </ul>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::StackSetOperationResultStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The result status of the stack set operation for the given account in the given Region.</p>
    /// <ul>
    /// <li>
    /// <p><code>CANCELLED</code>: The operation in the specified account and Region has been canceled. This is either because a user has stopped the stack set operation, or because the failure tolerance of the stack set operation has been exceeded.</p></li>
    /// <li>
    /// <p><code>FAILED</code>: The operation in the specified account and Region failed.</p>
    /// <p>If the stack set operation fails in enough accounts within a Region, the failure tolerance for the stack set operation as a whole might be exceeded.</p></li>
    /// <li>
    /// <p><code>RUNNING</code>: The operation in the specified account and Region is currently in progress.</p></li>
    /// <li>
    /// <p><code>PENDING</code>: The operation in the specified account and Region has yet to start.</p></li>
    /// <li>
    /// <p><code>SUCCEEDED</code>: The operation in the specified account and Region completed successfully.</p></li>
    /// </ul>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::StackSetOperationResultStatus> {
        &self.status
    }
    /// <p>The reason for the assigned result status.</p>
    pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reason for the assigned result status.</p>
    pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_reason = input;
        self
    }
    /// <p>The reason for the assigned result status.</p>
    pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_reason
    }
    /// <p>The results of the account gate function CloudFormation invokes, if present, before proceeding with stack set operations in an account.</p>
    pub fn account_gate_result(mut self, input: crate::types::AccountGateResult) -> Self {
        self.account_gate_result = ::std::option::Option::Some(input);
        self
    }
    /// <p>The results of the account gate function CloudFormation invokes, if present, before proceeding with stack set operations in an account.</p>
    pub fn set_account_gate_result(mut self, input: ::std::option::Option<crate::types::AccountGateResult>) -> Self {
        self.account_gate_result = input;
        self
    }
    /// <p>The results of the account gate function CloudFormation invokes, if present, before proceeding with stack set operations in an account.</p>
    pub fn get_account_gate_result(&self) -> &::std::option::Option<crate::types::AccountGateResult> {
        &self.account_gate_result
    }
    /// <p>[Service-managed permissions] The organization root ID or organizational unit (OU) IDs that you specified for <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html">DeploymentTargets</a>.</p>
    pub fn organizational_unit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.organizational_unit_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>[Service-managed permissions] The organization root ID or organizational unit (OU) IDs that you specified for <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html">DeploymentTargets</a>.</p>
    pub fn set_organizational_unit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.organizational_unit_id = input;
        self
    }
    /// <p>[Service-managed permissions] The organization root ID or organizational unit (OU) IDs that you specified for <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html">DeploymentTargets</a>.</p>
    pub fn get_organizational_unit_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.organizational_unit_id
    }
    /// Consumes the builder and constructs a [`StackSetOperationResultSummary`](crate::types::StackSetOperationResultSummary).
    pub fn build(self) -> crate::types::StackSetOperationResultSummary {
        crate::types::StackSetOperationResultSummary {
            account: self.account,
            region: self.region,
            status: self.status,
            status_reason: self.status_reason,
            account_gate_result: self.account_gate_result,
            organizational_unit_id: self.organizational_unit_id,
        }
    }
}