aws_sdk_chimesdkmessaging/operation/search_channels/
_search_channels_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct SearchChannelsInput {
6 pub chime_bearer: ::std::option::Option<::std::string::String>,
8 pub fields: ::std::option::Option<::std::vec::Vec<crate::types::SearchField>>,
10 pub max_results: ::std::option::Option<i32>,
12 pub next_token: ::std::option::Option<::std::string::String>,
14}
15impl SearchChannelsInput {
16 pub fn chime_bearer(&self) -> ::std::option::Option<&str> {
18 self.chime_bearer.as_deref()
19 }
20 pub fn fields(&self) -> &[crate::types::SearchField] {
24 self.fields.as_deref().unwrap_or_default()
25 }
26 pub fn max_results(&self) -> ::std::option::Option<i32> {
28 self.max_results
29 }
30 pub fn next_token(&self) -> ::std::option::Option<&str> {
32 self.next_token.as_deref()
33 }
34}
35impl ::std::fmt::Debug for SearchChannelsInput {
36 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
37 let mut formatter = f.debug_struct("SearchChannelsInput");
38 formatter.field("chime_bearer", &self.chime_bearer);
39 formatter.field("fields", &self.fields);
40 formatter.field("max_results", &self.max_results);
41 formatter.field("next_token", &"*** Sensitive Data Redacted ***");
42 formatter.finish()
43 }
44}
45impl SearchChannelsInput {
46 pub fn builder() -> crate::operation::search_channels::builders::SearchChannelsInputBuilder {
48 crate::operation::search_channels::builders::SearchChannelsInputBuilder::default()
49 }
50}
51
52#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
54#[non_exhaustive]
55pub struct SearchChannelsInputBuilder {
56 pub(crate) chime_bearer: ::std::option::Option<::std::string::String>,
57 pub(crate) fields: ::std::option::Option<::std::vec::Vec<crate::types::SearchField>>,
58 pub(crate) max_results: ::std::option::Option<i32>,
59 pub(crate) next_token: ::std::option::Option<::std::string::String>,
60}
61impl SearchChannelsInputBuilder {
62 pub fn chime_bearer(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64 self.chime_bearer = ::std::option::Option::Some(input.into());
65 self
66 }
67 pub fn set_chime_bearer(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69 self.chime_bearer = input;
70 self
71 }
72 pub fn get_chime_bearer(&self) -> &::std::option::Option<::std::string::String> {
74 &self.chime_bearer
75 }
76 pub fn fields(mut self, input: crate::types::SearchField) -> Self {
82 let mut v = self.fields.unwrap_or_default();
83 v.push(input);
84 self.fields = ::std::option::Option::Some(v);
85 self
86 }
87 pub fn set_fields(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SearchField>>) -> Self {
89 self.fields = input;
90 self
91 }
92 pub fn get_fields(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SearchField>> {
94 &self.fields
95 }
96 pub fn max_results(mut self, input: i32) -> Self {
98 self.max_results = ::std::option::Option::Some(input);
99 self
100 }
101 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
103 self.max_results = input;
104 self
105 }
106 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
108 &self.max_results
109 }
110 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
112 self.next_token = ::std::option::Option::Some(input.into());
113 self
114 }
115 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117 self.next_token = input;
118 self
119 }
120 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
122 &self.next_token
123 }
124 pub fn build(
126 self,
127 ) -> ::std::result::Result<crate::operation::search_channels::SearchChannelsInput, ::aws_smithy_types::error::operation::BuildError> {
128 ::std::result::Result::Ok(crate::operation::search_channels::SearchChannelsInput {
129 chime_bearer: self.chime_bearer,
130 fields: self.fields,
131 max_results: self.max_results,
132 next_token: self.next_token,
133 })
134 }
135}
136impl ::std::fmt::Debug for SearchChannelsInputBuilder {
137 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
138 let mut formatter = f.debug_struct("SearchChannelsInputBuilder");
139 formatter.field("chime_bearer", &self.chime_bearer);
140 formatter.field("fields", &self.fields);
141 formatter.field("max_results", &self.max_results);
142 formatter.field("next_token", &"*** Sensitive Data Redacted ***");
143 formatter.finish()
144 }
145}