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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents the current status of a resource operation request. For more information, see <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html">Managing resource operation requests</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct ProgressEvent {
    /// <p>The name of the resource type used in the operation.</p>
    pub type_name: ::std::option::Option<::std::string::String>,
    /// <p>The primary identifier for the resource.</p> <note>
    /// <p>In some cases, the resource identifier may be available before the resource operation has reached a status of <code>SUCCESS</code>.</p>
    /// </note>
    pub identifier: ::std::option::Option<::std::string::String>,
    /// <p>The unique token representing this resource operation request.</p>
    /// <p>Use the <code>RequestToken</code> with <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html">GetResourceRequestStatus</a> to return the current status of a resource operation request.</p>
    pub request_token: ::std::option::Option<::std::string::String>,
    /// <p>The resource operation type.</p>
    pub operation: ::std::option::Option<crate::types::Operation>,
    /// <p>The current status of the resource operation request.</p>
    /// <ul>
    /// <li> <p> <code>PENDING</code>: The resource operation hasn't yet started.</p> </li>
    /// <li> <p> <code>IN_PROGRESS</code>: The resource operation is currently in progress.</p> </li>
    /// <li> <p> <code>SUCCESS</code>: The resource operation has successfully completed.</p> </li>
    /// <li> <p> <code>FAILED</code>: The resource operation has failed. Refer to the error code and status message for more information.</p> </li>
    /// <li> <p> <code>CANCEL_IN_PROGRESS</code>: The resource operation is in the process of being canceled.</p> </li>
    /// <li> <p> <code>CANCEL_COMPLETE</code>: The resource operation has been canceled.</p> </li>
    /// </ul>
    pub operation_status: ::std::option::Option<crate::types::OperationStatus>,
    /// <p>When the resource operation request was initiated.</p>
    pub event_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A JSON string containing the resource model, consisting of each resource property and its current value.</p>
    pub resource_model: ::std::option::Option<::std::string::String>,
    /// <p>Any message explaining the current status.</p>
    pub status_message: ::std::option::Option<::std::string::String>,
    /// <p>For requests with a status of <code>FAILED</code>, the associated error code.</p>
    /// <p>For error code definitions, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-test-contract-errors.html">Handler error codes</a> in the <i>CloudFormation Command Line Interface User Guide for Extension Development</i>.</p>
    pub error_code: ::std::option::Option<crate::types::HandlerErrorCode>,
    /// <p>When to next request the status of this resource operation request.</p>
    pub retry_after: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ProgressEvent {
    /// <p>The name of the resource type used in the operation.</p>
    pub fn type_name(&self) -> ::std::option::Option<&str> {
        self.type_name.as_deref()
    }
    /// <p>The primary identifier for the resource.</p> <note>
    /// <p>In some cases, the resource identifier may be available before the resource operation has reached a status of <code>SUCCESS</code>.</p>
    /// </note>
    pub fn identifier(&self) -> ::std::option::Option<&str> {
        self.identifier.as_deref()
    }
    /// <p>The unique token representing this resource operation request.</p>
    /// <p>Use the <code>RequestToken</code> with <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html">GetResourceRequestStatus</a> to return the current status of a resource operation request.</p>
    pub fn request_token(&self) -> ::std::option::Option<&str> {
        self.request_token.as_deref()
    }
    /// <p>The resource operation type.</p>
    pub fn operation(&self) -> ::std::option::Option<&crate::types::Operation> {
        self.operation.as_ref()
    }
    /// <p>The current status of the resource operation request.</p>
    /// <ul>
    /// <li> <p> <code>PENDING</code>: The resource operation hasn't yet started.</p> </li>
    /// <li> <p> <code>IN_PROGRESS</code>: The resource operation is currently in progress.</p> </li>
    /// <li> <p> <code>SUCCESS</code>: The resource operation has successfully completed.</p> </li>
    /// <li> <p> <code>FAILED</code>: The resource operation has failed. Refer to the error code and status message for more information.</p> </li>
    /// <li> <p> <code>CANCEL_IN_PROGRESS</code>: The resource operation is in the process of being canceled.</p> </li>
    /// <li> <p> <code>CANCEL_COMPLETE</code>: The resource operation has been canceled.</p> </li>
    /// </ul>
    pub fn operation_status(&self) -> ::std::option::Option<&crate::types::OperationStatus> {
        self.operation_status.as_ref()
    }
    /// <p>When the resource operation request was initiated.</p>
    pub fn event_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.event_time.as_ref()
    }
    /// <p>A JSON string containing the resource model, consisting of each resource property and its current value.</p>
    pub fn resource_model(&self) -> ::std::option::Option<&str> {
        self.resource_model.as_deref()
    }
    /// <p>Any message explaining the current status.</p>
    pub fn status_message(&self) -> ::std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>For requests with a status of <code>FAILED</code>, the associated error code.</p>
    /// <p>For error code definitions, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-test-contract-errors.html">Handler error codes</a> in the <i>CloudFormation Command Line Interface User Guide for Extension Development</i>.</p>
    pub fn error_code(&self) -> ::std::option::Option<&crate::types::HandlerErrorCode> {
        self.error_code.as_ref()
    }
    /// <p>When to next request the status of this resource operation request.</p>
    pub fn retry_after(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.retry_after.as_ref()
    }
}
impl ::std::fmt::Debug for ProgressEvent {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ProgressEvent");
        formatter.field("type_name", &self.type_name);
        formatter.field("identifier", &self.identifier);
        formatter.field("request_token", &self.request_token);
        formatter.field("operation", &self.operation);
        formatter.field("operation_status", &self.operation_status);
        formatter.field("event_time", &self.event_time);
        formatter.field("resource_model", &"*** Sensitive Data Redacted ***");
        formatter.field("status_message", &self.status_message);
        formatter.field("error_code", &self.error_code);
        formatter.field("retry_after", &self.retry_after);
        formatter.finish()
    }
}
impl ProgressEvent {
    /// Creates a new builder-style object to manufacture [`ProgressEvent`](crate::types::ProgressEvent).
    pub fn builder() -> crate::types::builders::ProgressEventBuilder {
        crate::types::builders::ProgressEventBuilder::default()
    }
}

