aws-sdk-workmail 1.94.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 DescribeEntityOutput {
    /// <p>The entity ID under which the entity exists.</p>
    pub entity_id: ::std::option::Option<::std::string::String>,
    /// <p>Username, GroupName, or ResourceName based on entity type.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Entity type.</p>
    pub r#type: ::std::option::Option<crate::types::EntityType>,
    _request_id: Option<String>,
}
impl DescribeEntityOutput {
    /// <p>The entity ID under which the entity exists.</p>
    pub fn entity_id(&self) -> ::std::option::Option<&str> {
        self.entity_id.as_deref()
    }
    /// <p>Username, GroupName, or ResourceName based on entity type.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Entity type.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::EntityType> {
        self.r#type.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeEntityOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeEntityOutput {
    /// Creates a new builder-style object to manufacture [`DescribeEntityOutput`](crate::operation::describe_entity::DescribeEntityOutput).
    pub fn builder() -> crate::operation::describe_entity::builders::DescribeEntityOutputBuilder {
        crate::operation::describe_entity::builders::DescribeEntityOutputBuilder::default()
    }
}

/// A builder for [`DescribeEntityOutput`](crate::operation::describe_entity::DescribeEntityOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeEntityOutputBuilder {
    pub(crate) entity_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::EntityType>,
    _request_id: Option<String>,
}
impl DescribeEntityOutputBuilder {
    /// <p>The entity ID under which the entity exists.</p>
    pub fn entity_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.entity_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The entity ID under which the entity exists.</p>
    pub fn set_entity_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.entity_id = input;
        self
    }
    /// <p>The entity ID under which the entity exists.</p>
    pub fn get_entity_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.entity_id
    }
    /// <p>Username, GroupName, or ResourceName based on entity type.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Username, GroupName, or ResourceName based on entity type.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>Username, GroupName, or ResourceName based on entity type.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Entity type.</p>
    pub fn r#type(mut self, input: crate::types::EntityType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Entity type.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::EntityType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>Entity type.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::EntityType> {
        &self.r#type
    }
    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 [`DescribeEntityOutput`](crate::operation::describe_entity::DescribeEntityOutput).
    pub fn build(self) -> crate::operation::describe_entity::DescribeEntityOutput {
        crate::operation::describe_entity::DescribeEntityOutput {
            entity_id: self.entity_id,
            name: self.name,
            r#type: self.r#type,
            _request_id: self._request_id,
        }
    }
}