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
// 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 TestStateOutput {
/// <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>
pub output: ::std::option::Option<::std::string::String>,
/// <p>The error returned when the execution of a state fails.</p>
pub error: ::std::option::Option<::std::string::String>,
/// <p>A detailed explanation of the cause for the error when the execution of a state fails.</p>
pub cause: ::std::option::Option<::std::string::String>,
/// <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>
pub inspection_data: ::std::option::Option<crate::types::InspectionData>,
/// <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>
pub next_state: ::std::option::Option<::std::string::String>,
/// <p>The execution status of the state.</p>
pub status: ::std::option::Option<crate::types::TestExecutionStatus>,
_request_id: Option<String>,
}
impl TestStateOutput {
/// <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>
pub fn output(&self) -> ::std::option::Option<&str> {
self.output.as_deref()
}
/// <p>The error returned when the execution of a state fails.</p>
pub fn error(&self) -> ::std::option::Option<&str> {
self.error.as_deref()
}
/// <p>A detailed explanation of the cause for the error when the execution of a state fails.</p>
pub fn cause(&self) -> ::std::option::Option<&str> {
self.cause.as_deref()
}
/// <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>
pub fn inspection_data(&self) -> ::std::option::Option<&crate::types::InspectionData> {
self.inspection_data.as_ref()
}
/// <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>
pub fn next_state(&self) -> ::std::option::Option<&str> {
self.next_state.as_deref()
}
/// <p>The execution status of the state.</p>
pub fn status(&self) -> ::std::option::Option<&crate::types::TestExecutionStatus> {
self.status.as_ref()
}
}
impl ::std::fmt::Debug for TestStateOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("TestStateOutput");
formatter.field("output", &"*** Sensitive Data Redacted ***");
formatter.field("error", &"*** Sensitive Data Redacted ***");
formatter.field("cause", &"*** Sensitive Data Redacted ***");
formatter.field("inspection_data", &"*** Sensitive Data Redacted ***");
formatter.field("next_state", &self.next_state);
formatter.field("status", &self.status);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for TestStateOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl TestStateOutput {
/// Creates a new builder-style object to manufacture [`TestStateOutput`](crate::operation::test_state::TestStateOutput).
pub fn builder() -> crate::operation::test_state::builders::TestStateOutputBuilder {
crate::operation::test_state::builders::TestStateOutputBuilder::default()
}
}
/// A builder for [`TestStateOutput`](crate::operation::test_state::TestStateOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct TestStateOutputBuilder {
pub(crate) output: ::std::option::Option<::std::string::String>,
pub(crate) error: ::std::option::Option<::std::string::String>,
pub(crate) cause: ::std::option::Option<::std::string::String>,
pub(crate) inspection_data: ::std::option::Option<crate::types::InspectionData>,
pub(crate) next_state: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::TestExecutionStatus>,
_request_id: Option<String>,
}
impl TestStateOutputBuilder {
/// <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>
pub fn output(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.output = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_output(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.output = input;
self
}
/// <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>
pub fn get_output(&self) -> &::std::option::Option<::std::string::String> {
&self.output
}
/// <p>The error returned when the execution of a state fails.</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 returned when the execution of a state fails.</p>
pub fn set_error(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.error = input;
self
}
/// <p>The error returned when the execution of a state fails.</p>
pub fn get_error(&self) -> &::std::option::Option<::std::string::String> {
&self.error
}
/// <p>A detailed explanation of the cause for the error when the execution of a state fails.</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 detailed explanation of the cause for the error when the execution of a state fails.</p>
pub fn set_cause(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cause = input;
self
}
/// <p>A detailed explanation of the cause for the error when the execution of a state fails.</p>
pub fn get_cause(&self) -> &::std::option::Option<::std::string::String> {
&self.cause
}
/// <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>
pub fn inspection_data(mut self, input: crate::types::InspectionData) -> Self {
self.inspection_data = ::std::option::Option::Some(input);
self
}
/// <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>
pub fn set_inspection_data(mut self, input: ::std::option::Option<crate::types::InspectionData>) -> Self {
self.inspection_data = input;
self
}
/// <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>
pub fn get_inspection_data(&self) -> &::std::option::Option<crate::types::InspectionData> {
&self.inspection_data
}
/// <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>
pub fn next_state(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_state = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_next_state(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_state = input;
self
}
/// <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>
pub fn get_next_state(&self) -> &::std::option::Option<::std::string::String> {
&self.next_state
}
/// <p>The execution status of the state.</p>
pub fn status(mut self, input: crate::types::TestExecutionStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The execution status of the state.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::TestExecutionStatus>) -> Self {
self.status = input;
self
}
/// <p>The execution status of the state.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::TestExecutionStatus> {
&self.status
}
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 [`TestStateOutput`](crate::operation::test_state::TestStateOutput).
pub fn build(self) -> crate::operation::test_state::TestStateOutput {
crate::operation::test_state::TestStateOutput {
output: self.output,
error: self.error,
cause: self.cause,
inspection_data: self.inspection_data,
next_state: self.next_state,
status: self.status,
_request_id: self._request_id,
}
}
}
impl ::std::fmt::Debug for TestStateOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("TestStateOutputBuilder");
formatter.field("output", &"*** Sensitive Data Redacted ***");
formatter.field("error", &"*** Sensitive Data Redacted ***");
formatter.field("cause", &"*** Sensitive Data Redacted ***");
formatter.field("inspection_data", &"*** Sensitive Data Redacted ***");
formatter.field("next_state", &self.next_state);
formatter.field("status", &self.status);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}