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 BatchDeleteBuildsOutput {
    /// <p>The IDs of the builds that were successfully deleted.</p>
    pub builds_deleted: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Information about any builds that could not be successfully deleted.</p>
    pub builds_not_deleted: ::std::option::Option<::std::vec::Vec<crate::types::BuildNotDeleted>>,
    _request_id: Option<String>,
}
impl BatchDeleteBuildsOutput {
    /// <p>The IDs of the builds that were successfully deleted.</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 `.builds_deleted.is_none()`.
    pub fn builds_deleted(&self) -> &[::std::string::String] {
        self.builds_deleted.as_deref().unwrap_or_default()
    }
    /// <p>Information about any builds that could not be successfully deleted.</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 `.builds_not_deleted.is_none()`.
    pub fn builds_not_deleted(&self) -> &[crate::types::BuildNotDeleted] {
        self.builds_not_deleted.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for BatchDeleteBuildsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl BatchDeleteBuildsOutput {
    /// Creates a new builder-style object to manufacture [`BatchDeleteBuildsOutput`](crate::operation::batch_delete_builds::BatchDeleteBuildsOutput).
    pub fn builder() -> crate::operation::batch_delete_builds::builders::BatchDeleteBuildsOutputBuilder {
        crate::operation::batch_delete_builds::builders::BatchDeleteBuildsOutputBuilder::default()
    }
}

/// A builder for [`BatchDeleteBuildsOutput`](crate::operation::batch_delete_builds::BatchDeleteBuildsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchDeleteBuildsOutputBuilder {
    pub(crate) builds_deleted: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) builds_not_deleted: ::std::option::Option<::std::vec::Vec<crate::types::BuildNotDeleted>>,
    _request_id: Option<String>,
}
impl BatchDeleteBuildsOutputBuilder {
    /// Appends an item to `builds_deleted`.
    ///
    /// To override the contents of this collection use [`set_builds_deleted`](Self::set_builds_deleted).
    ///
    /// <p>The IDs of the builds that were successfully deleted.</p>
    pub fn builds_deleted(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.builds_deleted.unwrap_or_default();
        v.push(input.into());
        self.builds_deleted = ::std::option::Option::Some(v);
        self
    }
    /// <p>The IDs of the builds that were successfully deleted.</p>
    pub fn set_builds_deleted(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.builds_deleted = input;
        self
    }
    /// <p>The IDs of the builds that were successfully deleted.</p>
    pub fn get_builds_deleted(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.builds_deleted
    }
    /// Appends an item to `builds_not_deleted`.
    ///
    /// To override the contents of this collection use [`set_builds_not_deleted`](Self::set_builds_not_deleted).
    ///
    /// <p>Information about any builds that could not be successfully deleted.</p>
    pub fn builds_not_deleted(mut self, input: crate::types::BuildNotDeleted) -> Self {
        let mut v = self.builds_not_deleted.unwrap_or_default();
        v.push(input);
        self.builds_not_deleted = ::std::option::Option::Some(v);
        self
    }
    /// <p>Information about any builds that could not be successfully deleted.</p>
    pub fn set_builds_not_deleted(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BuildNotDeleted>>) -> Self {
        self.builds_not_deleted = input;
        self
    }
    /// <p>Information about any builds that could not be successfully deleted.</p>
    pub fn get_builds_not_deleted(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BuildNotDeleted>> {
        &self.builds_not_deleted
    }
    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 [`BatchDeleteBuildsOutput`](crate::operation::batch_delete_builds::BatchDeleteBuildsOutput).
    pub fn build(self) -> crate::operation::batch_delete_builds::BatchDeleteBuildsOutput {
        crate::operation::batch_delete_builds::BatchDeleteBuildsOutput {
            builds_deleted: self.builds_deleted,
            builds_not_deleted: self.builds_not_deleted,
            _request_id: self._request_id,
        }
    }
}