aws_sdk_sfn/operation/stop_execution/
_stop_execution_input.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 StopExecutionInput {
6    /// <p>The Amazon Resource Name (ARN) of the execution to stop.</p>
7    pub execution_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The error code of the failure.</p>
9    pub error: ::std::option::Option<::std::string::String>,
10    /// <p>A more detailed explanation of the cause of the failure.</p>
11    pub cause: ::std::option::Option<::std::string::String>,
12}
13impl StopExecutionInput {
14    /// <p>The Amazon Resource Name (ARN) of the execution to stop.</p>
15    pub fn execution_arn(&self) -> ::std::option::Option<&str> {
16        self.execution_arn.as_deref()
17    }
18    /// <p>The error code of the failure.</p>
19    pub fn error(&self) -> ::std::option::Option<&str> {
20        self.error.as_deref()
21    }
22    /// <p>A more detailed explanation of the cause of the failure.</p>
23    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    /// Creates a new builder-style object to manufacture [`StopExecutionInput`](crate::operation::stop_execution::StopExecutionInput).
38    pub fn builder() -> crate::operation::stop_execution::builders::StopExecutionInputBuilder {
39        crate::operation::stop_execution::builders::StopExecutionInputBuilder::default()
40    }
41}
42
43/// A builder for [`StopExecutionInput`](crate::operation::stop_execution::StopExecutionInput).
44#[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    /// <p>The Amazon Resource Name (ARN) of the execution to stop.</p>
53    /// This field is required.
54    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    /// <p>The Amazon Resource Name (ARN) of the execution to stop.</p>
59    pub fn set_execution_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.execution_arn = input;
61        self
62    }
63    /// <p>The Amazon Resource Name (ARN) of the execution to stop.</p>
64    pub fn get_execution_arn(&self) -> &::std::option::Option<::std::string::String> {
65        &self.execution_arn
66    }
67    /// <p>The error code of the failure.</p>
68    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    /// <p>The error code of the failure.</p>
73    pub fn set_error(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.error = input;
75        self
76    }
77    /// <p>The error code of the failure.</p>
78    pub fn get_error(&self) -> &::std::option::Option<::std::string::String> {
79        &self.error
80    }
81    /// <p>A more detailed explanation of the cause of the failure.</p>
82    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    /// <p>A more detailed explanation of the cause of the failure.</p>
87    pub fn set_cause(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.cause = input;
89        self
90    }
91    /// <p>A more detailed explanation of the cause of the failure.</p>
92    pub fn get_cause(&self) -> &::std::option::Option<::std::string::String> {
93        &self.cause
94    }
95    /// Consumes the builder and constructs a [`StopExecutionInput`](crate::operation::stop_execution::StopExecutionInput).
96    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}