aws-sdk-pinpointsmsvoicev2 1.124.0

AWS SDK for Amazon Pinpoint SMS Voice V2
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateProtectConfigurationInput {
    /// <p>The unique identifier for the protect configuration.</p>
    pub protect_configuration_id: ::std::option::Option<::std::string::String>,
    /// <p>When set to true deletion protection is enabled. By default this is set to false.</p>
    pub deletion_protection_enabled: ::std::option::Option<bool>,
}
impl UpdateProtectConfigurationInput {
    /// <p>The unique identifier for the protect configuration.</p>
    pub fn protect_configuration_id(&self) -> ::std::option::Option<&str> {
        self.protect_configuration_id.as_deref()
    }
    /// <p>When set to true deletion protection is enabled. By default this is set to false.</p>
    pub fn deletion_protection_enabled(&self) -> ::std::option::Option<bool> {
        self.deletion_protection_enabled
    }
}
impl UpdateProtectConfigurationInput {
    /// Creates a new builder-style object to manufacture [`UpdateProtectConfigurationInput`](crate::operation::update_protect_configuration::UpdateProtectConfigurationInput).
    pub fn builder() -> crate::operation::update_protect_configuration::builders::UpdateProtectConfigurationInputBuilder {
        crate::operation::update_protect_configuration::builders::UpdateProtectConfigurationInputBuilder::default()
    }
}

/// A builder for [`UpdateProtectConfigurationInput`](crate::operation::update_protect_configuration::UpdateProtectConfigurationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateProtectConfigurationInputBuilder {
    pub(crate) protect_configuration_id: ::std::option::Option<::std::string::String>,
    pub(crate) deletion_protection_enabled: ::std::option::Option<bool>,
}
impl UpdateProtectConfigurationInputBuilder {
    /// <p>The unique identifier for the protect configuration.</p>
    /// This field is required.
    pub fn protect_configuration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.protect_configuration_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the protect configuration.</p>
    pub fn set_protect_configuration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.protect_configuration_id = input;
        self
    }
    /// <p>The unique identifier for the protect configuration.</p>
    pub fn get_protect_configuration_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.protect_configuration_id
    }
    /// <p>When set to true deletion protection is enabled. By default this is set to false.</p>
    pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
        self.deletion_protection_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>When set to true deletion protection is enabled. By default this is set to false.</p>
    pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.deletion_protection_enabled = input;
        self
    }
    /// <p>When set to true deletion protection is enabled. By default this is set to false.</p>
    pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
        &self.deletion_protection_enabled
    }
    /// Consumes the builder and constructs a [`UpdateProtectConfigurationInput`](crate::operation::update_protect_configuration::UpdateProtectConfigurationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_protect_configuration::UpdateProtectConfigurationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_protect_configuration::UpdateProtectConfigurationInput {
            protect_configuration_id: self.protect_configuration_id,
            deletion_protection_enabled: self.deletion_protection_enabled,
        })
    }
}