aws_sdk_sfn/operation/test_state/
_test_state_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct TestStateOutput {
6    /// <p>The JSON output data of the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
7    pub output: ::std::option::Option<::std::string::String>,
8    /// <p>The error returned when the execution of a state fails.</p>
9    pub error: ::std::option::Option<::std::string::String>,
10    /// <p>A detailed explanation of the cause for the error when the execution of a state fails.</p>
11    pub cause: ::std::option::Option<::std::string::String>,
12    /// <p>Returns additional details about the state's execution, including its input and output data processing flow, and HTTP request and response information. The <code>inspectionLevel</code> request parameter specifies which details are returned.</p>
13    pub inspection_data: ::std::option::Option<crate::types::InspectionData>,
14    /// <p>The name of the next state to transition to. If you haven't defined a next state in your definition or if the execution of the state fails, this field doesn't contain a value.</p>
15    pub next_state: ::std::option::Option<::std::string::String>,
16    /// <p>The execution status of the state.</p>
17    pub status: ::std::option::Option<crate::types::TestExecutionStatus>,
18    _request_id: Option<String>,
19}
20impl TestStateOutput {
21    /// <p>The JSON output data of the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
22    pub fn output(&self) -> ::std::option::Option<&str> {
23        self.output.as_deref()
24    }
25    /// <p>The error returned when the execution of a state fails.</p>
26    pub fn error(&self) -> ::std::option::Option<&str> {
27        self.error.as_deref()
28    }
29    /// <p>A detailed explanation of the cause for the error when the execution of a state fails.</p>
30    pub fn cause(&self) -> ::std::option::Option<&str> {
31        self.cause.as_deref()
32    }
33    /// <p>Returns additional details about the state's execution, including its input and output data processing flow, and HTTP request and response information. The <code>inspectionLevel</code> request parameter specifies which details are returned.</p>
34    pub fn inspection_data(&self) -> ::std::option::Option<&crate::types::InspectionData> {
35        self.inspection_data.as_ref()
36    }
37    /// <p>The name of the next state to transition to. If you haven't defined a next state in your definition or if the execution of the state fails, this field doesn't contain a value.</p>
38    pub fn next_state(&self) -> ::std::option::Option<&str> {
39        self.next_state.as_deref()
40    }
41    /// <p>The execution status of the state.</p>
42    pub fn status(&self) -> ::std::option::Option<&crate::types::TestExecutionStatus> {
43        self.status.as_ref()
44    }
45}
46impl ::std::fmt::Debug for TestStateOutput {
47    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
48        let mut formatter = f.debug_struct("TestStateOutput");
49        formatter.field("output", &"*** Sensitive Data Redacted ***");
50        formatter.field("error", &"*** Sensitive Data Redacted ***");
51        formatter.field("cause", &"*** Sensitive Data Redacted ***");
52        formatter.field("inspection_data", &"*** Sensitive Data Redacted ***");
53        formatter.field("next_state", &self.next_state);
54        formatter.field("status", &self.status);
55        formatter.field("_request_id", &self._request_id);
56        formatter.finish()
57    }
58}
59impl ::aws_types::request_id::RequestId for TestStateOutput {
60    fn request_id(&self) -> Option<&str> {
61        self._request_id.as_deref()
62    }
63}
64impl TestStateOutput {
65    /// Creates a new builder-style object to manufacture [`TestStateOutput`](crate::operation::test_state::TestStateOutput).
66    pub fn builder() -> crate::operation::test_state::builders::TestStateOutputBuilder {
67        crate::operation::test_state::builders::TestStateOutputBuilder::default()
68    }
69}
70
71/// A builder for [`TestStateOutput`](crate::operation::test_state::TestStateOutput).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
73#[non_exhaustive]
74pub struct TestStateOutputBuilder {
75    pub(crate) output: ::std::option::Option<::std::string::String>,
76    pub(crate) error: ::std::option::Option<::std::string::String>,
77    pub(crate) cause: ::std::option::Option<::std::string::String>,
78    pub(crate) inspection_data: ::std::option::Option<crate::types::InspectionData>,
79    pub(crate) next_state: ::std::option::Option<::std::string::String>,
80    pub(crate) status: ::std::option::Option<crate::types::TestExecutionStatus>,
81    _request_id: Option<String>,
82}
83impl TestStateOutputBuilder {
84    /// <p>The JSON output data of the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
85    pub fn output(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86        self.output = ::std::option::Option::Some(input.into());
87        self
88    }
89    /// <p>The JSON output data of the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
90    pub fn set_output(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91        self.output = input;
92        self
93    }
94    /// <p>The JSON output data of the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
95    pub fn get_output(&self) -> &::std::option::Option<::std::string::String> {
96        &self.output
97    }
98    /// <p>The error returned when the execution of a state fails.</p>
99    pub fn error(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100        self.error = ::std::option::Option::Some(input.into());
101        self
102    }
103    /// <p>The error returned when the execution of a state fails.</p>
104    pub fn set_error(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105        self.error = input;
106        self
107    }
108    /// <p>The error returned when the execution of a state fails.</p>
109    pub fn get_error(&self) -> &::std::option::Option<::std::string::String> {
110        &self.error
111    }
112    /// <p>A detailed explanation of the cause for the error when the execution of a state fails.</p>
113    pub fn cause(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.cause = ::std::option::Option::Some(input.into());
115        self
116    }
117    /// <p>A detailed explanation of the cause for the error when the execution of a state fails.</p>
118    pub fn set_cause(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.cause = input;
120        self
121    }
122    /// <p>A detailed explanation of the cause for the error when the execution of a state fails.</p>
123    pub fn get_cause(&self) -> &::std::option::Option<::std::string::String> {
124        &self.cause
125    }
126    /// <p>Returns additional details about the state's execution, including its input and output data processing flow, and HTTP request and response information. The <code>inspectionLevel</code> request parameter specifies which details are returned.</p>
127    pub fn inspection_data(mut self, input: crate::types::InspectionData) -> Self {
128        self.inspection_data = ::std::option::Option::Some(input);
129        self
130    }
131    /// <p>Returns additional details about the state's execution, including its input and output data processing flow, and HTTP request and response information. The <code>inspectionLevel</code> request parameter specifies which details are returned.</p>
132    pub fn set_inspection_data(mut self, input: ::std::option::Option<crate::types::InspectionData>) -> Self {
133        self.inspection_data = input;
134        self
135    }
136    /// <p>Returns additional details about the state's execution, including its input and output data processing flow, and HTTP request and response information. The <code>inspectionLevel</code> request parameter specifies which details are returned.</p>
137    pub fn get_inspection_data(&self) -> &::std::option::Option<crate::types::InspectionData> {
138        &self.inspection_data
139    }
140    /// <p>The name of the next state to transition to. If you haven't defined a next state in your definition or if the execution of the state fails, this field doesn't contain a value.</p>
141    pub fn next_state(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.next_state = ::std::option::Option::Some(input.into());
143        self
144    }
145    /// <p>The name of the next state to transition to. If you haven't defined a next state in your definition or if the execution of the state fails, this field doesn't contain a value.</p>
146    pub fn set_next_state(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.next_state = input;
148        self
149    }
150    /// <p>The name of the next state to transition to. If you haven't defined a next state in your definition or if the execution of the state fails, this field doesn't contain a value.</p>
151    pub fn get_next_state(&self) -> &::std::option::Option<::std::string::String> {
152        &self.next_state
153    }
154    /// <p>The execution status of the state.</p>
155    pub fn status(mut self, input: crate::types::TestExecutionStatus) -> Self {
156        self.status = ::std::option::Option::Some(input);
157        self
158    }
159    /// <p>The execution status of the state.</p>
160    pub fn set_status(mut self, input: ::std::option::Option<crate::types::TestExecutionStatus>) -> Self {
161        self.status = input;
162        self
163    }
164    /// <p>The execution status of the state.</p>
165    pub fn get_status(&self) -> &::std::option::Option<crate::types::TestExecutionStatus> {
166        &self.status
167    }
168    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
169        self._request_id = Some(request_id.into());
170        self
171    }
172
173    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
174        self._request_id = request_id;
175        self
176    }
177    /// Consumes the builder and constructs a [`TestStateOutput`](crate::operation::test_state::TestStateOutput).
178    pub fn build(self) -> crate::operation::test_state::TestStateOutput {
179        crate::operation::test_state::TestStateOutput {
180            output: self.output,
181            error: self.error,
182            cause: self.cause,
183            inspection_data: self.inspection_data,
184            next_state: self.next_state,
185            status: self.status,
186            _request_id: self._request_id,
187        }
188    }
189}
190impl ::std::fmt::Debug for TestStateOutputBuilder {
191    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
192        let mut formatter = f.debug_struct("TestStateOutputBuilder");
193        formatter.field("output", &"*** Sensitive Data Redacted ***");
194        formatter.field("error", &"*** Sensitive Data Redacted ***");
195        formatter.field("cause", &"*** Sensitive Data Redacted ***");
196        formatter.field("inspection_data", &"*** Sensitive Data Redacted ***");
197        formatter.field("next_state", &self.next_state);
198        formatter.field("status", &self.status);
199        formatter.field("_request_id", &self._request_id);
200        formatter.finish()
201    }
202}