aws-sdk-databasemigration 1.112.0

AWS SDK for AWS Database Migration Service
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 BatchStartRecommendationsOutput {
    /// <p>A list with error details about the analysis of each source database.</p>
    pub error_entries: ::std::option::Option<::std::vec::Vec<crate::types::BatchStartRecommendationsErrorEntry>>,
    _request_id: Option<String>,
}
impl BatchStartRecommendationsOutput {
    /// <p>A list with error details about the analysis of each source database.</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 `.error_entries.is_none()`.
    pub fn error_entries(&self) -> &[crate::types::BatchStartRecommendationsErrorEntry] {
        self.error_entries.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for BatchStartRecommendationsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl BatchStartRecommendationsOutput {
    /// Creates a new builder-style object to manufacture [`BatchStartRecommendationsOutput`](crate::operation::batch_start_recommendations::BatchStartRecommendationsOutput).
    pub fn builder() -> crate::operation::batch_start_recommendations::builders::BatchStartRecommendationsOutputBuilder {
        crate::operation::batch_start_recommendations::builders::BatchStartRecommendationsOutputBuilder::default()
    }
}

/// A builder for [`BatchStartRecommendationsOutput`](crate::operation::batch_start_recommendations::BatchStartRecommendationsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchStartRecommendationsOutputBuilder {
    pub(crate) error_entries: ::std::option::Option<::std::vec::Vec<crate::types::BatchStartRecommendationsErrorEntry>>,
    _request_id: Option<String>,
}
impl BatchStartRecommendationsOutputBuilder {
    /// Appends an item to `error_entries`.
    ///
    /// To override the contents of this collection use [`set_error_entries`](Self::set_error_entries).
    ///
    /// <p>A list with error details about the analysis of each source database.</p>
    pub fn error_entries(mut self, input: crate::types::BatchStartRecommendationsErrorEntry) -> Self {
        let mut v = self.error_entries.unwrap_or_default();
        v.push(input);
        self.error_entries = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list with error details about the analysis of each source database.</p>
    pub fn set_error_entries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BatchStartRecommendationsErrorEntry>>) -> Self {
        self.error_entries = input;
        self
    }
    /// <p>A list with error details about the analysis of each source database.</p>
    pub fn get_error_entries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BatchStartRecommendationsErrorEntry>> {
        &self.error_entries
    }
    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 [`BatchStartRecommendationsOutput`](crate::operation::batch_start_recommendations::BatchStartRecommendationsOutput).
    pub fn build(self) -> crate::operation::batch_start_recommendations::BatchStartRecommendationsOutput {
        crate::operation::batch_start_recommendations::BatchStartRecommendationsOutput {
            error_entries: self.error_entries,
            _request_id: self._request_id,
        }
    }
}