aws_sdk_qconnect/operation/search_content/
_search_content_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SearchContentInput {
6 pub next_token: ::std::option::Option<::std::string::String>,
8 pub max_results: ::std::option::Option<i32>,
10 pub knowledge_base_id: ::std::option::Option<::std::string::String>,
12 pub search_expression: ::std::option::Option<crate::types::SearchExpression>,
14}
15impl SearchContentInput {
16 pub fn next_token(&self) -> ::std::option::Option<&str> {
18 self.next_token.as_deref()
19 }
20 pub fn max_results(&self) -> ::std::option::Option<i32> {
22 self.max_results
23 }
24 pub fn knowledge_base_id(&self) -> ::std::option::Option<&str> {
26 self.knowledge_base_id.as_deref()
27 }
28 pub fn search_expression(&self) -> ::std::option::Option<&crate::types::SearchExpression> {
30 self.search_expression.as_ref()
31 }
32}
33impl SearchContentInput {
34 pub fn builder() -> crate::operation::search_content::builders::SearchContentInputBuilder {
36 crate::operation::search_content::builders::SearchContentInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct SearchContentInputBuilder {
44 pub(crate) next_token: ::std::option::Option<::std::string::String>,
45 pub(crate) max_results: ::std::option::Option<i32>,
46 pub(crate) knowledge_base_id: ::std::option::Option<::std::string::String>,
47 pub(crate) search_expression: ::std::option::Option<crate::types::SearchExpression>,
48}
49impl SearchContentInputBuilder {
50 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52 self.next_token = ::std::option::Option::Some(input.into());
53 self
54 }
55 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57 self.next_token = input;
58 self
59 }
60 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
62 &self.next_token
63 }
64 pub fn max_results(mut self, input: i32) -> Self {
66 self.max_results = ::std::option::Option::Some(input);
67 self
68 }
69 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
71 self.max_results = input;
72 self
73 }
74 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
76 &self.max_results
77 }
78 pub fn knowledge_base_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.knowledge_base_id = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_knowledge_base_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.knowledge_base_id = input;
87 self
88 }
89 pub fn get_knowledge_base_id(&self) -> &::std::option::Option<::std::string::String> {
91 &self.knowledge_base_id
92 }
93 pub fn search_expression(mut self, input: crate::types::SearchExpression) -> Self {
96 self.search_expression = ::std::option::Option::Some(input);
97 self
98 }
99 pub fn set_search_expression(mut self, input: ::std::option::Option<crate::types::SearchExpression>) -> Self {
101 self.search_expression = input;
102 self
103 }
104 pub fn get_search_expression(&self) -> &::std::option::Option<crate::types::SearchExpression> {
106 &self.search_expression
107 }
108 pub fn build(
110 self,
111 ) -> ::std::result::Result<crate::operation::search_content::SearchContentInput, ::aws_smithy_types::error::operation::BuildError> {
112 ::std::result::Result::Ok(crate::operation::search_content::SearchContentInput {
113 next_token: self.next_token,
114 max_results: self.max_results,
115 knowledge_base_id: self.knowledge_base_id,
116 search_expression: self.search_expression,
117 })
118 }
119}