#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct PredictQaResultsInput {
pub aws_account_id: ::std::option::Option<::std::string::String>,
pub query_text: ::std::option::Option<::std::string::String>,
pub include_quick_sight_q_index: ::std::option::Option<crate::types::IncludeQuickSightQIndex>,
pub include_generated_answer: ::std::option::Option<crate::types::IncludeGeneratedAnswer>,
pub max_topics_to_consider: ::std::option::Option<i32>,
}
impl PredictQaResultsInput {
pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
self.aws_account_id.as_deref()
}
pub fn query_text(&self) -> ::std::option::Option<&str> {
self.query_text.as_deref()
}
pub fn include_quick_sight_q_index(&self) -> ::std::option::Option<&crate::types::IncludeQuickSightQIndex> {
self.include_quick_sight_q_index.as_ref()
}
pub fn include_generated_answer(&self) -> ::std::option::Option<&crate::types::IncludeGeneratedAnswer> {
self.include_generated_answer.as_ref()
}
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 {
pub fn builder() -> crate::operation::predict_qa_results::builders::PredictQaResultsInputBuilder {
crate::operation::predict_qa_results::builders::PredictQaResultsInputBuilder::default()
}
}
#[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 {
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
}
pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.aws_account_id = input;
self
}
pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.aws_account_id
}
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
}
pub fn set_query_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.query_text = input;
self
}
pub fn get_query_text(&self) -> &::std::option::Option<::std::string::String> {
&self.query_text
}
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
}
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
}
pub fn get_include_quick_sight_q_index(&self) -> &::std::option::Option<crate::types::IncludeQuickSightQIndex> {
&self.include_quick_sight_q_index
}
pub fn include_generated_answer(mut self, input: crate::types::IncludeGeneratedAnswer) -> Self {
self.include_generated_answer = ::std::option::Option::Some(input);
self
}
pub fn set_include_generated_answer(mut self, input: ::std::option::Option<crate::types::IncludeGeneratedAnswer>) -> Self {
self.include_generated_answer = input;
self
}
pub fn get_include_generated_answer(&self) -> &::std::option::Option<crate::types::IncludeGeneratedAnswer> {
&self.include_generated_answer
}
pub fn max_topics_to_consider(mut self, input: i32) -> Self {
self.max_topics_to_consider = ::std::option::Option::Some(input);
self
}
pub fn set_max_topics_to_consider(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_topics_to_consider = input;
self
}
pub fn get_max_topics_to_consider(&self) -> &::std::option::Option<i32> {
&self.max_topics_to_consider
}
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()
}
}