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 UpdateGroupInput {
    /// <p>The identifier for the organization under which the group exists.</p>
    pub organization_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier for the group to be updated.</p>
    /// <p>The identifier can accept <i>GroupId</i>, <i>Groupname</i>, or <i>email</i>. The following identity formats are available:</p>
    /// <ul>
    /// <li>
    /// <p>Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
    /// <li>
    /// <p>Email address: group@domain.tld</p></li>
    /// <li>
    /// <p>Group name: group</p></li>
    /// </ul>
    pub group_id: ::std::option::Option<::std::string::String>,
    /// <p>If enabled, the group is hidden from the global address list.</p>
    pub hidden_from_global_address_list: ::std::option::Option<bool>,
}
impl UpdateGroupInput {
    /// <p>The identifier for the organization under which the group exists.</p>
    pub fn organization_id(&self) -> ::std::option::Option<&str> {
        self.organization_id.as_deref()
    }
    /// <p>The identifier for the group to be updated.</p>
    /// <p>The identifier can accept <i>GroupId</i>, <i>Groupname</i>, or <i>email</i>. The following identity formats are available:</p>
    /// <ul>
    /// <li>
    /// <p>Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
    /// <li>
    /// <p>Email address: group@domain.tld</p></li>
    /// <li>
    /// <p>Group name: group</p></li>
    /// </ul>
    pub fn group_id(&self) -> ::std::option::Option<&str> {
        self.group_id.as_deref()
    }
    /// <p>If enabled, the group is hidden from the global address list.</p>
    pub fn hidden_from_global_address_list(&self) -> ::std::option::Option<bool> {
        self.hidden_from_global_address_list
    }
}
impl UpdateGroupInput {
    /// Creates a new builder-style object to manufacture [`UpdateGroupInput`](crate::operation::update_group::UpdateGroupInput).
    pub fn builder() -> crate::operation::update_group::builders::UpdateGroupInputBuilder {
        crate::operation::update_group::builders::UpdateGroupInputBuilder::default()
    }
}

/// A builder for [`UpdateGroupInput`](crate::operation::update_group::UpdateGroupInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateGroupInputBuilder {
    pub(crate) organization_id: ::std::option::Option<::std::string::String>,
    pub(crate) group_id: ::std::option::Option<::std::string::String>,
    pub(crate) hidden_from_global_address_list: ::std::option::Option<bool>,
}
impl UpdateGroupInputBuilder {
    /// <p>The identifier for the organization under which the group 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 group 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 group exists.</p>
    pub fn get_organization_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.organization_id
    }
    /// <p>The identifier for the group to be updated.</p>
    /// <p>The identifier can accept <i>GroupId</i>, <i>Groupname</i>, or <i>email</i>. The following identity formats are available:</p>
    /// <ul>
    /// <li>
    /// <p>Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
    /// <li>
    /// <p>Email address: group@domain.tld</p></li>
    /// <li>
    /// <p>Group name: group</p></li>
    /// </ul>
    /// This field is required.
    pub fn group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.group_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier for the group to be updated.</p>
    /// <p>The identifier can accept <i>GroupId</i>, <i>Groupname</i>, or <i>email</i>. The following identity formats are available:</p>
    /// <ul>
    /// <li>
    /// <p>Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
    /// <li>
    /// <p>Email address: group@domain.tld</p></li>
    /// <li>
    /// <p>Group name: group</p></li>
    /// </ul>
    pub fn set_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.group_id = input;
        self
    }
    /// <p>The identifier for the group to be updated.</p>
    /// <p>The identifier can accept <i>GroupId</i>, <i>Groupname</i>, or <i>email</i>. The following identity formats are available:</p>
    /// <ul>
    /// <li>
    /// <p>Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234</p></li>
    /// <li>
    /// <p>Email address: group@domain.tld</p></li>
    /// <li>
    /// <p>Group name: group</p></li>
    /// </ul>
    pub fn get_group_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.group_id
    }
    /// <p>If enabled, the group is hidden from the global address list.</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 enabled, the group is hidden from the global address list.</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 enabled, the group is hidden from the global address list.</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 [`UpdateGroupInput`](crate::operation::update_group::UpdateGroupInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_group::UpdateGroupInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_group::UpdateGroupInput {
            organization_id: self.organization_id,
            group_id: self.group_id,
            hidden_from_global_address_list: self.hidden_from_global_address_list,
        })
    }
}