aws-sdk-redshift 1.106.0

AWS SDK for Amazon Redshift
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 DescribeAccountAttributesInput {
    /// <p>A list of attribute names.</p>
    pub attribute_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DescribeAccountAttributesInput {
    /// <p>A list of attribute names.</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 `.attribute_names.is_none()`.
    pub fn attribute_names(&self) -> &[::std::string::String] {
        self.attribute_names.as_deref().unwrap_or_default()
    }
}
impl DescribeAccountAttributesInput {
    /// Creates a new builder-style object to manufacture [`DescribeAccountAttributesInput`](crate::operation::describe_account_attributes::DescribeAccountAttributesInput).
    pub fn builder() -> crate::operation::describe_account_attributes::builders::DescribeAccountAttributesInputBuilder {
        crate::operation::describe_account_attributes::builders::DescribeAccountAttributesInputBuilder::default()
    }
}

/// A builder for [`DescribeAccountAttributesInput`](crate::operation::describe_account_attributes::DescribeAccountAttributesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeAccountAttributesInputBuilder {
    pub(crate) attribute_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DescribeAccountAttributesInputBuilder {
    /// Appends an item to `attribute_names`.
    ///
    /// To override the contents of this collection use [`set_attribute_names`](Self::set_attribute_names).
    ///
    /// <p>A list of attribute names.</p>
    pub fn attribute_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.attribute_names.unwrap_or_default();
        v.push(input.into());
        self.attribute_names = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of attribute names.</p>
    pub fn set_attribute_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.attribute_names = input;
        self
    }
    /// <p>A list of attribute names.</p>
    pub fn get_attribute_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.attribute_names
    }
    /// Consumes the builder and constructs a [`DescribeAccountAttributesInput`](crate::operation::describe_account_attributes::DescribeAccountAttributesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::describe_account_attributes::DescribeAccountAttributesInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::describe_account_attributes::DescribeAccountAttributesInput {
            attribute_names: self.attribute_names,
        })
    }
}