aws-sdk-securityagent 1.1.0

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

/// Input for retrieving multiple pentests by their IDs
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchGetPentestsInput {
    /// List of pentest IDs to retrieve
    pub pentest_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// ID of the agent space where the pentest exists
    pub agent_space_id: ::std::option::Option<::std::string::String>,
}
impl BatchGetPentestsInput {
    /// List of pentest IDs to retrieve
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.pentest_ids.is_none()`.
    pub fn pentest_ids(&self) -> &[::std::string::String] {
        self.pentest_ids.as_deref().unwrap_or_default()
    }
    /// ID of the agent space where the pentest exists
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
}
impl BatchGetPentestsInput {
    /// Creates a new builder-style object to manufacture [`BatchGetPentestsInput`](crate::operation::batch_get_pentests::BatchGetPentestsInput).
    pub fn builder() -> crate::operation::batch_get_pentests::builders::BatchGetPentestsInputBuilder {
        crate::operation::batch_get_pentests::builders::BatchGetPentestsInputBuilder::default()
    }
}

/// A builder for [`BatchGetPentestsInput`](crate::operation::batch_get_pentests::BatchGetPentestsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchGetPentestsInputBuilder {
    pub(crate) pentest_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
}
impl BatchGetPentestsInputBuilder {
    /// Appends an item to `pentest_ids`.
    ///
    /// To override the contents of this collection use [`set_pentest_ids`](Self::set_pentest_ids).
    ///
    /// List of pentest IDs to retrieve
    pub fn pentest_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.pentest_ids.unwrap_or_default();
        v.push(input.into());
        self.pentest_ids = ::std::option::Option::Some(v);
        self
    }
    /// List of pentest IDs to retrieve
    pub fn set_pentest_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.pentest_ids = input;
        self
    }
    /// List of pentest IDs to retrieve
    pub fn get_pentest_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.pentest_ids
    }
    /// ID of the agent space where the pentest exists
    /// 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
    }
    /// ID of the agent space where the pentest exists
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// ID of the agent space where the pentest exists
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// Consumes the builder and constructs a [`BatchGetPentestsInput`](crate::operation::batch_get_pentests::BatchGetPentestsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::batch_get_pentests::BatchGetPentestsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::batch_get_pentests::BatchGetPentestsInput {
            pentest_ids: self.pentest_ids,
            agent_space_id: self.agent_space_id,
        })
    }
}