aws-sdk-macie2 1.95.0

AWS SDK for Amazon Macie 2
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 CreateSampleFindingsInput {
    /// <p>An array of finding types, one for each type of sample finding to create. To create a sample of every type of finding that Amazon Macie supports, don't include this array in your request.</p>
    pub finding_types: ::std::option::Option<::std::vec::Vec<crate::types::FindingType>>,
}
impl CreateSampleFindingsInput {
    /// <p>An array of finding types, one for each type of sample finding to create. To create a sample of every type of finding that Amazon Macie supports, don't include this array in your request.</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 `.finding_types.is_none()`.
    pub fn finding_types(&self) -> &[crate::types::FindingType] {
        self.finding_types.as_deref().unwrap_or_default()
    }
}
impl CreateSampleFindingsInput {
    /// Creates a new builder-style object to manufacture [`CreateSampleFindingsInput`](crate::operation::create_sample_findings::CreateSampleFindingsInput).
    pub fn builder() -> crate::operation::create_sample_findings::builders::CreateSampleFindingsInputBuilder {
        crate::operation::create_sample_findings::builders::CreateSampleFindingsInputBuilder::default()
    }
}

/// A builder for [`CreateSampleFindingsInput`](crate::operation::create_sample_findings::CreateSampleFindingsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSampleFindingsInputBuilder {
    pub(crate) finding_types: ::std::option::Option<::std::vec::Vec<crate::types::FindingType>>,
}
impl CreateSampleFindingsInputBuilder {
    /// Appends an item to `finding_types`.
    ///
    /// To override the contents of this collection use [`set_finding_types`](Self::set_finding_types).
    ///
    /// <p>An array of finding types, one for each type of sample finding to create. To create a sample of every type of finding that Amazon Macie supports, don't include this array in your request.</p>
    pub fn finding_types(mut self, input: crate::types::FindingType) -> Self {
        let mut v = self.finding_types.unwrap_or_default();
        v.push(input);
        self.finding_types = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of finding types, one for each type of sample finding to create. To create a sample of every type of finding that Amazon Macie supports, don't include this array in your request.</p>
    pub fn set_finding_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FindingType>>) -> Self {
        self.finding_types = input;
        self
    }
    /// <p>An array of finding types, one for each type of sample finding to create. To create a sample of every type of finding that Amazon Macie supports, don't include this array in your request.</p>
    pub fn get_finding_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FindingType>> {
        &self.finding_types
    }
    /// Consumes the builder and constructs a [`CreateSampleFindingsInput`](crate::operation::create_sample_findings::CreateSampleFindingsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_sample_findings::CreateSampleFindingsInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_sample_findings::CreateSampleFindingsInput {
            finding_types: self.finding_types,
        })
    }
}