aws-sdk-notificationscontacts 1.56.0

AWS SDK for AWS User Notifications Contacts
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)]
pub struct ActivateEmailContactInput {
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The activation code for this email contact.</p>
    /// <p>An email contact has a maximum of five activation attempts. Activation codes expire after 12 hours and are generated by the <a href="https://docs.aws.amazon.com/notificationscontacts/latest/APIReference/API_SendActivationCode.html">SendActivationCode</a> API action.</p>
    pub code: ::std::option::Option<::std::string::String>,
}
impl ActivateEmailContactInput {
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The activation code for this email contact.</p>
    /// <p>An email contact has a maximum of five activation attempts. Activation codes expire after 12 hours and are generated by the <a href="https://docs.aws.amazon.com/notificationscontacts/latest/APIReference/API_SendActivationCode.html">SendActivationCode</a> API action.</p>
    pub fn code(&self) -> ::std::option::Option<&str> {
        self.code.as_deref()
    }
}
impl ::std::fmt::Debug for ActivateEmailContactInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ActivateEmailContactInput");
        formatter.field("arn", &self.arn);
        formatter.field("code", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl ActivateEmailContactInput {
    /// Creates a new builder-style object to manufacture [`ActivateEmailContactInput`](crate::operation::activate_email_contact::ActivateEmailContactInput).
    pub fn builder() -> crate::operation::activate_email_contact::builders::ActivateEmailContactInputBuilder {
        crate::operation::activate_email_contact::builders::ActivateEmailContactInputBuilder::default()
    }
}

/// A builder for [`ActivateEmailContactInput`](crate::operation::activate_email_contact::ActivateEmailContactInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ActivateEmailContactInputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) code: ::std::option::Option<::std::string::String>,
}
impl ActivateEmailContactInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The activation code for this email contact.</p>
    /// <p>An email contact has a maximum of five activation attempts. Activation codes expire after 12 hours and are generated by the <a href="https://docs.aws.amazon.com/notificationscontacts/latest/APIReference/API_SendActivationCode.html">SendActivationCode</a> API action.</p>
    /// This field is required.
    pub fn code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.code = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The activation code for this email contact.</p>
    /// <p>An email contact has a maximum of five activation attempts. Activation codes expire after 12 hours and are generated by the <a href="https://docs.aws.amazon.com/notificationscontacts/latest/APIReference/API_SendActivationCode.html">SendActivationCode</a> API action.</p>
    pub fn set_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.code = input;
        self
    }
    /// <p>The activation code for this email contact.</p>
    /// <p>An email contact has a maximum of five activation attempts. Activation codes expire after 12 hours and are generated by the <a href="https://docs.aws.amazon.com/notificationscontacts/latest/APIReference/API_SendActivationCode.html">SendActivationCode</a> API action.</p>
    pub fn get_code(&self) -> &::std::option::Option<::std::string::String> {
        &self.code
    }
    /// Consumes the builder and constructs a [`ActivateEmailContactInput`](crate::operation::activate_email_contact::ActivateEmailContactInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::activate_email_contact::ActivateEmailContactInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::activate_email_contact::ActivateEmailContactInput {
            arn: self.arn,
            code: self.code,
        })
    }
}
impl ::std::fmt::Debug for ActivateEmailContactInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ActivateEmailContactInputBuilder");
        formatter.field("arn", &self.arn);
        formatter.field("code", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}