/// A builder for [`ProgressEvent`](crate::types::ProgressEvent).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct ProgressEventBuilder {
    pub(crate) type_name: ::std::option::Option<::std::string::String>,
    pub(crate) identifier: ::std::option::Option<::std::string::String>,
    pub(crate) request_token: ::std::option::Option<::std::string::String>,
    pub(crate) operation: ::std::option::Option<crate::types::Operation>,
    pub(crate) operation_status: ::std::option::Option<crate::types::OperationStatus>,
    pub(crate) event_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) resource_model: ::std::option::Option<::std::string::String>,
    pub(crate) status_message: ::std::option::Option<::std::string::String>,
    pub(crate) error_code: ::std::option::Option<crate::types::HandlerErrorCode>,
    pub(crate) retry_after: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ProgressEventBuilder {
    /// <p>The name of the resource type used in the operation.</p>
    pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.type_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the resource type used in the operation.</p>
    pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.type_name = input;
        self
    }
    /// <p>The name of the resource type used in the operation.</p>
    pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.type_name
    }
    /// <p>The primary identifier for the resource.</p> <note>
    /// <p>In some cases, the resource identifier may be available before the resource operation has reached a status of <code>SUCCESS</code>.</p>
    /// </note>
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The primary identifier for the resource.</p> <note>
    /// <p>In some cases, the resource identifier may be available before the resource operation has reached a status of <code>SUCCESS</code>.</p>
    /// </note>
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identifier = input;
        self
    }
    /// <p>The primary identifier for the resource.</p> <note>
    /// <p>In some cases, the resource identifier may be available before the resource operation has reached a status of <code>SUCCESS</code>.</p>
    /// </note>
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.identifier
    }
    /// <p>The unique token representing this resource operation request.</p>
    /// <p>Use the <code>RequestToken</code> with <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html">GetResourceRequestStatus</a> to return the current status of a resource operation request.</p>
    pub fn request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.request_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique token representing this resource operation request.</p>
    /// <p>Use the <code>RequestToken</code> with <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html">GetResourceRequestStatus</a> to return the current status of a resource operation request.</p>
    pub fn set_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.request_token = input;
        self
    }
    /// <p>The unique token representing this resource operation request.</p>
    /// <p>Use the <code>RequestToken</code> with <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html">GetResourceRequestStatus</a> to return the current status of a resource operation request.</p>
    pub fn get_request_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.request_token
    }
    /// <p>The resource operation type.</p>
    pub fn operation(mut self, input: crate::types::Operation) -> Self {
        self.operation = ::std::option::Option::Some(input);
        self
    }
    /// <p>The resource operation type.</p>
    pub fn set_operation(mut self, input: ::std::option::Option<crate::types::Operation>) -> Self {
        self.operation = input;
        self
    }
    /// <p>The resource operation type.</p>
    pub fn get_operation(&self) -> &::std::option::Option<crate::types::Operation> {
        &self.operation
    }
    /// <p>The current status of the resource operation request.</p>
    /// <ul>
    /// <li> <p> <code>PENDING</code>: The resource operation hasn't yet started.</p> </li>
    /// <li> <p> <code>IN_PROGRESS</code>: The resource operation is currently in progress.</p> </li>
    /// <li> <p> <code>SUCCESS</code>: The resource operation has successfully completed.</p> </li>
    /// <li> <p> <code>FAILED</code>: The resource operation has failed. Refer to the error code and status message for more information.</p> </li>
    /// <li> <p> <code>CANCEL_IN_PROGRESS</code>: The resource operation is in the process of being canceled.</p> </li>
    /// <li> <p> <code>CANCEL_COMPLETE</code>: The resource operation has been canceled.</p> </li>
    /// </ul>
    pub fn operation_status(mut self, input: crate::types::OperationStatus) -> Self {
        self.operation_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the resource operation request.</p>
    /// <ul>
    /// <li> <p> <code>PENDING</code>: The resource operation hasn't yet started.</p> </li>
    /// <li> <p> <code>IN_PROGRESS</code>: The resource operation is currently in progress.</p> </li>
    /// <li> <p> <code>SUCCESS</code>: The resource operation has successfully completed.</p> </li>
    /// <li> <p> <code>FAILED</code>: The resource operation has failed. Refer to the error code and status message for more information.</p> </li>
    /// <li> <p> <code>CANCEL_IN_PROGRESS</code>: The resource operation is in the process of being canceled.</p> </li>
    /// <li> <p> <code>CANCEL_COMPLETE</code>: The resource operation has been canceled.</p> </li>
    /// </ul>
    pub fn set_operation_status(mut self, input: ::std::option::Option<crate::types::OperationStatus>) -> Self {
        self.operation_status = input;
        self
    }
    /// <p>The current status of the resource operation request.</p>
    /// <ul>
    /// <li> <p> <code>PENDING</code>: The resource operation hasn't yet started.</p> </li>
    /// <li> <p> <code>IN_PROGRESS</code>: The resource operation is currently in progress.</p> </li>
    /// <li> <p> <code>SUCCESS</code>: The resource operation has successfully completed.</p> </li>
    /// <li> <p> <code>FAILED</code>: The resource operation has failed. Refer to the error code and status message for more information.</p> </li>
    /// <li> <p> <code>CANCEL_IN_PROGRESS</code>: The resource operation is in the process of being canceled.</p> </li>
    /// <li> <p> <code>CANCEL_COMPLETE</code>: The resource operation has been canceled.</p> </li>
    /// </ul>
    pub fn get_operation_status(&self) -> &::std::option::Option<crate::types::OperationStatus> {
        &self.operation_status
    }
    /// <p>When the resource operation request was initiated.</p>
    pub fn event_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.event_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>When the resource operation request was initiated.</p>
    pub fn set_event_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.event_time = input;
        self
    }
    /// <p>When the resource operation request was initiated.</p>
    pub fn get_event_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.event_time
    }
    /// <p>A JSON string containing the resource model, consisting of each resource property and its current value.</p>
    pub fn resource_model(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_model = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A JSON string containing the resource model, consisting of each resource property and its current value.</p>
    pub fn set_resource_model(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_model = input;
        self
    }
    /// <p>A JSON string containing the resource model, consisting of each resource property and its current value.</p>
    pub fn get_resource_model(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_model
    }
    /// <p>Any message explaining the current status.</p>
    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Any message explaining the current status.</p>
    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_message = input;
        self
    }
    /// <p>Any message explaining the current status.</p>
    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_message
    }
    /// <p>For requests with a status of <code>FAILED</code>, the associated error code.</p>
    /// <p>For error code definitions, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-test-contract-errors.html">Handler error codes</a> in the <i>CloudFormation Command Line Interface User Guide for Extension Development</i>.</p>
    pub fn error_code(mut self, input: crate::types::HandlerErrorCode) -> Self {
        self.error_code = ::std::option::Option::Some(input);
        self
    }
    /// <p>For requests with a status of <code>FAILED</code>, the associated error code.</p>
    /// <p>For error code definitions, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-test-contract-errors.html">Handler error codes</a> in the <i>CloudFormation Command Line Interface User Guide for Extension Development</i>.</p>
    pub fn set_error_code(mut self, input: ::std::option::Option<crate::types::HandlerErrorCode>) -> Self {
        self.error_code = input;
        self
    }
    /// <p>For requests with a status of <code>FAILED</code>, the associated error code.</p>
    /// <p>For error code definitions, see <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-test-contract-errors.html">Handler error codes</a> in the <i>CloudFormation Command Line Interface User Guide for Extension Development</i>.</p>
    pub fn get_error_code(&self) -> &::std::option::Option<crate::types::HandlerErrorCode> {
        &self.error_code
    }
    /// <p>When to next request the status of this resource operation request.</p>
    pub fn retry_after(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.retry_after = ::std::option::Option::Some(input);
        self
    }
    /// <p>When to next request the status of this resource operation request.</p>
    pub fn set_retry_after(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.retry_after = input;
        self
    }
    /// <p>When to next request the status of this resource operation request.</p>
    pub fn get_retry_after(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.retry_after
    }
    /// Consumes the builder and constructs a [`ProgressEvent`](crate::types::ProgressEvent).
    pub fn build(self) -> crate::types::ProgressEvent {
        crate::types::ProgressEvent {
            type_name: self.type_name,
            identifier: self.identifier,
            request_token: self.request_token,
            operation: self.operation,
            operation_status: self.operation_status,
            event_time: self.event_time,
            resource_model: self.resource_model,
            status_message: self.status_message,
            error_code: self.error_code,
            retry_after: self.retry_after,
        }
    }
}
impl ::std::fmt::Debug for ProgressEventBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ProgressEventBuilder");
        formatter.field("type_name", &self.type_name);
        formatter.field("identifier", &self.identifier);
        formatter.field("request_token", &self.request_token);
        formatter.field("operation", &self.operation);
        formatter.field("operation_status", &self.operation_status);
        formatter.field("event_time", &self.event_time);
        formatter.field("resource_model", &"*** Sensitive Data Redacted ***");
        formatter.field("status_message", &self.status_message);
        formatter.field("error_code", &self.error_code);
        formatter.field("retry_after", &self.retry_after);
        formatter.finish()
    }
}