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