aws-sdk-workmail 1.97.0

AWS SDK for Amazon WorkMail
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 DescribeEntityInput {
    /// <p>The identifier for the organization under which the entity exists.</p>
    pub organization_id: ::std::option::Option<::std::string::String>,
    /// <p>The email under which the entity exists.</p>
    pub email: ::std::option::Option<::std::string::String>,
}
impl DescribeEntityInput {
    /// <p>The identifier for the organization under which the entity exists.</p>
    pub fn organization_id(&self) -> ::std::option::Option<&str> {
        self.organization_id.as_deref()
    }
    /// <p>The email under which the entity exists.</p>
    pub fn email(&self) -> ::std::option::Option<&str> {
        self.email.as_deref()
    }
}
impl DescribeEntityInput {
    /// Creates a new builder-style object to manufacture [`DescribeEntityInput`](crate::operation::describe_entity::DescribeEntityInput).
    pub fn builder() -> crate::operation::describe_entity::builders::DescribeEntityInputBuilder {
        crate::operation::describe_entity::builders::DescribeEntityInputBuilder::default()
    }
}

/// A builder for [`DescribeEntityInput`](crate::operation::describe_entity::DescribeEntityInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeEntityInputBuilder {
    pub(crate) organization_id: ::std::option::Option<::std::string::String>,
    pub(crate) email: ::std::option::Option<::std::string::String>,
}
impl DescribeEntityInputBuilder {
    /// <p>The identifier for the organization under which the entity exists.</p>
    /// This field is required.
    pub fn organization_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.organization_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier for the organization under which the entity exists.</p>
    pub fn set_organization_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.organization_id = input;
        self
    }
    /// <p>The identifier for the organization under which the entity exists.</p>
    pub fn get_organization_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.organization_id
    }
    /// <p>The email under which the entity exists.</p>
    /// This field is required.
    pub fn email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.email = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The email under which the entity exists.</p>
    pub fn set_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.email = input;
        self
    }
    /// <p>The email under which the entity exists.</p>
    pub fn get_email(&self) -> &::std::option::Option<::std::string::String> {
        &self.email
    }
    /// Consumes the builder and constructs a [`DescribeEntityInput`](crate::operation::describe_entity::DescribeEntityInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_entity::DescribeEntityInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::describe_entity::DescribeEntityInput {
            organization_id: self.organization_id,
            email: self.email,
        })
    }
}