#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct SearchQuickResponsesInput {
pub knowledge_base_id: ::std::option::Option<::std::string::String>,
pub search_expression: ::std::option::Option<crate::types::QuickResponseSearchExpression>,
pub next_token: ::std::option::Option<::std::string::String>,
pub max_results: ::std::option::Option<i32>,
pub attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl SearchQuickResponsesInput {
pub fn knowledge_base_id(&self) -> ::std::option::Option<&str> {
self.knowledge_base_id.as_deref()
}
pub fn search_expression(&self) -> ::std::option::Option<&crate::types::QuickResponseSearchExpression> {
self.search_expression.as_ref()
}
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
pub fn max_results(&self) -> ::std::option::Option<i32> {
self.max_results
}
pub fn attributes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.attributes.as_ref()
}
}
impl ::std::fmt::Debug for SearchQuickResponsesInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("SearchQuickResponsesInput");
formatter.field("knowledge_base_id", &self.knowledge_base_id);
formatter.field("search_expression", &self.search_expression);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.field("attributes", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl SearchQuickResponsesInput {
pub fn builder() -> crate::operation::search_quick_responses::builders::SearchQuickResponsesInputBuilder {
crate::operation::search_quick_responses::builders::SearchQuickResponsesInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct SearchQuickResponsesInputBuilder {
pub(crate) knowledge_base_id: ::std::option::Option<::std::string::String>,
pub(crate) search_expression: ::std::option::Option<crate::types::QuickResponseSearchExpression>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
pub(crate) max_results: ::std::option::Option<i32>,
pub(crate) attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl SearchQuickResponsesInputBuilder {
pub fn knowledge_base_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.knowledge_base_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_knowledge_base_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.knowledge_base_id = input;
self
}
pub fn get_knowledge_base_id(&self) -> &::std::option::Option<::std::string::String> {
&self.knowledge_base_id
}
pub fn search_expression(mut self, input: crate::types::QuickResponseSearchExpression) -> Self {
self.search_expression = ::std::option::Option::Some(input);
self
}
pub fn set_search_expression(mut self, input: ::std::option::Option<crate::types::QuickResponseSearchExpression>) -> Self {
self.search_expression = input;
self
}
pub fn get_search_expression(&self) -> &::std::option::Option<crate::types::QuickResponseSearchExpression> {
&self.search_expression
}
pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_token = input;
self
}
pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_token
}
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = ::std::option::Option::Some(input);
self
}
pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
pub fn get_max_results(&self) -> &::std::option::Option<i32> {
&self.max_results
}
pub fn attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.attributes.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.attributes = ::std::option::Option::Some(hash_map);
self
}
pub fn set_attributes(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.attributes = input;
self
}
pub fn get_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.attributes
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::search_quick_responses::SearchQuickResponsesInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::search_quick_responses::SearchQuickResponsesInput {
knowledge_base_id: self.knowledge_base_id,
search_expression: self.search_expression,
next_token: self.next_token,
max_results: self.max_results,
attributes: self.attributes,
})
}
}
impl ::std::fmt::Debug for SearchQuickResponsesInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("SearchQuickResponsesInputBuilder");
formatter.field("knowledge_base_id", &self.knowledge_base_id);
formatter.field("search_expression", &self.search_expression);
formatter.field("next_token", &self.next_token);
formatter.field("max_results", &self.max_results);
formatter.field("attributes", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}