aws-sdk-securityagent 1.2.0

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

/// <p>Input for BatchGetFindings operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchGetFindingsInput {
    /// <p>The list of finding identifiers to retrieve.</p>
    pub finding_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The unique identifier of the agent space that contains the findings.</p>
    pub agent_space_id: ::std::option::Option<::std::string::String>,
}
impl BatchGetFindingsInput {
    /// <p>The list of finding identifiers to retrieve.</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_ids.is_none()`.
    pub fn finding_ids(&self) -> &[::std::string::String] {
        self.finding_ids.as_deref().unwrap_or_default()
    }
    /// <p>The unique identifier of the agent space that contains the findings.</p>
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
}
impl BatchGetFindingsInput {
    /// Creates a new builder-style object to manufacture [`BatchGetFindingsInput`](crate::operation::batch_get_findings::BatchGetFindingsInput).
    pub fn builder() -> crate::operation::batch_get_findings::builders::BatchGetFindingsInputBuilder {
        crate::operation::batch_get_findings::builders::BatchGetFindingsInputBuilder::default()
    }
}

/// A builder for [`BatchGetFindingsInput`](crate::operation::batch_get_findings::BatchGetFindingsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchGetFindingsInputBuilder {
    pub(crate) finding_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
}
impl BatchGetFindingsInputBuilder {
    /// Appends an item to `finding_ids`.
    ///
    /// To override the contents of this collection use [`set_finding_ids`](Self::set_finding_ids).
    ///
    /// <p>The list of finding identifiers to retrieve.</p>
    pub fn finding_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.finding_ids.unwrap_or_default();
        v.push(input.into());
        self.finding_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of finding identifiers to retrieve.</p>
    pub fn set_finding_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.finding_ids = input;
        self
    }
    /// <p>The list of finding identifiers to retrieve.</p>
    pub fn get_finding_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.finding_ids
    }
    /// <p>The unique identifier of the agent space that contains the findings.</p>
    /// This field is required.
    pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the agent space that contains the findings.</p>
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// <p>The unique identifier of the agent space that contains the findings.</p>
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// Consumes the builder and constructs a [`BatchGetFindingsInput`](crate::operation::batch_get_findings::BatchGetFindingsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::batch_get_findings::BatchGetFindingsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::batch_get_findings::BatchGetFindingsInput {
            finding_ids: self.finding_ids,
            agent_space_id: self.agent_space_id,
        })
    }
}