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
// 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)]
pub struct SendTaskFailureInput {
/// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
pub task_token: ::std::option::Option<::std::string::String>,
/// <p>The error code of the failure.</p>
pub error: ::std::option::Option<::std::string::String>,
/// <p>A more detailed explanation of the cause of the failure.</p>
pub cause: ::std::option::Option<::std::string::String>,
}
impl SendTaskFailureInput {
/// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
pub fn task_token(&self) -> ::std::option::Option<&str> {
self.task_token.as_deref()
}
/// <p>The error code of the failure.</p>
pub fn error(&self) -> ::std::option::Option<&str> {
self.error.as_deref()
}
/// <p>A more detailed explanation of the cause of the failure.</p>
pub fn cause(&self) -> ::std::option::Option<&str> {
self.cause.as_deref()
}
}
impl ::std::fmt::Debug for SendTaskFailureInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("SendTaskFailureInput");
formatter.field("task_token", &self.task_token);
formatter.field("error", &"*** Sensitive Data Redacted ***");
formatter.field("cause", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl SendTaskFailureInput {
/// Creates a new builder-style object to manufacture [`SendTaskFailureInput`](crate::operation::send_task_failure::SendTaskFailureInput).
pub fn builder() -> crate::operation::send_task_failure::builders::SendTaskFailureInputBuilder {
crate::operation::send_task_failure::builders::SendTaskFailureInputBuilder::default()
}
}
/// A builder for [`SendTaskFailureInput`](crate::operation::send_task_failure::SendTaskFailureInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct SendTaskFailureInputBuilder {
pub(crate) task_token: ::std::option::Option<::std::string::String>,
pub(crate) error: ::std::option::Option<::std::string::String>,
pub(crate) cause: ::std::option::Option<::std::string::String>,
}
impl SendTaskFailureInputBuilder {
/// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
/// This field is required.
pub fn task_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.task_token = ::std::option::Option::Some(input.into());
self
}
/// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
pub fn set_task_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.task_token = input;
self
}
/// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <code>GetActivityTaskOutput$taskToken</code>.</p>
pub fn get_task_token(&self) -> &::std::option::Option<::std::string::String> {
&self.task_token
}
/// <p>The error code of the failure.</p>
pub fn error(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.error = ::std::option::Option::Some(input.into());
self
}
/// <p>The error code of the failure.</p>
pub fn set_error(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.error = input;
self
}
/// <p>The error code of the failure.</p>
pub fn get_error(&self) -> &::std::option::Option<::std::string::String> {
&self.error
}
/// <p>A more detailed explanation of the cause of the failure.</p>
pub fn cause(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cause = ::std::option::Option::Some(input.into());
self
}
/// <p>A more detailed explanation of the cause of the failure.</p>
pub fn set_cause(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cause = input;
self
}
/// <p>A more detailed explanation of the cause of the failure.</p>
pub fn get_cause(&self) -> &::std::option::Option<::std::string::String> {
&self.cause
}
/// Consumes the builder and constructs a [`SendTaskFailureInput`](crate::operation::send_task_failure::SendTaskFailureInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::send_task_failure::SendTaskFailureInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::send_task_failure::SendTaskFailureInput {
task_token: self.task_token,
error: self.error,
cause: self.cause,
})
}
}
impl ::std::fmt::Debug for SendTaskFailureInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("SendTaskFailureInputBuilder");
formatter.field("task_token", &self.task_token);
formatter.field("error", &"*** Sensitive Data Redacted ***");
formatter.field("cause", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}