#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateStateMachineOutput {
pub state_machine_arn: ::std::string::String,
pub creation_date: ::aws_smithy_types::DateTime,
pub state_machine_version_arn: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateStateMachineOutput {
pub fn state_machine_arn(&self) -> &str {
use std::ops::Deref;
self.state_machine_arn.deref()
}
pub fn creation_date(&self) -> &::aws_smithy_types::DateTime {
&self.creation_date
}
pub fn state_machine_version_arn(&self) -> ::std::option::Option<&str> {
self.state_machine_version_arn.as_deref()
}
}
impl ::aws_types::request_id::RequestId for CreateStateMachineOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateStateMachineOutput {
pub fn builder() -> crate::operation::create_state_machine::builders::CreateStateMachineOutputBuilder {
crate::operation::create_state_machine::builders::CreateStateMachineOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateStateMachineOutputBuilder {
pub(crate) state_machine_arn: ::std::option::Option<::std::string::String>,
pub(crate) creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) state_machine_version_arn: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateStateMachineOutputBuilder {
pub fn state_machine_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.state_machine_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_state_machine_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.state_machine_arn = input;
self
}
pub fn get_state_machine_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.state_machine_arn
}
pub fn creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_date = ::std::option::Option::Some(input);
self
}
pub fn set_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_date = input;
self
}
pub fn get_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_date
}
pub fn state_machine_version_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.state_machine_version_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_state_machine_version_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.state_machine_version_arn = input;
self
}
pub fn get_state_machine_version_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.state_machine_version_arn
}
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
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_state_machine::CreateStateMachineOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_state_machine::CreateStateMachineOutput {
state_machine_arn: self.state_machine_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"state_machine_arn",
"state_machine_arn was not specified but it is required when building CreateStateMachineOutput",
)
})?,
creation_date: self.creation_date.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"creation_date",
"creation_date was not specified but it is required when building CreateStateMachineOutput",
)
})?,
state_machine_version_arn: self.state_machine_version_arn,
_request_id: self._request_id,
})
}
}