// 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 PutAggregationAuthorizationInput {
    /// <p>The 12-digit account ID of the account authorized to aggregate data.</p>
    pub authorized_account_id: ::std::option::Option<::std::string::String>,
    /// <p>The region authorized to collect aggregated data.</p>
    pub authorized_aws_region: ::std::option::Option<::std::string::String>,
    /// <p>An array of tag object.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl PutAggregationAuthorizationInput {
    /// <p>The 12-digit account ID of the account authorized to aggregate data.</p>
    pub fn authorized_account_id(&self) -> ::std::option::Option<&str> {
        self.authorized_account_id.as_deref()
    }
    /// <p>The region authorized to collect aggregated data.</p>
    pub fn authorized_aws_region(&self) -> ::std::option::Option<&str> {
        self.authorized_aws_region.as_deref()
    }
    /// <p>An array of tag object.</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 PutAggregationAuthorizationInput {
    /// Creates a new builder-style object to manufacture [`PutAggregationAuthorizationInput`](crate::operation::put_aggregation_authorization::PutAggregationAuthorizationInput).
    pub fn builder() -> crate::operation::put_aggregation_authorization::builders::PutAggregationAuthorizationInputBuilder {
        crate::operation::put_aggregation_authorization::builders::PutAggregationAuthorizationInputBuilder::default()
    }
}

/// A builder for [`PutAggregationAuthorizationInput`](crate::operation::put_aggregation_authorization::PutAggregationAuthorizationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutAggregationAuthorizationInputBuilder {
    pub(crate) authorized_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) authorized_aws_region: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl PutAggregationAuthorizationInputBuilder {
    /// <p>The 12-digit account ID of the account authorized to aggregate data.</p>
    /// This field is required.
    pub fn authorized_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.authorized_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The 12-digit account ID of the account authorized to aggregate data.</p>
    pub fn set_authorized_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.authorized_account_id = input;
        self
    }
    /// <p>The 12-digit account ID of the account authorized to aggregate data.</p>
    pub fn get_authorized_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.authorized_account_id
    }
    /// <p>The region authorized to collect aggregated data.</p>
    /// This field is required.
    pub fn authorized_aws_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.authorized_aws_region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The region authorized to collect aggregated data.</p>
    pub fn set_authorized_aws_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.authorized_aws_region = input;
        self
    }
    /// <p>The region authorized to collect aggregated data.</p>
    pub fn get_authorized_aws_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.authorized_aws_region
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>An array of tag object.</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>An array of tag object.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>An array of tag object.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`PutAggregationAuthorizationInput`](crate::operation::put_aggregation_authorization::PutAggregationAuthorizationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::put_aggregation_authorization::PutAggregationAuthorizationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::put_aggregation_authorization::PutAggregationAuthorizationInput {
            authorized_account_id: self.authorized_account_id,
            authorized_aws_region: self.authorized_aws_region,
            tags: self.tags,
        })
    }
}
