aws-sdk-workmail 1.96.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)]
pub struct CreateResourceInput {
    /// <p>The identifier associated with the organization for which the resource is created.</p>
    pub organization_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the new resource.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The type of the new resource. The available types are <code>equipment</code> and <code>room</code>.</p>
    pub r#type: ::std::option::Option<crate::types::ResourceType>,
    /// <p>Resource description.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>If this parameter is enabled, the resource will be hidden from the address book.</p>
    pub hidden_from_global_address_list: ::std::option::Option<bool>,
}
impl CreateResourceInput {
    /// <p>The identifier associated with the organization for which the resource is created.</p>
    pub fn organization_id(&self) -> ::std::option::Option<&str> {
        self.organization_id.as_deref()
    }
    /// <p>The name of the new resource.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The type of the new resource. The available types are <code>equipment</code> and <code>room</code>.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::ResourceType> {
        self.r#type.as_ref()
    }
    /// <p>Resource description.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>If this parameter is enabled, the resource 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 ::std::fmt::Debug for CreateResourceInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateResourceInput");
        formatter.field("organization_id", &self.organization_id);
        formatter.field("name", &self.name);
        formatter.field("r#type", &self.r#type);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("hidden_from_global_address_list", &self.hidden_from_global_address_list);
        formatter.finish()
    }
}
impl CreateResourceInput {
    /// Creates a new builder-style object to manufacture [`CreateResourceInput`](crate::operation::create_resource::CreateResourceInput).
    pub fn builder() -> crate::operation::create_resource::builders::CreateResourceInputBuilder {
        crate::operation::create_resource::builders::CreateResourceInputBuilder::default()
    }
}

/// A builder for [`CreateResourceInput`](crate::operation::create_resource::CreateResourceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateResourceInputBuilder {
    pub(crate) organization_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::ResourceType>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) hidden_from_global_address_list: ::std::option::Option<bool>,
}
impl CreateResourceInputBuilder {
    /// <p>The identifier associated with the organization for which the resource is 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 identifier associated with the organization for which the resource is created.</p>
    pub fn set_organization_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.organization_id = input;
        self
    }
    /// <p>The identifier associated with the organization for which the resource is created.</p>
    pub fn get_organization_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.organization_id
    }
    /// <p>The name of the new resource.</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 new resource.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the new resource.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The type of the new resource. The available types are <code>equipment</code> and <code>room</code>.</p>
    /// This field is required.
    pub fn r#type(mut self, input: crate::types::ResourceType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the new resource. The available types are <code>equipment</code> and <code>room</code>.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ResourceType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of the new resource. The available types are <code>equipment</code> and <code>room</code>.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::ResourceType> {
        &self.r#type
    }
    /// <p>Resource description.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Resource description.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>Resource description.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>If this parameter is enabled, the resource 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 resource 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 resource 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 [`CreateResourceInput`](crate::operation::create_resource::CreateResourceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_resource::CreateResourceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_resource::CreateResourceInput {
            organization_id: self.organization_id,
            name: self.name,
            r#type: self.r#type,
            description: self.description,
            hidden_from_global_address_list: self.hidden_from_global_address_list,
        })
    }
}
impl ::std::fmt::Debug for CreateResourceInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateResourceInputBuilder");
        formatter.field("organization_id", &self.organization_id);
        formatter.field("name", &self.name);
        formatter.field("r#type", &self.r#type);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("hidden_from_global_address_list", &self.hidden_from_global_address_list);
        formatter.finish()
    }
}