aws-sdk-quicksight 1.122.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 CreateBrandInput {
    /// <p>The ID of the Amazon Web Services account that owns the brand.</p>
    pub aws_account_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Quick Suite brand.</p>
    pub brand_id: ::std::option::Option<::std::string::String>,
    /// <p>The definition of the brand.</p>
    pub brand_definition: ::std::option::Option<crate::types::BrandDefinition>,
    /// <p>A map of the key-value pairs that are assigned to the brand.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateBrandInput {
    /// <p>The ID of the Amazon Web Services account that owns the brand.</p>
    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
        self.aws_account_id.as_deref()
    }
    /// <p>The ID of the Quick Suite brand.</p>
    pub fn brand_id(&self) -> ::std::option::Option<&str> {
        self.brand_id.as_deref()
    }
    /// <p>The definition of the brand.</p>
    pub fn brand_definition(&self) -> ::std::option::Option<&crate::types::BrandDefinition> {
        self.brand_definition.as_ref()
    }
    /// <p>A map of the key-value pairs that are assigned to the brand.</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 CreateBrandInput {
    /// Creates a new builder-style object to manufacture [`CreateBrandInput`](crate::operation::create_brand::CreateBrandInput).
    pub fn builder() -> crate::operation::create_brand::builders::CreateBrandInputBuilder {
        crate::operation::create_brand::builders::CreateBrandInputBuilder::default()
    }
}

/// A builder for [`CreateBrandInput`](crate::operation::create_brand::CreateBrandInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateBrandInputBuilder {
    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) brand_id: ::std::option::Option<::std::string::String>,
    pub(crate) brand_definition: ::std::option::Option<crate::types::BrandDefinition>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateBrandInputBuilder {
    /// <p>The ID of the Amazon Web Services account that owns the brand.</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 owns the brand.</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 owns the brand.</p>
    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_account_id
    }
    /// <p>The ID of the Quick Suite brand.</p>
    /// This field is required.
    pub fn brand_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.brand_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Quick Suite brand.</p>
    pub fn set_brand_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.brand_id = input;
        self
    }
    /// <p>The ID of the Quick Suite brand.</p>
    pub fn get_brand_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.brand_id
    }
    /// <p>The definition of the brand.</p>
    pub fn brand_definition(mut self, input: crate::types::BrandDefinition) -> Self {
        self.brand_definition = ::std::option::Option::Some(input);
        self
    }
    /// <p>The definition of the brand.</p>
    pub fn set_brand_definition(mut self, input: ::std::option::Option<crate::types::BrandDefinition>) -> Self {
        self.brand_definition = input;
        self
    }
    /// <p>The definition of the brand.</p>
    pub fn get_brand_definition(&self) -> &::std::option::Option<crate::types::BrandDefinition> {
        &self.brand_definition
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A map of the key-value pairs that are assigned to the brand.</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>A map of the key-value pairs that are assigned to the brand.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A map of the key-value pairs that are assigned to the brand.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateBrandInput`](crate::operation::create_brand::CreateBrandInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_brand::CreateBrandInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_brand::CreateBrandInput {
            aws_account_id: self.aws_account_id,
            brand_id: self.brand_id,
            brand_definition: self.brand_definition,
            tags: self.tags,
        })
    }
}