1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(std::clone::Clone, std::cmp::PartialEq)]
5pub struct GetDirectThreadOutput {
6 pub thread_id: std::option::Option<std::string::String>,
8 pub identity: std::option::Option<crate::model::IdentityHandle>,
10}
11impl GetDirectThreadOutput {
12 pub fn thread_id(&self) -> std::option::Option<&str> {
14 self.thread_id.as_deref()
15 }
16 pub fn identity(&self) -> std::option::Option<&crate::model::IdentityHandle> {
18 self.identity.as_ref()
19 }
20}
21impl std::fmt::Debug for GetDirectThreadOutput {
22 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23 let mut formatter = f.debug_struct("GetDirectThreadOutput");
24 formatter.field("thread_id", &self.thread_id);
25 formatter.field("identity", &self.identity);
26 formatter.finish()
27 }
28}
29pub mod get_direct_thread_output {
31 #[non_exhaustive]
33 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
34 pub struct Builder {
35 pub(crate) thread_id: std::option::Option<std::string::String>,
36 pub(crate) identity: std::option::Option<crate::model::IdentityHandle>,
37 }
38 impl Builder {
39 pub fn thread_id(mut self, input: impl Into<std::string::String>) -> Self {
41 self.thread_id = Some(input.into());
42 self
43 }
44 pub fn set_thread_id(mut self, input: std::option::Option<std::string::String>) -> Self {
46 self.thread_id = input;
47 self
48 }
49 pub fn identity(mut self, input: crate::model::IdentityHandle) -> Self {
51 self.identity = Some(input);
52 self
53 }
54 pub fn set_identity(
56 mut self,
57 input: std::option::Option<crate::model::IdentityHandle>,
58 ) -> Self {
59 self.identity = input;
60 self
61 }
62 pub fn build(self) -> crate::output::GetDirectThreadOutput {
64 crate::output::GetDirectThreadOutput {
65 thread_id: self.thread_id,
66 identity: self.identity,
67 }
68 }
69 }
70}
71impl GetDirectThreadOutput {
72 pub fn builder() -> crate::output::get_direct_thread_output::Builder {
74 crate::output::get_direct_thread_output::Builder::default()
75 }
76}
77
78#[allow(missing_docs)] #[non_exhaustive]
80#[derive(std::clone::Clone, std::cmp::PartialEq)]
81pub struct SendChatMessageOutput {
82 pub chat_message_id: std::option::Option<std::string::String>,
84}
85impl SendChatMessageOutput {
86 pub fn chat_message_id(&self) -> std::option::Option<&str> {
88 self.chat_message_id.as_deref()
89 }
90}
91impl std::fmt::Debug for SendChatMessageOutput {
92 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
93 let mut formatter = f.debug_struct("SendChatMessageOutput");
94 formatter.field("chat_message_id", &self.chat_message_id);
95 formatter.finish()
96 }
97}
98pub mod send_chat_message_output {
100 #[non_exhaustive]
102 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
103 pub struct Builder {
104 pub(crate) chat_message_id: std::option::Option<std::string::String>,
105 }
106 impl Builder {
107 pub fn chat_message_id(mut self, input: impl Into<std::string::String>) -> Self {
109 self.chat_message_id = Some(input.into());
110 self
111 }
112 pub fn set_chat_message_id(
114 mut self,
115 input: std::option::Option<std::string::String>,
116 ) -> Self {
117 self.chat_message_id = input;
118 self
119 }
120 pub fn build(self) -> crate::output::SendChatMessageOutput {
122 crate::output::SendChatMessageOutput {
123 chat_message_id: self.chat_message_id,
124 }
125 }
126 }
127}
128impl SendChatMessageOutput {
129 pub fn builder() -> crate::output::send_chat_message_output::Builder {
131 crate::output::send_chat_message_output::Builder::default()
132 }
133}
134
135#[allow(missing_docs)] #[non_exhaustive]
137#[derive(std::clone::Clone, std::cmp::PartialEq)]
138pub struct SetTypingStatusOutput {}
139impl std::fmt::Debug for SetTypingStatusOutput {
140 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
141 let mut formatter = f.debug_struct("SetTypingStatusOutput");
142 formatter.finish()
143 }
144}
145pub mod set_typing_status_output {
147 #[non_exhaustive]
149 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
150 pub struct Builder {}
151 impl Builder {
152 pub fn build(self) -> crate::output::SetTypingStatusOutput {
154 crate::output::SetTypingStatusOutput {}
155 }
156 }
157}
158impl SetTypingStatusOutput {
159 pub fn builder() -> crate::output::set_typing_status_output::Builder {
161 crate::output::set_typing_status_output::Builder::default()
162 }
163}
164
165#[allow(missing_docs)] #[non_exhaustive]
167#[derive(std::clone::Clone, std::cmp::PartialEq)]
168pub struct SetThreadReadOutput {}
169impl std::fmt::Debug for SetThreadReadOutput {
170 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
171 let mut formatter = f.debug_struct("SetThreadReadOutput");
172 formatter.finish()
173 }
174}
175pub mod set_thread_read_output {
177 #[non_exhaustive]
179 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
180 pub struct Builder {}
181 impl Builder {
182 pub fn build(self) -> crate::output::SetThreadReadOutput {
184 crate::output::SetThreadReadOutput {}
185 }
186 }
187}
188impl SetThreadReadOutput {
189 pub fn builder() -> crate::output::set_thread_read_output::Builder {
191 crate::output::set_thread_read_output::Builder::default()
192 }
193}
194
195#[allow(missing_docs)] #[non_exhaustive]
197#[derive(std::clone::Clone, std::cmp::PartialEq)]
198pub struct GetThreadHistoryOutput {
199 pub chat_messages: std::option::Option<std::vec::Vec<crate::model::ChatMessage>>,
201}
202impl GetThreadHistoryOutput {
203 pub fn chat_messages(&self) -> std::option::Option<&[crate::model::ChatMessage]> {
205 self.chat_messages.as_deref()
206 }
207}
208impl std::fmt::Debug for GetThreadHistoryOutput {
209 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
210 let mut formatter = f.debug_struct("GetThreadHistoryOutput");
211 formatter.field("chat_messages", &self.chat_messages);
212 formatter.finish()
213 }
214}
215pub mod get_thread_history_output {
217 #[non_exhaustive]
219 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
220 pub struct Builder {
221 pub(crate) chat_messages: std::option::Option<std::vec::Vec<crate::model::ChatMessage>>,
222 }
223 impl Builder {
224 pub fn chat_messages(mut self, input: crate::model::ChatMessage) -> Self {
230 let mut v = self.chat_messages.unwrap_or_default();
231 v.push(input);
232 self.chat_messages = Some(v);
233 self
234 }
235 pub fn set_chat_messages(
237 mut self,
238 input: std::option::Option<std::vec::Vec<crate::model::ChatMessage>>,
239 ) -> Self {
240 self.chat_messages = input;
241 self
242 }
243 pub fn build(self) -> crate::output::GetThreadHistoryOutput {
245 crate::output::GetThreadHistoryOutput {
246 chat_messages: self.chat_messages,
247 }
248 }
249 }
250}
251impl GetThreadHistoryOutput {
252 pub fn builder() -> crate::output::get_thread_history_output::Builder {
254 crate::output::get_thread_history_output::Builder::default()
255 }
256}
257
258#[allow(missing_docs)] #[non_exhaustive]
260#[derive(std::clone::Clone, std::cmp::PartialEq)]
261pub struct WatchThreadOutput {
262 pub chat_messages: std::option::Option<std::vec::Vec<crate::model::ChatMessage>>,
264 pub typing_statuses: std::option::Option<std::vec::Vec<crate::model::ChatIdentityTypingStatus>>,
266 pub watch: std::option::Option<crate::model::WatchResponse>,
268}
269impl WatchThreadOutput {
270 pub fn chat_messages(&self) -> std::option::Option<&[crate::model::ChatMessage]> {
272 self.chat_messages.as_deref()
273 }
274 pub fn typing_statuses(
276 &self,
277 ) -> std::option::Option<&[crate::model::ChatIdentityTypingStatus]> {
278 self.typing_statuses.as_deref()
279 }
280 pub fn watch(&self) -> std::option::Option<&crate::model::WatchResponse> {
282 self.watch.as_ref()
283 }
284}
285impl std::fmt::Debug for WatchThreadOutput {
286 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
287 let mut formatter = f.debug_struct("WatchThreadOutput");
288 formatter.field("chat_messages", &self.chat_messages);
289 formatter.field("typing_statuses", &self.typing_statuses);
290 formatter.field("watch", &self.watch);
291 formatter.finish()
292 }
293}
294pub mod watch_thread_output {
296 #[non_exhaustive]
298 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
299 pub struct Builder {
300 pub(crate) chat_messages: std::option::Option<std::vec::Vec<crate::model::ChatMessage>>,
301 pub(crate) typing_statuses:
302 std::option::Option<std::vec::Vec<crate::model::ChatIdentityTypingStatus>>,
303 pub(crate) watch: std::option::Option<crate::model::WatchResponse>,
304 }
305 impl Builder {
306 pub fn chat_messages(mut self, input: crate::model::ChatMessage) -> Self {
312 let mut v = self.chat_messages.unwrap_or_default();
313 v.push(input);
314 self.chat_messages = Some(v);
315 self
316 }
317 pub fn set_chat_messages(
319 mut self,
320 input: std::option::Option<std::vec::Vec<crate::model::ChatMessage>>,
321 ) -> Self {
322 self.chat_messages = input;
323 self
324 }
325 pub fn typing_statuses(mut self, input: crate::model::ChatIdentityTypingStatus) -> Self {
331 let mut v = self.typing_statuses.unwrap_or_default();
332 v.push(input);
333 self.typing_statuses = Some(v);
334 self
335 }
336 pub fn set_typing_statuses(
338 mut self,
339 input: std::option::Option<std::vec::Vec<crate::model::ChatIdentityTypingStatus>>,
340 ) -> Self {
341 self.typing_statuses = input;
342 self
343 }
344 pub fn watch(mut self, input: crate::model::WatchResponse) -> Self {
346 self.watch = Some(input);
347 self
348 }
349 pub fn set_watch(
351 mut self,
352 input: std::option::Option<crate::model::WatchResponse>,
353 ) -> Self {
354 self.watch = input;
355 self
356 }
357 pub fn build(self) -> crate::output::WatchThreadOutput {
359 crate::output::WatchThreadOutput {
360 chat_messages: self.chat_messages,
361 typing_statuses: self.typing_statuses,
362 watch: self.watch,
363 }
364 }
365 }
366}
367impl WatchThreadOutput {
368 pub fn builder() -> crate::output::watch_thread_output::Builder {
370 crate::output::watch_thread_output::Builder::default()
371 }
372}
373
374#[allow(missing_docs)] #[non_exhaustive]
376#[derive(std::clone::Clone, std::cmp::PartialEq)]
377pub struct GetThreadTopicOutput {
378 pub topic: std::option::Option<crate::model::ChatSimpleTopic>,
380}
381impl GetThreadTopicOutput {
382 pub fn topic(&self) -> std::option::Option<&crate::model::ChatSimpleTopic> {
384 self.topic.as_ref()
385 }
386}
387impl std::fmt::Debug for GetThreadTopicOutput {
388 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
389 let mut formatter = f.debug_struct("GetThreadTopicOutput");
390 formatter.field("topic", &self.topic);
391 formatter.finish()
392 }
393}
394pub mod get_thread_topic_output {
396 #[non_exhaustive]
398 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
399 pub struct Builder {
400 pub(crate) topic: std::option::Option<crate::model::ChatSimpleTopic>,
401 }
402 impl Builder {
403 pub fn topic(mut self, input: crate::model::ChatSimpleTopic) -> Self {
405 self.topic = Some(input);
406 self
407 }
408 pub fn set_topic(
410 mut self,
411 input: std::option::Option<crate::model::ChatSimpleTopic>,
412 ) -> Self {
413 self.topic = input;
414 self
415 }
416 pub fn build(self) -> crate::output::GetThreadTopicOutput {
418 crate::output::GetThreadTopicOutput { topic: self.topic }
419 }
420 }
421}
422impl GetThreadTopicOutput {
423 pub fn builder() -> crate::output::get_thread_topic_output::Builder {
425 crate::output::get_thread_topic_output::Builder::default()
426 }
427}