aws-sdk-account 1.97.0

AWS SDK for AWS Account
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 GetPrimaryEmailOutput {
    /// <p>Retrieves the primary email address associated with the specified account.</p>
    pub primary_email: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetPrimaryEmailOutput {
    /// <p>Retrieves the primary email address associated with the specified account.</p>
    pub fn primary_email(&self) -> ::std::option::Option<&str> {
        self.primary_email.as_deref()
    }
}
impl ::std::fmt::Debug for GetPrimaryEmailOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetPrimaryEmailOutput");
        formatter.field("primary_email", &"*** Sensitive Data Redacted ***");
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for GetPrimaryEmailOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetPrimaryEmailOutput {
    /// Creates a new builder-style object to manufacture [`GetPrimaryEmailOutput`](crate::operation::get_primary_email::GetPrimaryEmailOutput).
    pub fn builder() -> crate::operation::get_primary_email::builders::GetPrimaryEmailOutputBuilder {
        crate::operation::get_primary_email::builders::GetPrimaryEmailOutputBuilder::default()
    }
}

/// A builder for [`GetPrimaryEmailOutput`](crate::operation::get_primary_email::GetPrimaryEmailOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetPrimaryEmailOutputBuilder {
    pub(crate) primary_email: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetPrimaryEmailOutputBuilder {
    /// <p>Retrieves the primary email address associated with the specified account.</p>
    pub fn primary_email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.primary_email = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Retrieves the primary email address associated with the specified account.</p>
    pub fn set_primary_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.primary_email = input;
        self
    }
    /// <p>Retrieves the primary email address associated with the specified account.</p>
    pub fn get_primary_email(&self) -> &::std::option::Option<::std::string::String> {
        &self.primary_email
    }
    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
    }
    /// Consumes the builder and constructs a [`GetPrimaryEmailOutput`](crate::operation::get_primary_email::GetPrimaryEmailOutput).
    pub fn build(self) -> crate::operation::get_primary_email::GetPrimaryEmailOutput {
        crate::operation::get_primary_email::GetPrimaryEmailOutput {
            primary_email: self.primary_email,
            _request_id: self._request_id,
        }
    }
}
impl ::std::fmt::Debug for GetPrimaryEmailOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetPrimaryEmailOutputBuilder");
        formatter.field("primary_email", &"*** Sensitive Data Redacted ***");
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}