aws-sdk-glue 1.147.0

AWS SDK for AWS Glue
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 BatchUpdatePartitionOutput {
    /// <p>The errors encountered when trying to update the requested partitions. A list of <code>BatchUpdatePartitionFailureEntry</code> objects.</p>
    pub errors: ::std::option::Option<::std::vec::Vec<crate::types::BatchUpdatePartitionFailureEntry>>,
    _request_id: Option<String>,
}
impl BatchUpdatePartitionOutput {
    /// <p>The errors encountered when trying to update the requested partitions. A list of <code>BatchUpdatePartitionFailureEntry</code> objects.</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 `.errors.is_none()`.
    pub fn errors(&self) -> &[crate::types::BatchUpdatePartitionFailureEntry] {
        self.errors.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for BatchUpdatePartitionOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl BatchUpdatePartitionOutput {
    /// Creates a new builder-style object to manufacture [`BatchUpdatePartitionOutput`](crate::operation::batch_update_partition::BatchUpdatePartitionOutput).
    pub fn builder() -> crate::operation::batch_update_partition::builders::BatchUpdatePartitionOutputBuilder {
        crate::operation::batch_update_partition::builders::BatchUpdatePartitionOutputBuilder::default()
    }
}

/// A builder for [`BatchUpdatePartitionOutput`](crate::operation::batch_update_partition::BatchUpdatePartitionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchUpdatePartitionOutputBuilder {
    pub(crate) errors: ::std::option::Option<::std::vec::Vec<crate::types::BatchUpdatePartitionFailureEntry>>,
    _request_id: Option<String>,
}
impl BatchUpdatePartitionOutputBuilder {
    /// Appends an item to `errors`.
    ///
    /// To override the contents of this collection use [`set_errors`](Self::set_errors).
    ///
    /// <p>The errors encountered when trying to update the requested partitions. A list of <code>BatchUpdatePartitionFailureEntry</code> objects.</p>
    pub fn errors(mut self, input: crate::types::BatchUpdatePartitionFailureEntry) -> Self {
        let mut v = self.errors.unwrap_or_default();
        v.push(input);
        self.errors = ::std::option::Option::Some(v);
        self
    }
    /// <p>The errors encountered when trying to update the requested partitions. A list of <code>BatchUpdatePartitionFailureEntry</code> objects.</p>
    pub fn set_errors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BatchUpdatePartitionFailureEntry>>) -> Self {
        self.errors = input;
        self
    }
    /// <p>The errors encountered when trying to update the requested partitions. A list of <code>BatchUpdatePartitionFailureEntry</code> objects.</p>
    pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BatchUpdatePartitionFailureEntry>> {
        &self.errors
    }
    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 [`BatchUpdatePartitionOutput`](crate::operation::batch_update_partition::BatchUpdatePartitionOutput).
    pub fn build(self) -> crate::operation::batch_update_partition::BatchUpdatePartitionOutput {
        crate::operation::batch_update_partition::BatchUpdatePartitionOutput {
            errors: self.errors,
            _request_id: self._request_id,
        }
    }
}