aws-sdk-s3control 1.107.0

AWS SDK for AWS S3 Control
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A container for what Amazon S3 Storage Lens will exclude.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Exclude {
    /// <p>A container for the S3 Storage Lens bucket excludes.</p>
    pub buckets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>A container for the S3 Storage Lens Region excludes.</p>
    pub regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Exclude {
    /// <p>A container for the S3 Storage Lens bucket excludes.</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 `.buckets.is_none()`.
    pub fn buckets(&self) -> &[::std::string::String] {
        self.buckets.as_deref().unwrap_or_default()
    }
    /// <p>A container for the S3 Storage Lens Region excludes.</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 `.regions.is_none()`.
    pub fn regions(&self) -> &[::std::string::String] {
        self.regions.as_deref().unwrap_or_default()
    }
}
impl Exclude {
    /// Creates a new builder-style object to manufacture [`Exclude`](crate::types::Exclude).
    pub fn builder() -> crate::types::builders::ExcludeBuilder {
        crate::types::builders::ExcludeBuilder::default()
    }
}

/// A builder for [`Exclude`](crate::types::Exclude).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ExcludeBuilder {
    pub(crate) buckets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl ExcludeBuilder {
    /// Appends an item to `buckets`.
    ///
    /// To override the contents of this collection use [`set_buckets`](Self::set_buckets).
    ///
    /// <p>A container for the S3 Storage Lens bucket excludes.</p>
    pub fn buckets(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.buckets.unwrap_or_default();
        v.push(input.into());
        self.buckets = ::std::option::Option::Some(v);
        self
    }
    /// <p>A container for the S3 Storage Lens bucket excludes.</p>
    pub fn set_buckets(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.buckets = input;
        self
    }
    /// <p>A container for the S3 Storage Lens bucket excludes.</p>
    pub fn get_buckets(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.buckets
    }
    /// Appends an item to `regions`.
    ///
    /// To override the contents of this collection use [`set_regions`](Self::set_regions).
    ///
    /// <p>A container for the S3 Storage Lens Region excludes.</p>
    pub fn regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.regions.unwrap_or_default();
        v.push(input.into());
        self.regions = ::std::option::Option::Some(v);
        self
    }
    /// <p>A container for the S3 Storage Lens Region excludes.</p>
    pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.regions = input;
        self
    }
    /// <p>A container for the S3 Storage Lens Region excludes.</p>
    pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.regions
    }
    /// Consumes the builder and constructs a [`Exclude`](crate::types::Exclude).
    pub fn build(self) -> crate::types::Exclude {
        crate::types::Exclude {
            buckets: self.buckets,
            regions: self.regions,
        }
    }
}