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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The response from the GetDurableExecution operation, containing detailed information about the durable execution.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetDurableExecutionOutput {
/// <p>The Amazon Resource Name (ARN) of the durable execution.</p>
pub durable_execution_arn: ::std::string::String,
/// <p>The name of the durable execution. This is either the name you provided when invoking the function, or a system-generated unique identifier if no name was provided.</p>
pub durable_execution_name: ::std::string::String,
/// <p>The Amazon Resource Name (ARN) of the Lambda function that was invoked to start this durable execution.</p>
pub function_arn: ::std::string::String,
/// <p>The JSON input payload that was provided when the durable execution was started. For asynchronous invocations, this is limited to 256 KB. For synchronous invocations, this can be up to 6 MB.</p>
pub input_payload: ::std::option::Option<::std::string::String>,
/// <p>The JSON result returned by the durable execution if it completed successfully. This field is only present when the execution status is <code>SUCCEEDED</code>. The result is limited to 256 KB.</p>
pub result: ::std::option::Option<::std::string::String>,
/// <p>Error information if the durable execution failed. This field is only present when the execution status is <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>STOPPED</code>. The combined size of all error fields is limited to 256 KB.</p>
pub error: ::std::option::Option<crate::types::ErrorObject>,
/// <p>The date and time when the durable execution started, in Unix timestamp format.</p>
pub start_timestamp: ::aws_smithy_types::DateTime,
/// <p>The current status of the durable execution. Valid values are <code>RUNNING</code>, <code>SUCCEEDED</code>, <code>FAILED</code>, <code>TIMED_OUT</code>, and <code>STOPPED</code>.</p>
pub status: crate::types::ExecutionStatus,
/// <p>The date and time when the durable execution ended, in Unix timestamp format. This field is only present if the execution has completed (status is <code>SUCCEEDED</code>, <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>STOPPED</code>).</p>
pub end_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The version of the Lambda function that was invoked for this durable execution. This ensures that all replays during the execution use the same function version.</p>
pub version: ::std::option::Option<::std::string::String>,
/// <p>The trace headers associated with the durable execution.</p>
pub trace_header: ::std::option::Option<crate::types::TraceHeader>,
_request_id: Option<String>,
}
impl GetDurableExecutionOutput {
/// <p>The Amazon Resource Name (ARN) of the durable execution.</p>
pub fn durable_execution_arn(&self) -> &str {
use std::ops::Deref;
self.durable_execution_arn.deref()
}
/// <p>The name of the durable execution. This is either the name you provided when invoking the function, or a system-generated unique identifier if no name was provided.</p>
pub fn durable_execution_name(&self) -> &str {
use std::ops::Deref;
self.durable_execution_name.deref()
}
/// <p>The Amazon Resource Name (ARN) of the Lambda function that was invoked to start this durable execution.</p>
pub fn function_arn(&self) -> &str {
use std::ops::Deref;
self.function_arn.deref()
}
/// <p>The JSON input payload that was provided when the durable execution was started. For asynchronous invocations, this is limited to 256 KB. For synchronous invocations, this can be up to 6 MB.</p>
pub fn input_payload(&self) -> ::std::option::Option<&str> {
self.input_payload.as_deref()
}
/// <p>The JSON result returned by the durable execution if it completed successfully. This field is only present when the execution status is <code>SUCCEEDED</code>. The result is limited to 256 KB.</p>
pub fn result(&self) -> ::std::option::Option<&str> {
self.result.as_deref()
}
/// <p>Error information if the durable execution failed. This field is only present when the execution status is <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>STOPPED</code>. The combined size of all error fields is limited to 256 KB.</p>
pub fn error(&self) -> ::std::option::Option<&crate::types::ErrorObject> {
self.error.as_ref()
}
/// <p>The date and time when the durable execution started, in Unix timestamp format.</p>
pub fn start_timestamp(&self) -> &::aws_smithy_types::DateTime {
&self.start_timestamp
}
/// <p>The current status of the durable execution. Valid values are <code>RUNNING</code>, <code>SUCCEEDED</code>, <code>FAILED</code>, <code>TIMED_OUT</code>, and <code>STOPPED</code>.</p>
pub fn status(&self) -> &crate::types::ExecutionStatus {
&self.status
}
/// <p>The date and time when the durable execution ended, in Unix timestamp format. This field is only present if the execution has completed (status is <code>SUCCEEDED</code>, <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>STOPPED</code>).</p>
pub fn end_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.end_timestamp.as_ref()
}
/// <p>The version of the Lambda function that was invoked for this durable execution. This ensures that all replays during the execution use the same function version.</p>
pub fn version(&self) -> ::std::option::Option<&str> {
self.version.as_deref()
}
/// <p>The trace headers associated with the durable execution.</p>
pub fn trace_header(&self) -> ::std::option::Option<&crate::types::TraceHeader> {
self.trace_header.as_ref()
}
}
impl ::std::fmt::Debug for GetDurableExecutionOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetDurableExecutionOutput");
formatter.field("durable_execution_arn", &self.durable_execution_arn);
formatter.field("durable_execution_name", &self.durable_execution_name);
formatter.field("function_arn", &self.function_arn);
formatter.field("input_payload", &"*** Sensitive Data Redacted ***");
formatter.field("result", &"*** Sensitive Data Redacted ***");
formatter.field("error", &self.error);
formatter.field("start_timestamp", &self.start_timestamp);
formatter.field("status", &self.status);
formatter.field("end_timestamp", &self.end_timestamp);
formatter.field("version", &self.version);
formatter.field("trace_header", &self.trace_header);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetDurableExecutionOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetDurableExecutionOutput {
/// Creates a new builder-style object to manufacture [`GetDurableExecutionOutput`](crate::operation::get_durable_execution::GetDurableExecutionOutput).
pub fn builder() -> crate::operation::get_durable_execution::builders::GetDurableExecutionOutputBuilder {
crate::operation::get_durable_execution::builders::GetDurableExecutionOutputBuilder::default()
}
}
/// A builder for [`GetDurableExecutionOutput`](crate::operation::get_durable_execution::GetDurableExecutionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetDurableExecutionOutputBuilder {
pub(crate) durable_execution_arn: ::std::option::Option<::std::string::String>,
pub(crate) durable_execution_name: ::std::option::Option<::std::string::String>,
pub(crate) function_arn: ::std::option::Option<::std::string::String>,
pub(crate) input_payload: ::std::option::Option<::std::string::String>,
pub(crate) result: ::std::option::Option<::std::string::String>,
pub(crate) error: ::std::option::Option<crate::types::ErrorObject>,
pub(crate) start_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) status: ::std::option::Option<crate::types::ExecutionStatus>,
pub(crate) end_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) version: ::std::option::Option<::std::string::String>,
pub(crate) trace_header: ::std::option::Option<crate::types::TraceHeader>,
_request_id: Option<String>,
}
impl GetDurableExecutionOutputBuilder {
/// <p>The Amazon Resource Name (ARN) of the durable execution.</p>
/// This field is required.
pub fn durable_execution_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.durable_execution_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the durable execution.</p>
pub fn set_durable_execution_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.durable_execution_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the durable execution.</p>
pub fn get_durable_execution_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.durable_execution_arn
}
/// <p>The name of the durable execution. This is either the name you provided when invoking the function, or a system-generated unique identifier if no name was provided.</p>
/// This field is required.
pub fn durable_execution_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.durable_execution_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the durable execution. This is either the name you provided when invoking the function, or a system-generated unique identifier if no name was provided.</p>
pub fn set_durable_execution_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.durable_execution_name = input;
self
}
/// <p>The name of the durable execution. This is either the name you provided when invoking the function, or a system-generated unique identifier if no name was provided.</p>
pub fn get_durable_execution_name(&self) -> &::std::option::Option<::std::string::String> {
&self.durable_execution_name
}
/// <p>The Amazon Resource Name (ARN) of the Lambda function that was invoked to start this durable execution.</p>
/// This field is required.
pub fn function_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.function_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the Lambda function that was invoked to start this durable execution.</p>
pub fn set_function_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.function_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the Lambda function that was invoked to start this durable execution.</p>
pub fn get_function_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.function_arn
}
/// <p>The JSON input payload that was provided when the durable execution was started. For asynchronous invocations, this is limited to 256 KB. For synchronous invocations, this can be up to 6 MB.</p>
pub fn input_payload(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.input_payload = ::std::option::Option::Some(input.into());
self
}
/// <p>The JSON input payload that was provided when the durable execution was started. For asynchronous invocations, this is limited to 256 KB. For synchronous invocations, this can be up to 6 MB.</p>
pub fn set_input_payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.input_payload = input;
self
}
/// <p>The JSON input payload that was provided when the durable execution was started. For asynchronous invocations, this is limited to 256 KB. For synchronous invocations, this can be up to 6 MB.</p>
pub fn get_input_payload(&self) -> &::std::option::Option<::std::string::String> {
&self.input_payload
}
/// <p>The JSON result returned by the durable execution if it completed successfully. This field is only present when the execution status is <code>SUCCEEDED</code>. The result is limited to 256 KB.</p>
pub fn result(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.result = ::std::option::Option::Some(input.into());
self
}
/// <p>The JSON result returned by the durable execution if it completed successfully. This field is only present when the execution status is <code>SUCCEEDED</code>. The result is limited to 256 KB.</p>
pub fn set_result(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.result = input;
self
}
/// <p>The JSON result returned by the durable execution if it completed successfully. This field is only present when the execution status is <code>SUCCEEDED</code>. The result is limited to 256 KB.</p>
pub fn get_result(&self) -> &::std::option::Option<::std::string::String> {
&self.result
}
/// <p>Error information if the durable execution failed. This field is only present when the execution status is <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>STOPPED</code>. The combined size of all error fields is limited to 256 KB.</p>
pub fn error(mut self, input: crate::types::ErrorObject) -> Self {
self.error = ::std::option::Option::Some(input);
self
}
/// <p>Error information if the durable execution failed. This field is only present when the execution status is <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>STOPPED</code>. The combined size of all error fields is limited to 256 KB.</p>
pub fn set_error(mut self, input: ::std::option::Option<crate::types::ErrorObject>) -> Self {
self.error = input;
self
}
/// <p>Error information if the durable execution failed. This field is only present when the execution status is <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>STOPPED</code>. The combined size of all error fields is limited to 256 KB.</p>
pub fn get_error(&self) -> &::std::option::Option<crate::types::ErrorObject> {
&self.error
}
/// <p>The date and time when the durable execution started, in Unix timestamp format.</p>
/// This field is required.
pub fn start_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.start_timestamp = ::std::option::Option::Some(input);
self
}
/// <p>The date and time when the durable execution started, in Unix timestamp format.</p>
pub fn set_start_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.start_timestamp = input;
self
}
/// <p>The date and time when the durable execution started, in Unix timestamp format.</p>
pub fn get_start_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.start_timestamp
}
/// <p>The current status of the durable execution. Valid values are <code>RUNNING</code>, <code>SUCCEEDED</code>, <code>FAILED</code>, <code>TIMED_OUT</code>, and <code>STOPPED</code>.</p>
/// This field is required.
pub fn status(mut self, input: crate::types::ExecutionStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The current status of the durable execution. Valid values are <code>RUNNING</code>, <code>SUCCEEDED</code>, <code>FAILED</code>, <code>TIMED_OUT</code>, and <code>STOPPED</code>.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::ExecutionStatus>) -> Self {
self.status = input;
self
}
/// <p>The current status of the durable execution. Valid values are <code>RUNNING</code>, <code>SUCCEEDED</code>, <code>FAILED</code>, <code>TIMED_OUT</code>, and <code>STOPPED</code>.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::ExecutionStatus> {
&self.status
}
/// <p>The date and time when the durable execution ended, in Unix timestamp format. This field is only present if the execution has completed (status is <code>SUCCEEDED</code>, <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>STOPPED</code>).</p>
pub fn end_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.end_timestamp = ::std::option::Option::Some(input);
self
}
/// <p>The date and time when the durable execution ended, in Unix timestamp format. This field is only present if the execution has completed (status is <code>SUCCEEDED</code>, <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>STOPPED</code>).</p>
pub fn set_end_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.end_timestamp = input;
self
}
/// <p>The date and time when the durable execution ended, in Unix timestamp format. This field is only present if the execution has completed (status is <code>SUCCEEDED</code>, <code>FAILED</code>, <code>TIMED_OUT</code>, or <code>STOPPED</code>).</p>
pub fn get_end_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.end_timestamp
}
/// <p>The version of the Lambda function that was invoked for this durable execution. This ensures that all replays during the execution use the same function version.</p>
pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.version = ::std::option::Option::Some(input.into());
self
}
/// <p>The version of the Lambda function that was invoked for this durable execution. This ensures that all replays during the execution use the same function version.</p>
pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version = input;
self
}
/// <p>The version of the Lambda function that was invoked for this durable execution. This ensures that all replays during the execution use the same function version.</p>
pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
&self.version
}
/// <p>The trace headers associated with the durable execution.</p>
pub fn trace_header(mut self, input: crate::types::TraceHeader) -> Self {
self.trace_header = ::std::option::Option::Some(input);
self
}
/// <p>The trace headers associated with the durable execution.</p>
pub fn set_trace_header(mut self, input: ::std::option::Option<crate::types::TraceHeader>) -> Self {
self.trace_header = input;
self
}
/// <p>The trace headers associated with the durable execution.</p>
pub fn get_trace_header(&self) -> &::std::option::Option<crate::types::TraceHeader> {
&self.trace_header
}
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 [`GetDurableExecutionOutput`](crate::operation::get_durable_execution::GetDurableExecutionOutput).
/// This method will fail if any of the following fields are not set:
/// - [`durable_execution_arn`](crate::operation::get_durable_execution::builders::GetDurableExecutionOutputBuilder::durable_execution_arn)
/// - [`durable_execution_name`](crate::operation::get_durable_execution::builders::GetDurableExecutionOutputBuilder::durable_execution_name)
/// - [`function_arn`](crate::operation::get_durable_execution::builders::GetDurableExecutionOutputBuilder::function_arn)
/// - [`start_timestamp`](crate::operation::get_durable_execution::builders::GetDurableExecutionOutputBuilder::start_timestamp)
/// - [`status`](crate::operation::get_durable_execution::builders::GetDurableExecutionOutputBuilder::status)
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_durable_execution::GetDurableExecutionOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_durable_execution::GetDurableExecutionOutput {
durable_execution_arn: self.durable_execution_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"durable_execution_arn",
"durable_execution_arn was not specified but it is required when building GetDurableExecutionOutput",
)
})?,
durable_execution_name: self.durable_execution_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"durable_execution_name",
"durable_execution_name was not specified but it is required when building GetDurableExecutionOutput",
)
})?,
function_arn: self.function_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"function_arn",
"function_arn was not specified but it is required when building GetDurableExecutionOutput",
)
})?,
input_payload: self.input_payload,
result: self.result,
error: self.error,
start_timestamp: self.start_timestamp.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"start_timestamp",
"start_timestamp was not specified but it is required when building GetDurableExecutionOutput",
)
})?,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building GetDurableExecutionOutput",
)
})?,
end_timestamp: self.end_timestamp,
version: self.version,
trace_header: self.trace_header,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for GetDurableExecutionOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetDurableExecutionOutputBuilder");
formatter.field("durable_execution_arn", &self.durable_execution_arn);
formatter.field("durable_execution_name", &self.durable_execution_name);
formatter.field("function_arn", &self.function_arn);
formatter.field("input_payload", &"*** Sensitive Data Redacted ***");
formatter.field("result", &"*** Sensitive Data Redacted ***");
formatter.field("error", &self.error);
formatter.field("start_timestamp", &self.start_timestamp);
formatter.field("status", &self.status);
formatter.field("end_timestamp", &self.end_timestamp);
formatter.field("version", &self.version);
formatter.field("trace_header", &self.trace_header);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}