aws-sdk-quicksight 1.119.0

AWS SDK for Amazon QuickSight
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 CreateCustomPermissionsInput {
    /// <p>The ID of the Amazon Web Services account that you want to create the custom permissions profile in.</p>
    pub aws_account_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the custom permissions profile that you want to create.</p>
    pub custom_permissions_name: ::std::option::Option<::std::string::String>,
    /// <p>A set of actions to include in the custom permissions profile.</p>
    pub capabilities: ::std::option::Option<crate::types::Capabilities>,
    /// <p>The tags to associate with the custom permissions profile.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateCustomPermissionsInput {
    /// <p>The ID of the Amazon Web Services account that you want to create the custom permissions profile in.</p>
    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
        self.aws_account_id.as_deref()
    }
    /// <p>The name of the custom permissions profile that you want to create.</p>
    pub fn custom_permissions_name(&self) -> ::std::option::Option<&str> {
        self.custom_permissions_name.as_deref()
    }
    /// <p>A set of actions to include in the custom permissions profile.</p>
    pub fn capabilities(&self) -> ::std::option::Option<&crate::types::Capabilities> {
        self.capabilities.as_ref()
    }
    /// <p>The tags to associate with the custom permissions profile.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl CreateCustomPermissionsInput {
    /// Creates a new builder-style object to manufacture [`CreateCustomPermissionsInput`](crate::operation::create_custom_permissions::CreateCustomPermissionsInput).
    pub fn builder() -> crate::operation::create_custom_permissions::builders::CreateCustomPermissionsInputBuilder {
        crate::operation::create_custom_permissions::builders::CreateCustomPermissionsInputBuilder::default()
    }
}

/// A builder for [`CreateCustomPermissionsInput`](crate::operation::create_custom_permissions::CreateCustomPermissionsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateCustomPermissionsInputBuilder {
    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) custom_permissions_name: ::std::option::Option<::std::string::String>,
    pub(crate) capabilities: ::std::option::Option<crate::types::Capabilities>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateCustomPermissionsInputBuilder {
    /// <p>The ID of the Amazon Web Services account that you want to create the custom permissions profile in.</p>
    /// This field is required.
    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.aws_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account that you want to create the custom permissions profile in.</p>
    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.aws_account_id = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that you want to create the custom permissions profile in.</p>
    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_account_id
    }
    /// <p>The name of the custom permissions profile that you want to create.</p>
    /// This field is required.
    pub fn custom_permissions_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.custom_permissions_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the custom permissions profile that you want to create.</p>
    pub fn set_custom_permissions_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.custom_permissions_name = input;
        self
    }
    /// <p>The name of the custom permissions profile that you want to create.</p>
    pub fn get_custom_permissions_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.custom_permissions_name
    }
    /// <p>A set of actions to include in the custom permissions profile.</p>
    pub fn capabilities(mut self, input: crate::types::Capabilities) -> Self {
        self.capabilities = ::std::option::Option::Some(input);
        self
    }
    /// <p>A set of actions to include in the custom permissions profile.</p>
    pub fn set_capabilities(mut self, input: ::std::option::Option<crate::types::Capabilities>) -> Self {
        self.capabilities = input;
        self
    }
    /// <p>A set of actions to include in the custom permissions profile.</p>
    pub fn get_capabilities(&self) -> &::std::option::Option<crate::types::Capabilities> {
        &self.capabilities
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags to associate with the custom permissions profile.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>The tags to associate with the custom permissions profile.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags to associate with the custom permissions profile.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateCustomPermissionsInput`](crate::operation::create_custom_permissions::CreateCustomPermissionsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_custom_permissions::CreateCustomPermissionsInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_custom_permissions::CreateCustomPermissionsInput {
            aws_account_id: self.aws_account_id,
            custom_permissions_name: self.custom_permissions_name,
            capabilities: self.capabilities,
            tags: self.tags,
        })
    }
}