aws-sdk-codebuild 1.122.0

AWS SDK for AWS CodeBuild
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 BatchGetFleetsInput {
    /// <p>The names or ARNs of the compute fleets.</p>
    pub names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BatchGetFleetsInput {
    /// <p>The names or ARNs of the compute fleets.</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 `.names.is_none()`.
    pub fn names(&self) -> &[::std::string::String] {
        self.names.as_deref().unwrap_or_default()
    }
}
impl BatchGetFleetsInput {
    /// Creates a new builder-style object to manufacture [`BatchGetFleetsInput`](crate::operation::batch_get_fleets::BatchGetFleetsInput).
    pub fn builder() -> crate::operation::batch_get_fleets::builders::BatchGetFleetsInputBuilder {
        crate::operation::batch_get_fleets::builders::BatchGetFleetsInputBuilder::default()
    }
}

/// A builder for [`BatchGetFleetsInput`](crate::operation::batch_get_fleets::BatchGetFleetsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchGetFleetsInputBuilder {
    pub(crate) names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BatchGetFleetsInputBuilder {
    /// Appends an item to `names`.
    ///
    /// To override the contents of this collection use [`set_names`](Self::set_names).
    ///
    /// <p>The names or ARNs of the compute fleets.</p>
    pub fn names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.names.unwrap_or_default();
        v.push(input.into());
        self.names = ::std::option::Option::Some(v);
        self
    }
    /// <p>The names or ARNs of the compute fleets.</p>
    pub fn set_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.names = input;
        self
    }
    /// <p>The names or ARNs of the compute fleets.</p>
    pub fn get_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.names
    }
    /// Consumes the builder and constructs a [`BatchGetFleetsInput`](crate::operation::batch_get_fleets::BatchGetFleetsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::batch_get_fleets::BatchGetFleetsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::batch_get_fleets::BatchGetFleetsInput { names: self.names })
    }
}