aws-sdk-applicationdiscovery 1.102.0

AWS SDK for AWS Application Discovery Service
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 BatchDeleteAgentsInput {
    /// <p>The list of agents to delete.</p>
    pub delete_agents: ::std::option::Option<::std::vec::Vec<crate::types::DeleteAgent>>,
}
impl BatchDeleteAgentsInput {
    /// <p>The list of agents to delete.</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 `.delete_agents.is_none()`.
    pub fn delete_agents(&self) -> &[crate::types::DeleteAgent] {
        self.delete_agents.as_deref().unwrap_or_default()
    }
}
impl BatchDeleteAgentsInput {
    /// Creates a new builder-style object to manufacture [`BatchDeleteAgentsInput`](crate::operation::batch_delete_agents::BatchDeleteAgentsInput).
    pub fn builder() -> crate::operation::batch_delete_agents::builders::BatchDeleteAgentsInputBuilder {
        crate::operation::batch_delete_agents::builders::BatchDeleteAgentsInputBuilder::default()
    }
}

/// A builder for [`BatchDeleteAgentsInput`](crate::operation::batch_delete_agents::BatchDeleteAgentsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchDeleteAgentsInputBuilder {
    pub(crate) delete_agents: ::std::option::Option<::std::vec::Vec<crate::types::DeleteAgent>>,
}
impl BatchDeleteAgentsInputBuilder {
    /// Appends an item to `delete_agents`.
    ///
    /// To override the contents of this collection use [`set_delete_agents`](Self::set_delete_agents).
    ///
    /// <p>The list of agents to delete.</p>
    pub fn delete_agents(mut self, input: crate::types::DeleteAgent) -> Self {
        let mut v = self.delete_agents.unwrap_or_default();
        v.push(input);
        self.delete_agents = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of agents to delete.</p>
    pub fn set_delete_agents(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DeleteAgent>>) -> Self {
        self.delete_agents = input;
        self
    }
    /// <p>The list of agents to delete.</p>
    pub fn get_delete_agents(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DeleteAgent>> {
        &self.delete_agents
    }
    /// Consumes the builder and constructs a [`BatchDeleteAgentsInput`](crate::operation::batch_delete_agents::BatchDeleteAgentsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::batch_delete_agents::BatchDeleteAgentsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::batch_delete_agents::BatchDeleteAgentsInput {
            delete_agents: self.delete_agents,
        })
    }
}