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 BatchGetBuildsInput {
    /// <p>The IDs of the builds.</p>
    pub ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BatchGetBuildsInput {
    /// <p>The IDs of the builds.</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 `.ids.is_none()`.
    pub fn ids(&self) -> &[::std::string::String] {
        self.ids.as_deref().unwrap_or_default()
    }
}
impl BatchGetBuildsInput {
    /// Creates a new builder-style object to manufacture [`BatchGetBuildsInput`](crate::operation::batch_get_builds::BatchGetBuildsInput).
    pub fn builder() -> crate::operation::batch_get_builds::builders::BatchGetBuildsInputBuilder {
        crate::operation::batch_get_builds::builders::BatchGetBuildsInputBuilder::default()
    }
}

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