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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeStackDriftDetectionStatusOutput {
    /// <p>The ID of the stack.</p>
    pub stack_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the drift detection results of this operation.</p>
    /// <p>CloudFormation generates new results, with a new drift detection ID, each time this operation is run. However, the number of reports CloudFormation retains for any given stack, and for how long, may vary.</p>
    pub stack_drift_detection_id: ::std::option::Option<::std::string::String>,
    /// <p>Status of the stack's actual configuration compared to its expected configuration.</p>
    /// <ul>
    /// <li>
    /// <p><code>DRIFTED</code>: The stack differs from its expected template configuration. A stack is considered to have drifted if one or more of its resources have drifted.</p></li>
    /// <li>
    /// <p><code>NOT_CHECKED</code>: CloudFormation hasn't checked if the stack differs from its expected template configuration.</p></li>
    /// <li>
    /// <p><code>IN_SYNC</code>: The stack's actual configuration matches its expected template configuration.</p></li>
    /// <li>
    /// <p><code>UNKNOWN</code>: This value is reserved for future use.</p></li>
    /// </ul>
    pub stack_drift_status: ::std::option::Option<crate::types::StackDriftStatus>,
    /// <p>The status of the stack drift detection operation.</p>
    /// <ul>
    /// <li>
    /// <p><code>DETECTION_COMPLETE</code>: The stack drift detection operation has successfully completed for all resources in the stack that support drift detection. (Resources that don't currently support stack detection remain unchecked.)</p>
    /// <p>If you specified logical resource IDs for CloudFormation to use as a filter for the stack drift detection operation, only the resources with those logical IDs are checked for drift.</p></li>
    /// <li>
    /// <p><code>DETECTION_FAILED</code>: The stack drift detection operation has failed for at least one resource in the stack. Results will be available for resources on which CloudFormation successfully completed drift detection.</p></li>
    /// <li>
    /// <p><code>DETECTION_IN_PROGRESS</code>: The stack drift detection operation is currently in progress.</p></li>
    /// </ul>
    pub detection_status: ::std::option::Option<crate::types::StackDriftDetectionStatus>,
    /// <p>The reason the stack drift detection operation has its current status.</p>
    pub detection_status_reason: ::std::option::Option<::std::string::String>,
    /// <p>Total number of stack resources that have drifted. This is NULL until the drift detection operation reaches a status of <code>DETECTION_COMPLETE</code>. This value will be 0 for stacks whose drift status is <code>IN_SYNC</code>.</p>
    pub drifted_stack_resource_count: ::std::option::Option<i32>,
    /// <p>Time at which the stack drift detection operation was initiated.</p>
    pub timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl DescribeStackDriftDetectionStatusOutput {
    /// <p>The ID of the stack.</p>
    pub fn stack_id(&self) -> ::std::option::Option<&str> {
        self.stack_id.as_deref()
    }
    /// <p>The ID of the drift detection results of this operation.</p>
    /// <p>CloudFormation generates new results, with a new drift detection ID, each time this operation is run. However, the number of reports CloudFormation retains for any given stack, and for how long, may vary.</p>
    pub fn stack_drift_detection_id(&self) -> ::std::option::Option<&str> {
        self.stack_drift_detection_id.as_deref()
    }
    /// <p>Status of the stack's actual configuration compared to its expected configuration.</p>
    /// <ul>
    /// <li>
    /// <p><code>DRIFTED</code>: The stack differs from its expected template configuration. A stack is considered to have drifted if one or more of its resources have drifted.</p></li>
    /// <li>
    /// <p><code>NOT_CHECKED</code>: CloudFormation hasn't checked if the stack differs from its expected template configuration.</p></li>
    /// <li>
    /// <p><code>IN_SYNC</code>: The stack's actual configuration matches its expected template configuration.</p></li>
    /// <li>
    /// <p><code>UNKNOWN</code>: This value is reserved for future use.</p></li>
    /// </ul>
    pub fn stack_drift_status(&self) -> ::std::option::Option<&crate::types::StackDriftStatus> {
        self.stack_drift_status.as_ref()
    }
    /// <p>The status of the stack drift detection operation.</p>
    /// <ul>
    /// <li>
    /// <p><code>DETECTION_COMPLETE</code>: The stack drift detection operation has successfully completed for all resources in the stack that support drift detection. (Resources that don't currently support stack detection remain unchecked.)</p>
    /// <p>If you specified logical resource IDs for CloudFormation to use as a filter for the stack drift detection operation, only the resources with those logical IDs are checked for drift.</p></li>
    /// <li>
    /// <p><code>DETECTION_FAILED</code>: The stack drift detection operation has failed for at least one resource in the stack. Results will be available for resources on which CloudFormation successfully completed drift detection.</p></li>
    /// <li>
    /// <p><code>DETECTION_IN_PROGRESS</code>: The stack drift detection operation is currently in progress.</p></li>
    /// </ul>
    pub fn detection_status(&self) -> ::std::option::Option<&crate::types::StackDriftDetectionStatus> {
        self.detection_status.as_ref()
    }
    /// <p>The reason the stack drift detection operation has its current status.</p>
    pub fn detection_status_reason(&self) -> ::std::option::Option<&str> {
        self.detection_status_reason.as_deref()
    }
    /// <p>Total number of stack resources that have drifted. This is NULL until the drift detection operation reaches a status of <code>DETECTION_COMPLETE</code>. This value will be 0 for stacks whose drift status is <code>IN_SYNC</code>.</p>
    pub fn drifted_stack_resource_count(&self) -> ::std::option::Option<i32> {
        self.drifted_stack_resource_count
    }
    /// <p>Time at which the stack drift detection operation was initiated.</p>
    pub fn timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.timestamp.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeStackDriftDetectionStatusOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeStackDriftDetectionStatusOutput {
    /// Creates a new builder-style object to manufacture [`DescribeStackDriftDetectionStatusOutput`](crate::operation::describe_stack_drift_detection_status::DescribeStackDriftDetectionStatusOutput).
    pub fn builder() -> crate::operation::describe_stack_drift_detection_status::builders::DescribeStackDriftDetectionStatusOutputBuilder {
        crate::operation::describe_stack_drift_detection_status::builders::DescribeStackDriftDetectionStatusOutputBuilder::default()
    }
}

/// A builder for [`DescribeStackDriftDetectionStatusOutput`](crate::operation::describe_stack_drift_detection_status::DescribeStackDriftDetectionStatusOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DescribeStackDriftDetectionStatusOutputBuilder {
    pub(crate) stack_id: ::std::option::Option<::std::string::String>,
    pub(crate) stack_drift_detection_id: ::std::option::Option<::std::string::String>,
    pub(crate) stack_drift_status: ::std::option::Option<crate::types::StackDriftStatus>,
    pub(crate) detection_status: ::std::option::Option<crate::types::StackDriftDetectionStatus>,
    pub(crate) detection_status_reason: ::std::option::Option<::std::string::String>,
    pub(crate) drifted_stack_resource_count: ::std::option::Option<i32>,
    pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl DescribeStackDriftDetectionStatusOutputBuilder {
    /// <p>The ID of the stack.</p>
    /// This field is required.
    pub fn stack_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.stack_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the stack.</p>
    pub fn set_stack_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.stack_id = input;
        self
    }
    /// <p>The ID of the stack.</p>
    pub fn get_stack_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.stack_id
    }
    /// <p>The ID of the drift detection results of this operation.</p>
    /// <p>CloudFormation generates new results, with a new drift detection ID, each time this operation is run. However, the number of reports CloudFormation retains for any given stack, and for how long, may vary.</p>
    /// This field is required.
    pub fn stack_drift_detection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.stack_drift_detection_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the drift detection results of this operation.</p>
    /// <p>CloudFormation generates new results, with a new drift detection ID, each time this operation is run. However, the number of reports CloudFormation retains for any given stack, and for how long, may vary.</p>
    pub fn set_stack_drift_detection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.stack_drift_detection_id = input;
        self
    }
    /// <p>The ID of the drift detection results of this operation.</p>
    /// <p>CloudFormation generates new results, with a new drift detection ID, each time this operation is run. However, the number of reports CloudFormation retains for any given stack, and for how long, may vary.</p>
    pub fn get_stack_drift_detection_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.stack_drift_detection_id
    }
    /// <p>Status of the stack's actual configuration compared to its expected configuration.</p>
    /// <ul>
    /// <li>
    /// <p><code>DRIFTED</code>: The stack differs from its expected template configuration. A stack is considered to have drifted if one or more of its resources have drifted.</p></li>
    /// <li>
    /// <p><code>NOT_CHECKED</code>: CloudFormation hasn't checked if the stack differs from its expected template configuration.</p></li>
    /// <li>
    /// <p><code>IN_SYNC</code>: The stack's actual configuration matches its expected template configuration.</p></li>
    /// <li>
    /// <p><code>UNKNOWN</code>: This value is reserved for future use.</p></li>
    /// </ul>
    pub fn stack_drift_status(mut self, input: crate::types::StackDriftStatus) -> Self {
        self.stack_drift_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Status of the stack's actual configuration compared to its expected configuration.</p>
    /// <ul>
    /// <li>
    /// <p><code>DRIFTED</code>: The stack differs from its expected template configuration. A stack is considered to have drifted if one or more of its resources have drifted.</p></li>
    /// <li>
    /// <p><code>NOT_CHECKED</code>: CloudFormation hasn't checked if the stack differs from its expected template configuration.</p></li>
    /// <li>
    /// <p><code>IN_SYNC</code>: The stack's actual configuration matches its expected template configuration.</p></li>
    /// <li>
    /// <p><code>UNKNOWN</code>: This value is reserved for future use.</p></li>
    /// </ul>
    pub fn set_stack_drift_status(mut self, input: ::std::option::Option<crate::types::StackDriftStatus>) -> Self {
        self.stack_drift_status = input;
        self
    }
    /// <p>Status of the stack's actual configuration compared to its expected configuration.</p>
    /// <ul>
    /// <li>
    /// <p><code>DRIFTED</code>: The stack differs from its expected template configuration. A stack is considered to have drifted if one or more of its resources have drifted.</p></li>
    /// <li>
    /// <p><code>NOT_CHECKED</code>: CloudFormation hasn't checked if the stack differs from its expected template configuration.</p></li>
    /// <li>
    /// <p><code>IN_SYNC</code>: The stack's actual configuration matches its expected template configuration.</p></li>
    /// <li>
    /// <p><code>UNKNOWN</code>: This value is reserved for future use.</p></li>
    /// </ul>
    pub fn get_stack_drift_status(&self) -> &::std::option::Option<crate::types::StackDriftStatus> {
        &self.stack_drift_status
    }
    /// <p>The status of the stack drift detection operation.</p>
    /// <ul>
    /// <li>
    /// <p><code>DETECTION_COMPLETE</code>: The stack drift detection operation has successfully completed for all resources in the stack that support drift detection. (Resources that don't currently support stack detection remain unchecked.)</p>
    /// <p>If you specified logical resource IDs for CloudFormation to use as a filter for the stack drift detection operation, only the resources with those logical IDs are checked for drift.</p></li>
    /// <li>
    /// <p><code>DETECTION_FAILED</code>: The stack drift detection operation has failed for at least one resource in the stack. Results will be available for resources on which CloudFormation successfully completed drift detection.</p></li>
    /// <li>
    /// <p><code>DETECTION_IN_PROGRESS</code>: The stack drift detection operation is currently in progress.</p></li>
    /// </ul>
    /// This field is required.
    pub fn detection_status(mut self, input: crate::types::StackDriftDetectionStatus) -> Self {
        self.detection_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the stack drift detection operation.</p>
    /// <ul>
    /// <li>
    /// <p><code>DETECTION_COMPLETE</code>: The stack drift detection operation has successfully completed for all resources in the stack that support drift detection. (Resources that don't currently support stack detection remain unchecked.)</p>
    /// <p>If you specified logical resource IDs for CloudFormation to use as a filter for the stack drift detection operation, only the resources with those logical IDs are checked for drift.</p></li>
    /// <li>
    /// <p><code>DETECTION_FAILED</code>: The stack drift detection operation has failed for at least one resource in the stack. Results will be available for resources on which CloudFormation successfully completed drift detection.</p></li>
    /// <li>
    /// <p><code>DETECTION_IN_PROGRESS</code>: The stack drift detection operation is currently in progress.</p></li>
    /// </ul>
    pub fn set_detection_status(mut self, input: ::std::option::Option<crate::types::StackDriftDetectionStatus>) -> Self {
        self.detection_status = input;
        self
    }
    /// <p>The status of the stack drift detection operation.</p>
    /// <ul>
    /// <li>
    /// <p><code>DETECTION_COMPLETE</code>: The stack drift detection operation has successfully completed for all resources in the stack that support drift detection. (Resources that don't currently support stack detection remain unchecked.)</p>
    /// <p>If you specified logical resource IDs for CloudFormation to use as a filter for the stack drift detection operation, only the resources with those logical IDs are checked for drift.</p></li>
    /// <li>
    /// <p><code>DETECTION_FAILED</code>: The stack drift detection operation has failed for at least one resource in the stack. Results will be available for resources on which CloudFormation successfully completed drift detection.</p></li>
    /// <li>
    /// <p><code>DETECTION_IN_PROGRESS</code>: The stack drift detection operation is currently in progress.</p></li>
    /// </ul>
    pub fn get_detection_status(&self) -> &::std::option::Option<crate::types::StackDriftDetectionStatus> {
        &self.detection_status
    }
    /// <p>The reason the stack drift detection operation has its current status.</p>
    pub fn detection_status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.detection_status_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reason the stack drift detection operation has its current status.</p>
    pub fn set_detection_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.detection_status_reason = input;
        self
    }
    /// <p>The reason the stack drift detection operation has its current status.</p>
    pub fn get_detection_status_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.detection_status_reason
    }
    /// <p>Total number of stack resources that have drifted. This is NULL until the drift detection operation reaches a status of <code>DETECTION_COMPLETE</code>. This value will be 0 for stacks whose drift status is <code>IN_SYNC</code>.</p>
    pub fn drifted_stack_resource_count(mut self, input: i32) -> Self {
        self.drifted_stack_resource_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>Total number of stack resources that have drifted. This is NULL until the drift detection operation reaches a status of <code>DETECTION_COMPLETE</code>. This value will be 0 for stacks whose drift status is <code>IN_SYNC</code>.</p>
    pub fn set_drifted_stack_resource_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.drifted_stack_resource_count = input;
        self
    }
    /// <p>Total number of stack resources that have drifted. This is NULL until the drift detection operation reaches a status of <code>DETECTION_COMPLETE</code>. This value will be 0 for stacks whose drift status is <code>IN_SYNC</code>.</p>
    pub fn get_drifted_stack_resource_count(&self) -> &::std::option::Option<i32> {
        &self.drifted_stack_resource_count
    }
    /// <p>Time at which the stack drift detection operation was initiated.</p>
    /// This field is required.
    pub fn timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>Time at which the stack drift detection operation was initiated.</p>
    pub fn set_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.timestamp = input;
        self
    }
    /// <p>Time at which the stack drift detection operation was initiated.</p>
    pub fn get_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.timestamp
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DescribeStackDriftDetectionStatusOutput`](crate::operation::describe_stack_drift_detection_status::DescribeStackDriftDetectionStatusOutput).
    pub fn build(self) -> crate::operation::describe_stack_drift_detection_status::DescribeStackDriftDetectionStatusOutput {
        crate::operation::describe_stack_drift_detection_status::DescribeStackDriftDetectionStatusOutput {
            stack_id: self.stack_id,
            stack_drift_detection_id: self.stack_drift_detection_id,
            stack_drift_status: self.stack_drift_status,
            detection_status: self.detection_status,
            detection_status_reason: self.detection_status_reason,
            drifted_stack_resource_count: self.drifted_stack_resource_count,
            timestamp: self.timestamp,
            _request_id: self._request_id,
        }
    }
}