aws-sdk-quicksight 1.131.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)]
pub struct PredictQaResultsInput {
    /// <p>The ID of the Amazon Web Services account that the user wants to execute Predict QA results in.</p>
    pub aws_account_id: ::std::option::Option<::std::string::String>,
    /// <p>The query text to be used to predict QA results.</p>
    pub query_text: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether Q indicies are included or excluded.</p>
    pub include_quick_sight_q_index: ::std::option::Option<crate::types::IncludeQuickSightQIndex>,
    /// <p>Indicates whether generated answers are included or excluded.</p>
    pub include_generated_answer: ::std::option::Option<crate::types::IncludeGeneratedAnswer>,
    /// <p>The number of maximum topics to be considered to predict QA results.</p>
    pub max_topics_to_consider: ::std::option::Option<i32>,
}
impl PredictQaResultsInput {
    /// <p>The ID of the Amazon Web Services account that the user wants to execute Predict QA results in.</p>
    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
        self.aws_account_id.as_deref()
    }
    /// <p>The query text to be used to predict QA results.</p>
    pub fn query_text(&self) -> ::std::option::Option<&str> {
        self.query_text.as_deref()
    }
    /// <p>Indicates whether Q indicies are included or excluded.</p>
    pub fn include_quick_sight_q_index(&self) -> ::std::option::Option<&crate::types::IncludeQuickSightQIndex> {
        self.include_quick_sight_q_index.as_ref()
    }
    /// <p>Indicates whether generated answers are included or excluded.</p>
    pub fn include_generated_answer(&self) -> ::std::option::Option<&crate::types::IncludeGeneratedAnswer> {
        self.include_generated_answer.as_ref()
    }
    /// <p>The number of maximum topics to be considered to predict QA results.</p>
    pub fn max_topics_to_consider(&self) -> ::std::option::Option<i32> {
        self.max_topics_to_consider
    }
}
impl ::std::fmt::Debug for PredictQaResultsInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PredictQaResultsInput");
        formatter.field("aws_account_id", &self.aws_account_id);
        formatter.field("query_text", &"*** Sensitive Data Redacted ***");
        formatter.field("include_quick_sight_q_index", &self.include_quick_sight_q_index);
        formatter.field("include_generated_answer", &self.include_generated_answer);
        formatter.field("max_topics_to_consider", &self.max_topics_to_consider);
        formatter.finish()
    }
}
impl PredictQaResultsInput {
    /// Creates a new builder-style object to manufacture [`PredictQaResultsInput`](crate::operation::predict_qa_results::PredictQaResultsInput).
    pub fn builder() -> crate::operation::predict_qa_results::builders::PredictQaResultsInputBuilder {
        crate::operation::predict_qa_results::builders::PredictQaResultsInputBuilder::default()
    }
}

/// A builder for [`PredictQaResultsInput`](crate::operation::predict_qa_results::PredictQaResultsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct PredictQaResultsInputBuilder {
    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) query_text: ::std::option::Option<::std::string::String>,
    pub(crate) include_quick_sight_q_index: ::std::option::Option<crate::types::IncludeQuickSightQIndex>,
    pub(crate) include_generated_answer: ::std::option::Option<crate::types::IncludeGeneratedAnswer>,
    pub(crate) max_topics_to_consider: ::std::option::Option<i32>,
}
impl PredictQaResultsInputBuilder {
    /// <p>The ID of the Amazon Web Services account that the user wants to execute Predict QA results in.</p>
    /// This field is required.
    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.aws_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account that the user wants to execute Predict QA results in.</p>
    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.aws_account_id = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that the user wants to execute Predict QA results in.</p>
    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_account_id
    }
    /// <p>The query text to be used to predict QA results.</p>
    /// This field is required.
    pub fn query_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.query_text = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The query text to be used to predict QA results.</p>
    pub fn set_query_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.query_text = input;
        self
    }
    /// <p>The query text to be used to predict QA results.</p>
    pub fn get_query_text(&self) -> &::std::option::Option<::std::string::String> {
        &self.query_text
    }
    /// <p>Indicates whether Q indicies are included or excluded.</p>
    pub fn include_quick_sight_q_index(mut self, input: crate::types::IncludeQuickSightQIndex) -> Self {
        self.include_quick_sight_q_index = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether Q indicies are included or excluded.</p>
    pub fn set_include_quick_sight_q_index(mut self, input: ::std::option::Option<crate::types::IncludeQuickSightQIndex>) -> Self {
        self.include_quick_sight_q_index = input;
        self
    }
    /// <p>Indicates whether Q indicies are included or excluded.</p>
    pub fn get_include_quick_sight_q_index(&self) -> &::std::option::Option<crate::types::IncludeQuickSightQIndex> {
        &self.include_quick_sight_q_index
    }
    /// <p>Indicates whether generated answers are included or excluded.</p>
    pub fn include_generated_answer(mut self, input: crate::types::IncludeGeneratedAnswer) -> Self {
        self.include_generated_answer = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether generated answers are included or excluded.</p>
    pub fn set_include_generated_answer(mut self, input: ::std::option::Option<crate::types::IncludeGeneratedAnswer>) -> Self {
        self.include_generated_answer = input;
        self
    }
    /// <p>Indicates whether generated answers are included or excluded.</p>
    pub fn get_include_generated_answer(&self) -> &::std::option::Option<crate::types::IncludeGeneratedAnswer> {
        &self.include_generated_answer
    }
    /// <p>The number of maximum topics to be considered to predict QA results.</p>
    pub fn max_topics_to_consider(mut self, input: i32) -> Self {
        self.max_topics_to_consider = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of maximum topics to be considered to predict QA results.</p>
    pub fn set_max_topics_to_consider(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_topics_to_consider = input;
        self
    }
    /// <p>The number of maximum topics to be considered to predict QA results.</p>
    pub fn get_max_topics_to_consider(&self) -> &::std::option::Option<i32> {
        &self.max_topics_to_consider
    }
    /// Consumes the builder and constructs a [`PredictQaResultsInput`](crate::operation::predict_qa_results::PredictQaResultsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::predict_qa_results::PredictQaResultsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::predict_qa_results::PredictQaResultsInput {
            aws_account_id: self.aws_account_id,
            query_text: self.query_text,
            include_quick_sight_q_index: self.include_quick_sight_q_index,
            include_generated_answer: self.include_generated_answer,
            max_topics_to_consider: self.max_topics_to_consider,
        })
    }
}
impl ::std::fmt::Debug for PredictQaResultsInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PredictQaResultsInputBuilder");
        formatter.field("aws_account_id", &self.aws_account_id);
        formatter.field("query_text", &"*** Sensitive Data Redacted ***");
        formatter.field("include_quick_sight_q_index", &self.include_quick_sight_q_index);
        formatter.field("include_generated_answer", &self.include_generated_answer);
        formatter.field("max_topics_to_consider", &self.max_topics_to_consider);
        formatter.finish()
    }
}