#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RecipeReference {
pub recipe_arn: ::std::string::String,
pub recipe_version: ::std::string::String,
}
impl RecipeReference {
pub fn recipe_arn(&self) -> &str {
use std::ops::Deref;
self.recipe_arn.deref()
}
pub fn recipe_version(&self) -> &str {
use std::ops::Deref;
self.recipe_version.deref()
}
}
impl RecipeReference {
pub fn builder() -> crate::types::builders::RecipeReferenceBuilder {
crate::types::builders::RecipeReferenceBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RecipeReferenceBuilder {
pub(crate) recipe_arn: ::std::option::Option<::std::string::String>,
pub(crate) recipe_version: ::std::option::Option<::std::string::String>,
}
impl RecipeReferenceBuilder {
pub fn recipe_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.recipe_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_recipe_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.recipe_arn = input;
self
}
pub fn get_recipe_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.recipe_arn
}
pub fn recipe_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.recipe_version = ::std::option::Option::Some(input.into());
self
}
pub fn set_recipe_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.recipe_version = input;
self
}
pub fn get_recipe_version(&self) -> &::std::option::Option<::std::string::String> {
&self.recipe_version
}
pub fn build(self) -> ::std::result::Result<crate::types::RecipeReference, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::RecipeReference {
recipe_arn: self.recipe_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"recipe_arn",
"recipe_arn was not specified but it is required when building RecipeReference",
)
})?,
recipe_version: self.recipe_version.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"recipe_version",
"recipe_version was not specified but it is required when building RecipeReference",
)
})?,
})
}
}