#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateTerminationProtectionInput {
pub enable_termination_protection: ::std::option::Option<bool>,
pub stack_name: ::std::option::Option<::std::string::String>,
}
impl UpdateTerminationProtectionInput {
pub fn enable_termination_protection(&self) -> ::std::option::Option<bool> {
self.enable_termination_protection
}
pub fn stack_name(&self) -> ::std::option::Option<&str> {
self.stack_name.as_deref()
}
}
impl UpdateTerminationProtectionInput {
pub fn builder() -> crate::operation::update_termination_protection::builders::UpdateTerminationProtectionInputBuilder {
crate::operation::update_termination_protection::builders::UpdateTerminationProtectionInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateTerminationProtectionInputBuilder {
pub(crate) enable_termination_protection: ::std::option::Option<bool>,
pub(crate) stack_name: ::std::option::Option<::std::string::String>,
}
impl UpdateTerminationProtectionInputBuilder {
pub fn enable_termination_protection(mut self, input: bool) -> Self {
self.enable_termination_protection = ::std::option::Option::Some(input);
self
}
pub fn set_enable_termination_protection(mut self, input: ::std::option::Option<bool>) -> Self {
self.enable_termination_protection = input;
self
}
pub fn get_enable_termination_protection(&self) -> &::std::option::Option<bool> {
&self.enable_termination_protection
}
pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.stack_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.stack_name = input;
self
}
pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
&self.stack_name
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::update_termination_protection::UpdateTerminationProtectionInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::update_termination_protection::UpdateTerminationProtectionInput {
enable_termination_protection: self.enable_termination_protection,
stack_name: self.stack_name,
})
}
}