aws-sdk-quicksight 1.134.0

AWS SDK for Amazon QuickSight
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 PredictQaResultsOutput {
    /// <p>The primary visual response.</p>
    pub primary_result: ::std::option::Option<crate::types::QaResult>,
    /// <p>Additional visual responses.</p>
    pub additional_results: ::std::option::Option<::std::vec::Vec<crate::types::QaResult>>,
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub request_id: ::std::option::Option<::std::string::String>,
    /// <p>The HTTP status of the request.</p>
    pub status: i32,
    _request_id: Option<String>,
}
impl PredictQaResultsOutput {
    /// <p>The primary visual response.</p>
    pub fn primary_result(&self) -> ::std::option::Option<&crate::types::QaResult> {
        self.primary_result.as_ref()
    }
    /// <p>Additional visual responses.</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 `.additional_results.is_none()`.
    pub fn additional_results(&self) -> &[crate::types::QaResult] {
        self.additional_results.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn request_id(&self) -> ::std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// <p>The HTTP status of the request.</p>
    pub fn status(&self) -> i32 {
        self.status
    }
}
impl ::aws_types::request_id::RequestId for PredictQaResultsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl PredictQaResultsOutput {
    /// Creates a new builder-style object to manufacture [`PredictQaResultsOutput`](crate::operation::predict_qa_results::PredictQaResultsOutput).
    pub fn builder() -> crate::operation::predict_qa_results::builders::PredictQaResultsOutputBuilder {
        crate::operation::predict_qa_results::builders::PredictQaResultsOutputBuilder::default()
    }
}

/// A builder for [`PredictQaResultsOutput`](crate::operation::predict_qa_results::PredictQaResultsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PredictQaResultsOutputBuilder {
    pub(crate) primary_result: ::std::option::Option<crate::types::QaResult>,
    pub(crate) additional_results: ::std::option::Option<::std::vec::Vec<crate::types::QaResult>>,
    pub(crate) request_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<i32>,
    _request_id: Option<String>,
}
impl PredictQaResultsOutputBuilder {
    /// <p>The primary visual response.</p>
    pub fn primary_result(mut self, input: crate::types::QaResult) -> Self {
        self.primary_result = ::std::option::Option::Some(input);
        self
    }
    /// <p>The primary visual response.</p>
    pub fn set_primary_result(mut self, input: ::std::option::Option<crate::types::QaResult>) -> Self {
        self.primary_result = input;
        self
    }
    /// <p>The primary visual response.</p>
    pub fn get_primary_result(&self) -> &::std::option::Option<crate::types::QaResult> {
        &self.primary_result
    }
    /// Appends an item to `additional_results`.
    ///
    /// To override the contents of this collection use [`set_additional_results`](Self::set_additional_results).
    ///
    /// <p>Additional visual responses.</p>
    pub fn additional_results(mut self, input: crate::types::QaResult) -> Self {
        let mut v = self.additional_results.unwrap_or_default();
        v.push(input);
        self.additional_results = ::std::option::Option::Some(v);
        self
    }
    /// <p>Additional visual responses.</p>
    pub fn set_additional_results(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::QaResult>>) -> Self {
        self.additional_results = input;
        self
    }
    /// <p>Additional visual responses.</p>
    pub fn get_additional_results(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QaResult>> {
        &self.additional_results
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.request_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.request_id = input;
        self
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.request_id
    }
    /// <p>The HTTP status of the request.</p>
    pub fn status(mut self, input: i32) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The HTTP status of the request.</p>
    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
        self.status = input;
        self
    }
    /// <p>The HTTP status of the request.</p>
    pub fn get_status(&self) -> &::std::option::Option<i32> {
        &self.status
    }
    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 [`PredictQaResultsOutput`](crate::operation::predict_qa_results::PredictQaResultsOutput).
    pub fn build(self) -> crate::operation::predict_qa_results::PredictQaResultsOutput {
        crate::operation::predict_qa_results::PredictQaResultsOutput {
            primary_result: self.primary_result,
            additional_results: self.additional_results,
            request_id: self.request_id,
            status: self.status.unwrap_or_default(),
            _request_id: self._request_id,
        }
    }
}