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 CreateGroupInput {
    /// <p>The organization under which the group is to be created.</p>
    pub organization_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the group.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>If this parameter is enabled, the group will be hidden from the address book.</p>
    pub hidden_from_global_address_list: ::std::option::Option<bool>,
}
impl CreateGroupInput {
    /// <p>The organization under which the group is to be created.</p>
    pub fn organization_id(&self) -> ::std::option::Option<&str> {
        self.organization_id.as_deref()
    }
    /// <p>The name of the group.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>If this parameter is enabled, the group will be hidden from the address book.</p>
    pub fn hidden_from_global_address_list(&self) -> ::std::option::Option<bool> {
        self.hidden_from_global_address_list
    }
}
impl CreateGroupInput {
    /// Creates a new builder-style object to manufacture [`CreateGroupInput`](crate::operation::create_group::CreateGroupInput).
    pub fn builder() -> crate::operation::create_group::builders::CreateGroupInputBuilder {
        crate::operation::create_group::builders::CreateGroupInputBuilder::default()
    }
}

/// A builder for [`CreateGroupInput`](crate::operation::create_group::CreateGroupInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateGroupInputBuilder {
    pub(crate) organization_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) hidden_from_global_address_list: ::std::option::Option<bool>,
}
impl CreateGroupInputBuilder {
    /// <p>The organization under which the group is to be created.</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 organization under which the group is to be created.</p>
    pub fn set_organization_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.organization_id = input;
        self
    }
    /// <p>The organization under which the group is to be created.</p>
    pub fn get_organization_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.organization_id
    }
    /// <p>The name of the group.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the group.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the group.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>If this parameter is enabled, the group will be hidden from the address book.</p>
    pub fn hidden_from_global_address_list(mut self, input: bool) -> Self {
        self.hidden_from_global_address_list = ::std::option::Option::Some(input);
        self
    }
    /// <p>If this parameter is enabled, the group will be hidden from the address book.</p>
    pub fn set_hidden_from_global_address_list(mut self, input: ::std::option::Option<bool>) -> Self {
        self.hidden_from_global_address_list = input;
        self
    }
    /// <p>If this parameter is enabled, the group will be hidden from the address book.</p>
    pub fn get_hidden_from_global_address_list(&self) -> &::std::option::Option<bool> {
        &self.hidden_from_global_address_list
    }
    /// Consumes the builder and constructs a [`CreateGroupInput`](crate::operation::create_group::CreateGroupInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_group::CreateGroupInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_group::CreateGroupInput {
            organization_id: self.organization_id,
            name: self.name,
            hidden_from_global_address_list: self.hidden_from_global_address_list,
        })
    }
}