aws_sdk_sfn/operation/stop_execution/
_stop_execution_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct StopExecutionInput {
6 pub execution_arn: ::std::option::Option<::std::string::String>,
8 pub error: ::std::option::Option<::std::string::String>,
10 pub cause: ::std::option::Option<::std::string::String>,
12}
13impl StopExecutionInput {
14 pub fn execution_arn(&self) -> ::std::option::Option<&str> {
16 self.execution_arn.as_deref()
17 }
18 pub fn error(&self) -> ::std::option::Option<&str> {
20 self.error.as_deref()
21 }
22 pub fn cause(&self) -> ::std::option::Option<&str> {
24 self.cause.as_deref()
25 }
26}
27impl ::std::fmt::Debug for StopExecutionInput {
28 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29 let mut formatter = f.debug_struct("StopExecutionInput");
30 formatter.field("execution_arn", &self.execution_arn);
31 formatter.field("error", &"*** Sensitive Data Redacted ***");
32 formatter.field("cause", &"*** Sensitive Data Redacted ***");
33 formatter.finish()
34 }
35}
36impl StopExecutionInput {
37 pub fn builder() -> crate::operation::stop_execution::builders::StopExecutionInputBuilder {
39 crate::operation::stop_execution::builders::StopExecutionInputBuilder::default()
40 }
41}
42
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
45#[non_exhaustive]
46pub struct StopExecutionInputBuilder {
47 pub(crate) execution_arn: ::std::option::Option<::std::string::String>,
48 pub(crate) error: ::std::option::Option<::std::string::String>,
49 pub(crate) cause: ::std::option::Option<::std::string::String>,
50}
51impl StopExecutionInputBuilder {
52 pub fn execution_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.execution_arn = ::std::option::Option::Some(input.into());
56 self
57 }
58 pub fn set_execution_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.execution_arn = input;
61 self
62 }
63 pub fn get_execution_arn(&self) -> &::std::option::Option<::std::string::String> {
65 &self.execution_arn
66 }
67 pub fn error(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69 self.error = ::std::option::Option::Some(input.into());
70 self
71 }
72 pub fn set_error(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.error = input;
75 self
76 }
77 pub fn get_error(&self) -> &::std::option::Option<::std::string::String> {
79 &self.error
80 }
81 pub fn cause(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83 self.cause = ::std::option::Option::Some(input.into());
84 self
85 }
86 pub fn set_cause(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.cause = input;
89 self
90 }
91 pub fn get_cause(&self) -> &::std::option::Option<::std::string::String> {
93 &self.cause
94 }
95 pub fn build(
97 self,
98 ) -> ::std::result::Result<crate::operation::stop_execution::StopExecutionInput, ::aws_smithy_types::error::operation::BuildError> {
99 ::std::result::Result::Ok(crate::operation::stop_execution::StopExecutionInput {
100 execution_arn: self.execution_arn,
101 error: self.error,
102 cause: self.cause,
103 })
104 }
105}
106impl ::std::fmt::Debug for StopExecutionInputBuilder {
107 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
108 let mut formatter = f.debug_struct("StopExecutionInputBuilder");
109 formatter.field("execution_arn", &self.execution_arn);
110 formatter.field("error", &"*** Sensitive Data Redacted ***");
111 formatter.field("cause", &"*** Sensitive Data Redacted ***");
112 formatter.finish()
113 }
114}