// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An object to filter the configuration recorders based on the resource types in scope for recording.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AggregatorFilterResourceType {
    /// <p>The type of resource type filter to apply. <code>INCLUDE</code> specifies that the list of resource types in the <code>Value</code> field will be aggregated and no other resource types will be filtered.</p>
    pub r#type: ::std::option::Option<crate::types::AggregatorFilterType>,
    /// <p>Comma-separate list of resource types to filter your aggregated configuration recorders.</p>
    pub value: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl AggregatorFilterResourceType {
    /// <p>The type of resource type filter to apply. <code>INCLUDE</code> specifies that the list of resource types in the <code>Value</code> field will be aggregated and no other resource types will be filtered.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::AggregatorFilterType> {
        self.r#type.as_ref()
    }
    /// <p>Comma-separate list of resource types to filter your aggregated configuration recorders.</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 `.value.is_none()`.
    pub fn value(&self) -> &[::std::string::String] {
        self.value.as_deref().unwrap_or_default()
    }
}
impl AggregatorFilterResourceType {
    /// Creates a new builder-style object to manufacture [`AggregatorFilterResourceType`](crate::types::AggregatorFilterResourceType).
    pub fn builder() -> crate::types::builders::AggregatorFilterResourceTypeBuilder {
        crate::types::builders::AggregatorFilterResourceTypeBuilder::default()
    }
}

/// A builder for [`AggregatorFilterResourceType`](crate::types::AggregatorFilterResourceType).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AggregatorFilterResourceTypeBuilder {
    pub(crate) r#type: ::std::option::Option<crate::types::AggregatorFilterType>,
    pub(crate) value: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl AggregatorFilterResourceTypeBuilder {
    /// <p>The type of resource type filter to apply. <code>INCLUDE</code> specifies that the list of resource types in the <code>Value</code> field will be aggregated and no other resource types will be filtered.</p>
    pub fn r#type(mut self, input: crate::types::AggregatorFilterType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of resource type filter to apply. <code>INCLUDE</code> specifies that the list of resource types in the <code>Value</code> field will be aggregated and no other resource types will be filtered.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::AggregatorFilterType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of resource type filter to apply. <code>INCLUDE</code> specifies that the list of resource types in the <code>Value</code> field will be aggregated and no other resource types will be filtered.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::AggregatorFilterType> {
        &self.r#type
    }
    /// Appends an item to `value`.
    ///
    /// To override the contents of this collection use [`set_value`](Self::set_value).
    ///
    /// <p>Comma-separate list of resource types to filter your aggregated configuration recorders.</p>
    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.value.unwrap_or_default();
        v.push(input.into());
        self.value = ::std::option::Option::Some(v);
        self
    }
    /// <p>Comma-separate list of resource types to filter your aggregated configuration recorders.</p>
    pub fn set_value(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.value = input;
        self
    }
    /// <p>Comma-separate list of resource types to filter your aggregated configuration recorders.</p>
    pub fn get_value(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.value
    }
    /// Consumes the builder and constructs a [`AggregatorFilterResourceType`](crate::types::AggregatorFilterResourceType).
    pub fn build(self) -> crate::types::AggregatorFilterResourceType {
        crate::types::AggregatorFilterResourceType {
            r#type: self.r#type,
            value: self.value,
        }
    }
}
