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 BatchGetSandboxesOutput {
    /// <p>Information about the requested sandboxes.</p>
    pub sandboxes: ::std::option::Option<::std::vec::Vec<crate::types::Sandbox>>,
    /// <p>The IDs of sandboxes for which information could not be found.</p>
    pub sandboxes_not_found: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    _request_id: Option<String>,
}
impl BatchGetSandboxesOutput {
    /// <p>Information about the requested sandboxes.</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 `.sandboxes.is_none()`.
    pub fn sandboxes(&self) -> &[crate::types::Sandbox] {
        self.sandboxes.as_deref().unwrap_or_default()
    }
    /// <p>The IDs of sandboxes for which information could not be found.</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 `.sandboxes_not_found.is_none()`.
    pub fn sandboxes_not_found(&self) -> &[::std::string::String] {
        self.sandboxes_not_found.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for BatchGetSandboxesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl BatchGetSandboxesOutput {
    /// Creates a new builder-style object to manufacture [`BatchGetSandboxesOutput`](crate::operation::batch_get_sandboxes::BatchGetSandboxesOutput).
    pub fn builder() -> crate::operation::batch_get_sandboxes::builders::BatchGetSandboxesOutputBuilder {
        crate::operation::batch_get_sandboxes::builders::BatchGetSandboxesOutputBuilder::default()
    }
}

/// A builder for [`BatchGetSandboxesOutput`](crate::operation::batch_get_sandboxes::BatchGetSandboxesOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchGetSandboxesOutputBuilder {
    pub(crate) sandboxes: ::std::option::Option<::std::vec::Vec<crate::types::Sandbox>>,
    pub(crate) sandboxes_not_found: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    _request_id: Option<String>,
}
impl BatchGetSandboxesOutputBuilder {
    /// Appends an item to `sandboxes`.
    ///
    /// To override the contents of this collection use [`set_sandboxes`](Self::set_sandboxes).
    ///
    /// <p>Information about the requested sandboxes.</p>
    pub fn sandboxes(mut self, input: crate::types::Sandbox) -> Self {
        let mut v = self.sandboxes.unwrap_or_default();
        v.push(input);
        self.sandboxes = ::std::option::Option::Some(v);
        self
    }
    /// <p>Information about the requested sandboxes.</p>
    pub fn set_sandboxes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Sandbox>>) -> Self {
        self.sandboxes = input;
        self
    }
    /// <p>Information about the requested sandboxes.</p>
    pub fn get_sandboxes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Sandbox>> {
        &self.sandboxes
    }
    /// Appends an item to `sandboxes_not_found`.
    ///
    /// To override the contents of this collection use [`set_sandboxes_not_found`](Self::set_sandboxes_not_found).
    ///
    /// <p>The IDs of sandboxes for which information could not be found.</p>
    pub fn sandboxes_not_found(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.sandboxes_not_found.unwrap_or_default();
        v.push(input.into());
        self.sandboxes_not_found = ::std::option::Option::Some(v);
        self
    }
    /// <p>The IDs of sandboxes for which information could not be found.</p>
    pub fn set_sandboxes_not_found(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.sandboxes_not_found = input;
        self
    }
    /// <p>The IDs of sandboxes for which information could not be found.</p>
    pub fn get_sandboxes_not_found(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.sandboxes_not_found
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`BatchGetSandboxesOutput`](crate::operation::batch_get_sandboxes::BatchGetSandboxesOutput).
    pub fn build(self) -> crate::operation::batch_get_sandboxes::BatchGetSandboxesOutput {
        crate::operation::batch_get_sandboxes::BatchGetSandboxesOutput {
            sandboxes: self.sandboxes,
            sandboxes_not_found: self.sandboxes_not_found,
            _request_id: self._request_id,
        }
    }
}