aws-sdk-wisdom 1.99.0

AWS SDK for Amazon Connect Wisdom 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 NotifyRecommendationsReceivedOutput {
    /// <p>The identifiers of the recommendations.</p>
    pub recommendation_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The identifiers of recommendations that are causing errors.</p>
    pub errors: ::std::option::Option<::std::vec::Vec<crate::types::NotifyRecommendationsReceivedError>>,
    _request_id: Option<String>,
}
impl NotifyRecommendationsReceivedOutput {
    /// <p>The identifiers of the recommendations.</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 `.recommendation_ids.is_none()`.
    pub fn recommendation_ids(&self) -> &[::std::string::String] {
        self.recommendation_ids.as_deref().unwrap_or_default()
    }
    /// <p>The identifiers of recommendations that are causing errors.</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::NotifyRecommendationsReceivedError] {
        self.errors.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for NotifyRecommendationsReceivedOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl NotifyRecommendationsReceivedOutput {
    /// Creates a new builder-style object to manufacture [`NotifyRecommendationsReceivedOutput`](crate::operation::notify_recommendations_received::NotifyRecommendationsReceivedOutput).
    pub fn builder() -> crate::operation::notify_recommendations_received::builders::NotifyRecommendationsReceivedOutputBuilder {
        crate::operation::notify_recommendations_received::builders::NotifyRecommendationsReceivedOutputBuilder::default()
    }
}

/// A builder for [`NotifyRecommendationsReceivedOutput`](crate::operation::notify_recommendations_received::NotifyRecommendationsReceivedOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct NotifyRecommendationsReceivedOutputBuilder {
    pub(crate) recommendation_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) errors: ::std::option::Option<::std::vec::Vec<crate::types::NotifyRecommendationsReceivedError>>,
    _request_id: Option<String>,
}
impl NotifyRecommendationsReceivedOutputBuilder {
    /// Appends an item to `recommendation_ids`.
    ///
    /// To override the contents of this collection use [`set_recommendation_ids`](Self::set_recommendation_ids).
    ///
    /// <p>The identifiers of the recommendations.</p>
    pub fn recommendation_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.recommendation_ids.unwrap_or_default();
        v.push(input.into());
        self.recommendation_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>The identifiers of the recommendations.</p>
    pub fn set_recommendation_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.recommendation_ids = input;
        self
    }
    /// <p>The identifiers of the recommendations.</p>
    pub fn get_recommendation_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.recommendation_ids
    }
    /// Appends an item to `errors`.
    ///
    /// To override the contents of this collection use [`set_errors`](Self::set_errors).
    ///
    /// <p>The identifiers of recommendations that are causing errors.</p>
    pub fn errors(mut self, input: crate::types::NotifyRecommendationsReceivedError) -> Self {
        let mut v = self.errors.unwrap_or_default();
        v.push(input);
        self.errors = ::std::option::Option::Some(v);
        self
    }
    /// <p>The identifiers of recommendations that are causing errors.</p>
    pub fn set_errors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NotifyRecommendationsReceivedError>>) -> Self {
        self.errors = input;
        self
    }
    /// <p>The identifiers of recommendations that are causing errors.</p>
    pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NotifyRecommendationsReceivedError>> {
        &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 [`NotifyRecommendationsReceivedOutput`](crate::operation::notify_recommendations_received::NotifyRecommendationsReceivedOutput).
    pub fn build(self) -> crate::operation::notify_recommendations_received::NotifyRecommendationsReceivedOutput {
        crate::operation::notify_recommendations_received::NotifyRecommendationsReceivedOutput {
            recommendation_ids: self.recommendation_ids,
            errors: self.errors,
            _request_id: self._request_id,
        }
    }
}