1#![doc = r" This module contains the generated types for the library."]
2use tabled::Tabled;
3pub mod base64 {
4 #![doc = " Base64 data that encodes to url safe base64, but can decode from multiple"]
5 #![doc = " base64 implementations to account for various clients and libraries. Compatible"]
6 #![doc = " with serde and JsonSchema."]
7 use std::{convert::TryFrom, fmt};
8
9 use serde::{
10 de::{Error, Unexpected, Visitor},
11 Deserialize, Deserializer, Serialize, Serializer,
12 };
13 static ALLOWED_DECODING_FORMATS: &[data_encoding::Encoding] = &[
14 data_encoding::BASE64,
15 data_encoding::BASE64URL,
16 data_encoding::BASE64URL_NOPAD,
17 data_encoding::BASE64_MIME,
18 data_encoding::BASE64_NOPAD,
19 ];
20 #[derive(Debug, Clone, PartialEq, Eq)]
21 #[doc = " A container for binary that should be base64 encoded in serialisation. In reverse"]
22 #[doc = " when deserializing, will decode from many different types of base64 possible."]
23 pub struct Base64Data(pub Vec<u8>);
24 impl Base64Data {
25 #[doc = " Return is the data is empty."]
26 pub fn is_empty(&self) -> bool {
27 self.0.is_empty()
28 }
29 }
30
31 impl fmt::Display for Base64Data {
32 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
33 write!(f, "{}", data_encoding::BASE64URL_NOPAD.encode(&self.0))
34 }
35 }
36
37 impl From<Base64Data> for Vec<u8> {
38 fn from(data: Base64Data) -> Vec<u8> {
39 data.0
40 }
41 }
42
43 impl From<Vec<u8>> for Base64Data {
44 fn from(data: Vec<u8>) -> Base64Data {
45 Base64Data(data)
46 }
47 }
48
49 impl AsRef<[u8]> for Base64Data {
50 fn as_ref(&self) -> &[u8] {
51 &self.0
52 }
53 }
54
55 impl TryFrom<&str> for Base64Data {
56 type Error = anyhow::Error;
57 fn try_from(v: &str) -> Result<Self, Self::Error> {
58 for config in ALLOWED_DECODING_FORMATS {
59 if let Ok(data) = config.decode(v.as_bytes()) {
60 return Ok(Base64Data(data));
61 }
62 }
63 anyhow::bail!("Could not decode base64 data: {}", v);
64 }
65 }
66
67 struct Base64DataVisitor;
68 impl<'de> Visitor<'de> for Base64DataVisitor {
69 type Value = Base64Data;
70 fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
71 write!(formatter, "a base64 encoded string")
72 }
73
74 fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
75 where
76 E: Error,
77 {
78 for config in ALLOWED_DECODING_FORMATS {
79 if let Ok(data) = config.decode(v.as_bytes()) {
80 return Ok(Base64Data(data));
81 }
82 }
83 Err(serde::de::Error::invalid_value(Unexpected::Str(v), &self))
84 }
85 }
86
87 impl<'de> Deserialize<'de> for Base64Data {
88 fn deserialize<D>(deserializer: D) -> Result<Self, <D as Deserializer<'de>>::Error>
89 where
90 D: Deserializer<'de>,
91 {
92 deserializer.deserialize_str(Base64DataVisitor)
93 }
94 }
95
96 impl Serialize for Base64Data {
97 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
98 where
99 S: Serializer,
100 {
101 let encoded = data_encoding::BASE64URL_NOPAD.encode(&self.0);
102 serializer.serialize_str(&encoded)
103 }
104 }
105
106 impl schemars::JsonSchema for Base64Data {
107 fn schema_name() -> String {
108 "Base64Data".to_string()
109 }
110
111 fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
112 let mut obj = gen.root_schema_for::<String>().schema;
113 obj.format = Some("byte".to_string());
114 schemars::schema::Schema::Object(obj)
115 }
116
117 fn is_referenceable() -> bool {
118 false
119 }
120 }
121
122 #[cfg(test)]
123 mod tests {
124 use std::convert::TryFrom;
125
126 use super::Base64Data;
127 #[test]
128 fn test_base64_try_from() {
129 assert!(Base64Data::try_from("aGVsbG8=").is_ok());
130 assert!(Base64Data::try_from("abcdefghij").is_err());
131 }
132 }
133}
134
135pub mod paginate {
136 #![doc = " Utility functions used for pagination."]
137 use anyhow::Result;
138 #[doc = " A trait for types that allow pagination."]
139 pub trait Pagination {
140 #[doc = " The item that is paginated."]
141 type Item: serde::de::DeserializeOwned;
142 #[doc = " Returns true if the response has more pages."]
143 fn has_more_pages(&self) -> bool;
144 #[doc = " Modify a request to get the next page."]
145 fn next_page(
146 &self,
147 req: reqwest::Request,
148 ) -> Result<reqwest::Request, crate::types::error::Error>;
149 #[doc = " Get the items from a page."]
150 fn items(&self) -> Vec<Self::Item>;
151 }
152}
153
154pub mod phone_number {
155 #![doc = " A library to implement phone numbers for our database and JSON serialization and \
156 deserialization."]
157 use std::str::FromStr;
158
159 use schemars::JsonSchema;
160 #[doc = " A phone number."]
161 #[derive(Debug, Default, Clone, PartialEq, Hash, Eq)]
162 pub struct PhoneNumber(pub Option<phonenumber::PhoneNumber>);
163 impl From<phonenumber::PhoneNumber> for PhoneNumber {
164 fn from(id: phonenumber::PhoneNumber) -> PhoneNumber {
165 PhoneNumber(Some(id))
166 }
167 }
168
169 impl AsRef<Option<phonenumber::PhoneNumber>> for PhoneNumber {
170 fn as_ref(&self) -> &Option<phonenumber::PhoneNumber> {
171 &self.0
172 }
173 }
174
175 impl std::ops::Deref for PhoneNumber {
176 type Target = Option<phonenumber::PhoneNumber>;
177 fn deref(&self) -> &Self::Target {
178 &self.0
179 }
180 }
181
182 impl serde::ser::Serialize for PhoneNumber {
183 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
184 where
185 S: serde::ser::Serializer,
186 {
187 serializer.serialize_str(&self.to_string())
188 }
189 }
190
191 impl<'de> serde::de::Deserialize<'de> for PhoneNumber {
192 fn deserialize<D>(deserializer: D) -> Result<PhoneNumber, D::Error>
193 where
194 D: serde::de::Deserializer<'de>,
195 {
196 let s = String::deserialize(deserializer).unwrap_or_default();
197 PhoneNumber::from_str(&s).map_err(serde::de::Error::custom)
198 }
199 }
200
201 impl std::str::FromStr for PhoneNumber {
202 type Err = anyhow::Error;
203 fn from_str(s: &str) -> Result<Self, Self::Err> {
204 if s.trim().is_empty() {
205 return Ok(PhoneNumber(None));
206 }
207 let s = if !s.trim().starts_with('+') {
208 format!("+1{}", s)
209 .replace('-', "")
210 .replace('(', "")
211 .replace(')', "")
212 .replace(' ', "")
213 } else {
214 s.replace('-', "")
215 .replace('(', "")
216 .replace(')', "")
217 .replace(' ', "")
218 };
219 Ok(PhoneNumber(Some(phonenumber::parse(None, &s).map_err(
220 |e| anyhow::anyhow!("invalid phone number `{}`: {}", s, e),
221 )?)))
222 }
223 }
224
225 impl std::fmt::Display for PhoneNumber {
226 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
227 let s = if let Some(phone) = &self.0 {
228 phone
229 .format()
230 .mode(phonenumber::Mode::International)
231 .to_string()
232 } else {
233 String::new()
234 };
235 write!(f, "{}", s)
236 }
237 }
238
239 impl JsonSchema for PhoneNumber {
240 fn schema_name() -> String {
241 "PhoneNumber".to_string()
242 }
243
244 fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
245 let mut obj = gen.root_schema_for::<String>().schema;
246 obj.format = Some("phone".to_string());
247 schemars::schema::Schema::Object(obj)
248 }
249
250 fn is_referenceable() -> bool {
251 false
252 }
253 }
254
255 #[cfg(test)]
256 mod test {
257 use pretty_assertions::assert_eq;
258
259 use super::PhoneNumber;
260 #[test]
261 fn test_parse_phone_number() {
262 let mut phone = "+1-555-555-5555";
263 let mut phone_parsed: PhoneNumber =
264 serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
265 let mut expected = PhoneNumber(Some(phonenumber::parse(None, phone).unwrap()));
266 assert_eq!(phone_parsed, expected);
267 let mut expected_str = "+1 555-555-5555";
268 assert_eq!(expected_str, serde_json::json!(phone_parsed));
269 phone = "555-555-5555";
270 phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
271 assert_eq!(phone_parsed, expected);
272 assert_eq!(expected_str, serde_json::json!(phone_parsed));
273 phone = "+1 555-555-5555";
274 phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
275 assert_eq!(phone_parsed, expected);
276 assert_eq!(expected_str, serde_json::json!(phone_parsed));
277 phone = "5555555555";
278 phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
279 assert_eq!(phone_parsed, expected);
280 assert_eq!(expected_str, serde_json::json!(phone_parsed));
281 phone = "(510) 864-1234";
282 phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
283 expected = PhoneNumber(Some(phonenumber::parse(None, "+15108641234").unwrap()));
284 assert_eq!(phone_parsed, expected);
285 expected_str = "+1 510-864-1234";
286 assert_eq!(expected_str, serde_json::json!(phone_parsed));
287 phone = "(510)8641234";
288 phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
289 assert_eq!(phone_parsed, expected);
290 expected_str = "+1 510-864-1234";
291 assert_eq!(expected_str, serde_json::json!(phone_parsed));
292 phone = "";
293 phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
294 assert_eq!(phone_parsed, PhoneNumber(None));
295 assert_eq!("", serde_json::json!(phone_parsed));
296 phone = "+49 30 1234 1234";
297 phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
298 expected = PhoneNumber(Some(phonenumber::parse(None, phone).unwrap()));
299 assert_eq!(phone_parsed, expected);
300 expected_str = "+49 30 12341234";
301 assert_eq!(expected_str, serde_json::json!(phone_parsed));
302 }
303 }
304}
305
306pub mod error {
307 #![doc = " Error methods."]
308 #[doc = " Error produced by generated client methods."]
309 pub enum Error {
310 #[doc = " The request did not conform to API requirements."]
311 InvalidRequest(String),
312 #[doc = " A server error either due to the data, or with the connection."]
313 CommunicationError(reqwest_middleware::Error),
314 #[doc = " A request error, caused when building the request."]
315 RequestError(reqwest::Error),
316 #[doc = " An expected response whose deserialization failed."]
317 SerdeError {
318 #[doc = " The error."]
319 error: format_serde_error::SerdeError,
320 #[doc = " The response status."]
321 status: reqwest::StatusCode,
322 },
323 #[doc = " An expected error response."]
324 InvalidResponsePayload {
325 #[doc = " The error."]
326 error: reqwest_middleware::Error,
327 #[doc = " The full response."]
328 response: reqwest::Response,
329 },
330 #[doc = " A response not listed in the API description. This may represent a"]
331 #[doc = " success or failure response; check `status().is_success()`."]
332 UnexpectedResponse(reqwest::Response),
333 }
334
335 impl Error {
336 #[doc = " Returns the status code, if the error was generated from a response."]
337 pub fn status(&self) -> Option<reqwest::StatusCode> {
338 match self {
339 Error::InvalidRequest(_) => None,
340 Error::RequestError(e) => e.status(),
341 Error::CommunicationError(reqwest_middleware::Error::Reqwest(e)) => e.status(),
342 Error::CommunicationError(reqwest_middleware::Error::Middleware(_)) => None,
343 Error::SerdeError { error: _, status } => Some(*status),
344 Error::InvalidResponsePayload { error: _, response } => Some(response.status()),
345 Error::UnexpectedResponse(r) => Some(r.status()),
346 }
347 }
348
349 #[doc = " Creates a new error from a response status and a serde error."]
350 pub fn from_serde_error(
351 e: format_serde_error::SerdeError,
352 status: reqwest::StatusCode,
353 ) -> Self {
354 Self::SerdeError { error: e, status }
355 }
356 }
357
358 impl From<reqwest_middleware::Error> for Error {
359 fn from(e: reqwest_middleware::Error) -> Self {
360 Self::CommunicationError(e)
361 }
362 }
363
364 impl From<reqwest::Error> for Error {
365 fn from(e: reqwest::Error) -> Self {
366 Self::RequestError(e)
367 }
368 }
369
370 impl std::fmt::Display for Error {
371 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
372 match self {
373 Error::InvalidRequest(s) => {
374 write!(f, "Invalid Request: {}", s)
375 }
376 Error::CommunicationError(e) => {
377 write!(f, "Communication Error: {}", e)
378 }
379 Error::RequestError(e) => {
380 write!(f, "Request Error: {}", e)
381 }
382 Error::SerdeError { error, status: _ } => {
383 write!(f, "Serde Error: {}", error)
384 }
385 Error::InvalidResponsePayload { error, response: _ } => {
386 write!(f, "Invalid Response Payload: {}", error)
387 }
388 Error::UnexpectedResponse(r) => {
389 write!(f, "Unexpected Response: {:?}", r)
390 }
391 }
392 }
393 }
394
395 trait ErrorFormat {
396 fn fmt_info(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result;
397 }
398
399 impl std::fmt::Debug for Error {
400 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
401 std::fmt::Display::fmt(self, f)
402 }
403 }
404
405 impl std::error::Error for Error {
406 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
407 match self {
408 Error::CommunicationError(e) => Some(e),
409 Error::SerdeError { error, status: _ } => Some(error),
410 Error::InvalidResponsePayload { error, response: _ } => Some(error),
411 _ => None,
412 }
413 }
414 }
415}
416
417#[derive(
418 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
419)]
420pub struct ShiftInterval {
421 #[doc = "Start of shift"]
422 pub start: String,
423 #[doc = "End of shift"]
424 pub end: String,
425}
426
427impl std::fmt::Display for ShiftInterval {
428 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
429 write!(
430 f,
431 "{}",
432 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
433 )
434 }
435}
436
437impl tabled::Tabled for ShiftInterval {
438 const LENGTH: usize = 2;
439 fn fields(&self) -> Vec<String> {
440 vec![self.start.clone(), self.end.clone()]
441 }
442
443 fn headers() -> Vec<String> {
444 vec!["start".to_string(), "end".to_string()]
445 }
446}
447
448#[derive(
449 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
450)]
451pub struct ShiftIntervals {
452 #[serde(default, skip_serializing_if = "Option::is_none")]
453 pub mon: Option<ShiftInterval>,
454 #[serde(default, skip_serializing_if = "Option::is_none")]
455 pub tue: Option<ShiftInterval>,
456 #[serde(default, skip_serializing_if = "Option::is_none")]
457 pub wed: Option<ShiftInterval>,
458 #[serde(default, skip_serializing_if = "Option::is_none")]
459 pub thu: Option<ShiftInterval>,
460 #[serde(default, skip_serializing_if = "Option::is_none")]
461 pub fri: Option<ShiftInterval>,
462 #[serde(default, skip_serializing_if = "Option::is_none")]
463 pub sat: Option<ShiftInterval>,
464 #[serde(default, skip_serializing_if = "Option::is_none")]
465 pub sun: Option<ShiftInterval>,
466}
467
468impl std::fmt::Display for ShiftIntervals {
469 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
470 write!(
471 f,
472 "{}",
473 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
474 )
475 }
476}
477
478impl tabled::Tabled for ShiftIntervals {
479 const LENGTH: usize = 7;
480 fn fields(&self) -> Vec<String> {
481 vec![
482 if let Some(mon) = &self.mon {
483 format!("{:?}", mon)
484 } else {
485 String::new()
486 },
487 if let Some(tue) = &self.tue {
488 format!("{:?}", tue)
489 } else {
490 String::new()
491 },
492 if let Some(wed) = &self.wed {
493 format!("{:?}", wed)
494 } else {
495 String::new()
496 },
497 if let Some(thu) = &self.thu {
498 format!("{:?}", thu)
499 } else {
500 String::new()
501 },
502 if let Some(fri) = &self.fri {
503 format!("{:?}", fri)
504 } else {
505 String::new()
506 },
507 if let Some(sat) = &self.sat {
508 format!("{:?}", sat)
509 } else {
510 String::new()
511 },
512 if let Some(sun) = &self.sun {
513 format!("{:?}", sun)
514 } else {
515 String::new()
516 },
517 ]
518 }
519
520 fn headers() -> Vec<String> {
521 vec![
522 "mon".to_string(),
523 "tue".to_string(),
524 "wed".to_string(),
525 "thu".to_string(),
526 "fri".to_string(),
527 "sat".to_string(),
528 "sun".to_string(),
529 ]
530 }
531}
532
533#[derive(
534 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
535)]
536pub struct TagIds {
537 pub tag_ids: Vec<String>,
538}
539
540impl std::fmt::Display for TagIds {
541 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
542 write!(
543 f,
544 "{}",
545 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
546 )
547 }
548}
549
550impl tabled::Tabled for TagIds {
551 const LENGTH: usize = 1;
552 fn fields(&self) -> Vec<String> {
553 vec![format!("{:?}", self.tag_ids)]
554 }
555
556 fn headers() -> Vec<String> {
557 vec!["tag_ids".to_string()]
558 }
559}
560
561#[derive(
562 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
563)]
564pub struct TeammateIds {
565 pub teammate_ids: Vec<String>,
566}
567
568impl std::fmt::Display for TeammateIds {
569 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
570 write!(
571 f,
572 "{}",
573 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
574 )
575 }
576}
577
578impl tabled::Tabled for TeammateIds {
579 const LENGTH: usize = 1;
580 fn fields(&self) -> Vec<String> {
581 vec![format!("{:?}", self.teammate_ids)]
582 }
583
584 fn headers() -> Vec<String> {
585 vec!["teammate_ids".to_string()]
586 }
587}
588
589#[derive(
590 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
591)]
592pub struct ChannelIds {
593 pub channel_ids: Vec<String>,
594}
595
596impl std::fmt::Display for ChannelIds {
597 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
598 write!(
599 f,
600 "{}",
601 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
602 )
603 }
604}
605
606impl tabled::Tabled for ChannelIds {
607 const LENGTH: usize = 1;
608 fn fields(&self) -> Vec<String> {
609 vec![format!("{:?}", self.channel_ids)]
610 }
611
612 fn headers() -> Vec<String> {
613 vec!["channel_ids".to_string()]
614 }
615}
616
617#[derive(
618 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
619)]
620pub struct InboxIds {
621 pub inbox_ids: Vec<String>,
622}
623
624impl std::fmt::Display for InboxIds {
625 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
626 write!(
627 f,
628 "{}",
629 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
630 )
631 }
632}
633
634impl tabled::Tabled for InboxIds {
635 const LENGTH: usize = 1;
636 fn fields(&self) -> Vec<String> {
637 vec![format!("{:?}", self.inbox_ids)]
638 }
639
640 fn headers() -> Vec<String> {
641 vec!["inbox_ids".to_string()]
642 }
643}
644
645#[derive(
646 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
647)]
648pub struct TeamIds {
649 pub team_ids: Vec<String>,
650}
651
652impl std::fmt::Display for TeamIds {
653 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
654 write!(
655 f,
656 "{}",
657 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
658 )
659 }
660}
661
662impl tabled::Tabled for TeamIds {
663 const LENGTH: usize = 1;
664 fn fields(&self) -> Vec<String> {
665 vec![format!("{:?}", self.team_ids)]
666 }
667
668 fn headers() -> Vec<String> {
669 vec!["team_ids".to_string()]
670 }
671}
672
673#[derive(
674 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
675)]
676pub struct ContactIds {
677 pub contact_ids: Vec<String>,
678}
679
680impl std::fmt::Display for ContactIds {
681 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
682 write!(
683 f,
684 "{}",
685 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
686 )
687 }
688}
689
690impl tabled::Tabled for ContactIds {
691 const LENGTH: usize = 1;
692 fn fields(&self) -> Vec<String> {
693 vec![format!("{:?}", self.contact_ids)]
694 }
695
696 fn headers() -> Vec<String> {
697 vec!["contact_ids".to_string()]
698 }
699}
700
701#[derive(
702 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
703)]
704pub struct AccountIds {
705 pub account_ids: Vec<String>,
706}
707
708impl std::fmt::Display for AccountIds {
709 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
710 write!(
711 f,
712 "{}",
713 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
714 )
715 }
716}
717
718impl tabled::Tabled for AccountIds {
719 const LENGTH: usize = 1;
720 fn fields(&self) -> Vec<String> {
721 vec![format!("{:?}", self.account_ids)]
722 }
723
724 fn headers() -> Vec<String> {
725 vec!["account_ids".to_string()]
726 }
727}
728
729#[derive(
730 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
731)]
732pub struct Account {
733 #[doc = "Name of the Account"]
734 #[serde(default, skip_serializing_if = "Option::is_none")]
735 pub name: Option<String>,
736 #[doc = "Account description"]
737 #[serde(default, skip_serializing_if = "Option::is_none")]
738 pub description: Option<String>,
739 #[serde(default, skip_serializing_if = "Option::is_none")]
740 pub domains: Option<Vec<String>>,
741 #[doc = "ID of the Account in an external system"]
742 #[serde(default, skip_serializing_if = "Option::is_none")]
743 pub external_id: Option<String>,
744 #[doc = "Custom attributes for this account."]
745 #[serde(default, skip_serializing_if = "Option::is_none")]
746 pub custom_fields: Option<std::collections::HashMap<String, String>>,
747}
748
749impl std::fmt::Display for Account {
750 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
751 write!(
752 f,
753 "{}",
754 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
755 )
756 }
757}
758
759impl tabled::Tabled for Account {
760 const LENGTH: usize = 5;
761 fn fields(&self) -> Vec<String> {
762 vec![
763 if let Some(name) = &self.name {
764 format!("{:?}", name)
765 } else {
766 String::new()
767 },
768 if let Some(description) = &self.description {
769 format!("{:?}", description)
770 } else {
771 String::new()
772 },
773 if let Some(domains) = &self.domains {
774 format!("{:?}", domains)
775 } else {
776 String::new()
777 },
778 if let Some(external_id) = &self.external_id {
779 format!("{:?}", external_id)
780 } else {
781 String::new()
782 },
783 if let Some(custom_fields) = &self.custom_fields {
784 format!("{:?}", custom_fields)
785 } else {
786 String::new()
787 },
788 ]
789 }
790
791 fn headers() -> Vec<String> {
792 vec![
793 "name".to_string(),
794 "description".to_string(),
795 "domains".to_string(),
796 "external_id".to_string(),
797 "custom_fields".to_string(),
798 ]
799 }
800}
801
802#[doc = "Resources to compute the analytics for. Defaults to all."]
803#[derive(
804 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
805)]
806pub struct AnalyticsFilters {
807 #[serde(default, skip_serializing_if = "Option::is_none")]
808 pub tag_ids: Option<Vec<String>>,
809 #[serde(default, skip_serializing_if = "Option::is_none")]
810 pub teammate_ids: Option<Vec<String>>,
811 #[serde(default, skip_serializing_if = "Option::is_none")]
812 pub channel_ids: Option<Vec<String>>,
813 #[serde(default, skip_serializing_if = "Option::is_none")]
814 pub inbox_ids: Option<Vec<String>>,
815 #[serde(default, skip_serializing_if = "Option::is_none")]
816 pub team_ids: Option<Vec<String>>,
817 #[serde(default, skip_serializing_if = "Option::is_none")]
818 pub account_ids: Option<Vec<String>>,
819}
820
821impl std::fmt::Display for AnalyticsFilters {
822 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
823 write!(
824 f,
825 "{}",
826 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
827 )
828 }
829}
830
831impl tabled::Tabled for AnalyticsFilters {
832 const LENGTH: usize = 6;
833 fn fields(&self) -> Vec<String> {
834 vec![
835 if let Some(tag_ids) = &self.tag_ids {
836 format!("{:?}", tag_ids)
837 } else {
838 String::new()
839 },
840 if let Some(teammate_ids) = &self.teammate_ids {
841 format!("{:?}", teammate_ids)
842 } else {
843 String::new()
844 },
845 if let Some(channel_ids) = &self.channel_ids {
846 format!("{:?}", channel_ids)
847 } else {
848 String::new()
849 },
850 if let Some(inbox_ids) = &self.inbox_ids {
851 format!("{:?}", inbox_ids)
852 } else {
853 String::new()
854 },
855 if let Some(team_ids) = &self.team_ids {
856 format!("{:?}", team_ids)
857 } else {
858 String::new()
859 },
860 if let Some(account_ids) = &self.account_ids {
861 format!("{:?}", account_ids)
862 } else {
863 String::new()
864 },
865 ]
866 }
867
868 fn headers() -> Vec<String> {
869 vec![
870 "tag_ids".to_string(),
871 "teammate_ids".to_string(),
872 "channel_ids".to_string(),
873 "inbox_ids".to_string(),
874 "team_ids".to_string(),
875 "account_ids".to_string(),
876 ]
877 }
878}
879
880#[derive(
881 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
882)]
883pub struct AnalyticsReportRequest2 {
884 #[doc = "Start time of the data to include in the export (seconds since \
885 1970-01-01T00:00:00+00). Will be rounded down to the start of the day."]
886 pub start: f64,
887 #[doc = "End time of the data to include in the export (seconds since \
888 1970-01-01T00:00:00+00). Will be rounded up to the end of the day."]
889 pub end: f64,
890 #[doc = "[IANA name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the \
891 timezone to format the dates with. If omitted, the export will use Etc/UTC."]
892 #[serde(default, skip_serializing_if = "Option::is_none")]
893 pub timezone: Option<String>,
894 #[doc = "Resources to compute the analytics for. Defaults to all."]
895 #[serde(default, skip_serializing_if = "Option::is_none")]
896 pub filters: Option<AnalyticsFilters>,
897 #[doc = "List of the metrics required."]
898 pub metrics: Vec<AnalyticsMetricId>,
899}
900
901impl std::fmt::Display for AnalyticsReportRequest2 {
902 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
903 write!(
904 f,
905 "{}",
906 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
907 )
908 }
909}
910
911impl tabled::Tabled for AnalyticsReportRequest2 {
912 const LENGTH: usize = 5;
913 fn fields(&self) -> Vec<String> {
914 vec![
915 format!("{:?}", self.start),
916 format!("{:?}", self.end),
917 if let Some(timezone) = &self.timezone {
918 format!("{:?}", timezone)
919 } else {
920 String::new()
921 },
922 if let Some(filters) = &self.filters {
923 format!("{:?}", filters)
924 } else {
925 String::new()
926 },
927 format!("{:?}", self.metrics),
928 ]
929 }
930
931 fn headers() -> Vec<String> {
932 vec![
933 "start".to_string(),
934 "end".to_string(),
935 "timezone".to_string(),
936 "filters".to_string(),
937 "metrics".to_string(),
938 ]
939 }
940}
941
942#[derive(
943 serde :: Serialize,
944 serde :: Deserialize,
945 PartialEq,
946 Eq,
947 Hash,
948 Debug,
949 Clone,
950 schemars :: JsonSchema,
951 tabled :: Tabled,
952 clap :: ValueEnum,
953 parse_display :: FromStr,
954 parse_display :: Display,
955)]
956pub enum Type {
957 #[serde(rename = "events")]
958 #[display("events")]
959 Events,
960 #[serde(rename = "messages")]
961 #[display("messages")]
962 Messages,
963}
964
965#[derive(
966 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
967)]
968pub struct AnalyticsExportRequest2 {
969 #[doc = "Start time of the data to include in the export (seconds since \
970 1970-01-01T00:00:00+00). Will be rounded down to the start of the day."]
971 pub start: f64,
972 #[doc = "End time of the data to include in the export (seconds since \
973 1970-01-01T00:00:00+00). Will be rounded up to the end of the day."]
974 pub end: f64,
975 #[doc = "[IANA name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the \
976 timezone to format the dates with. If omitted, the export will use Etc/UTC."]
977 #[serde(default, skip_serializing_if = "Option::is_none")]
978 pub timezone: Option<String>,
979 #[doc = "Resources to compute the analytics for. Defaults to all."]
980 #[serde(default, skip_serializing_if = "Option::is_none")]
981 pub filters: Option<AnalyticsFilters>,
982 #[serde(rename = "type")]
983 pub type_: Type,
984}
985
986impl std::fmt::Display for AnalyticsExportRequest2 {
987 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
988 write!(
989 f,
990 "{}",
991 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
992 )
993 }
994}
995
996impl tabled::Tabled for AnalyticsExportRequest2 {
997 const LENGTH: usize = 5;
998 fn fields(&self) -> Vec<String> {
999 vec![
1000 format!("{:?}", self.start),
1001 format!("{:?}", self.end),
1002 if let Some(timezone) = &self.timezone {
1003 format!("{:?}", timezone)
1004 } else {
1005 String::new()
1006 },
1007 if let Some(filters) = &self.filters {
1008 format!("{:?}", filters)
1009 } else {
1010 String::new()
1011 },
1012 format!("{:?}", self.type_),
1013 ]
1014 }
1015
1016 fn headers() -> Vec<String> {
1017 vec![
1018 "start".to_string(),
1019 "end".to_string(),
1020 "timezone".to_string(),
1021 "filters".to_string(),
1022 "type_".to_string(),
1023 ]
1024 }
1025}
1026
1027#[derive(
1028 serde :: Serialize,
1029 serde :: Deserialize,
1030 PartialEq,
1031 Eq,
1032 Hash,
1033 Debug,
1034 Clone,
1035 schemars :: JsonSchema,
1036 tabled :: Tabled,
1037 clap :: ValueEnum,
1038 parse_display :: FromStr,
1039 parse_display :: Display,
1040)]
1041pub enum AnalyticsMetricId {
1042 #[serde(rename = "avg_csat_survey_response")]
1043 #[display("avg_csat_survey_response")]
1044 AvgCsatSurveyResponse,
1045 #[serde(rename = "avg_first_response_time")]
1046 #[display("avg_first_response_time")]
1047 AvgFirstResponseTime,
1048 #[serde(rename = "avg_handle_time")]
1049 #[display("avg_handle_time")]
1050 AvgHandleTime,
1051 #[serde(rename = "avg_response_time")]
1052 #[display("avg_response_time")]
1053 AvgResponseTime,
1054 #[serde(rename = "avg_sla_breach_time")]
1055 #[display("avg_sla_breach_time")]
1056 AvgSlaBreachTime,
1057 #[serde(rename = "avg_total_reply_time")]
1058 #[display("avg_total_reply_time")]
1059 AvgTotalReplyTime,
1060 #[serde(rename = "new_segments_count")]
1061 #[display("new_segments_count")]
1062 NewSegmentsCount,
1063 #[serde(rename = "num_active_segments_full")]
1064 #[display("num_active_segments_full")]
1065 NumActiveSegmentsFull,
1066 #[serde(rename = "num_archived_segments")]
1067 #[display("num_archived_segments")]
1068 NumArchivedSegments,
1069 #[serde(rename = "num_archived_segments_with_reply")]
1070 #[display("num_archived_segments_with_reply")]
1071 NumArchivedSegmentsWithReply,
1072 #[serde(rename = "num_csat_survey_response")]
1073 #[display("num_csat_survey_response")]
1074 NumCsatSurveyResponse,
1075 #[serde(rename = "num_messages_received")]
1076 #[display("num_messages_received")]
1077 NumMessagesReceived,
1078 #[serde(rename = "num_messages_sent")]
1079 #[display("num_messages_sent")]
1080 NumMessagesSent,
1081 #[serde(rename = "num_sla_breach")]
1082 #[display("num_sla_breach")]
1083 NumSlaBreach,
1084 #[serde(rename = "pct_csat_survey_satisfaction")]
1085 #[display("pct_csat_survey_satisfaction")]
1086 PctCsatSurveySatisfaction,
1087 #[serde(rename = "pct_tagged_conversations")]
1088 #[display("pct_tagged_conversations")]
1089 PctTaggedConversations,
1090 #[serde(rename = "num_open_segments_start")]
1091 #[display("num_open_segments_start")]
1092 NumOpenSegmentsStart,
1093 #[serde(rename = "num_closed_segments")]
1094 #[display("num_closed_segments")]
1095 NumClosedSegments,
1096 #[serde(rename = "num_open_segments_end")]
1097 #[display("num_open_segments_end")]
1098 NumOpenSegmentsEnd,
1099 #[serde(rename = "num_workload_segments")]
1100 #[display("num_workload_segments")]
1101 NumWorkloadSegments,
1102}
1103
1104#[doc = "A message template folder that is used to store message templates or other folders."]
1105#[derive(
1106 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1107)]
1108pub struct CreateMessageTemplateFolderAsChild {
1109 #[doc = "Name of the message template folder"]
1110 pub name: String,
1111}
1112
1113impl std::fmt::Display for CreateMessageTemplateFolderAsChild {
1114 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1115 write!(
1116 f,
1117 "{}",
1118 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1119 )
1120 }
1121}
1122
1123impl tabled::Tabled for CreateMessageTemplateFolderAsChild {
1124 const LENGTH: usize = 1;
1125 fn fields(&self) -> Vec<String> {
1126 vec![self.name.clone()]
1127 }
1128
1129 fn headers() -> Vec<String> {
1130 vec!["name".to_string()]
1131 }
1132}
1133
1134#[doc = "A message template folder that is used to store message templates or other folders."]
1135#[derive(
1136 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1137)]
1138pub struct CreateMessageTemplateFolder {
1139 #[doc = "Name of the message template folder"]
1140 pub name: String,
1141 #[doc = "ID of the parent folder to be placed into. Goes into the root folder if unspecified \
1142 or if null."]
1143 #[serde(default, skip_serializing_if = "Option::is_none")]
1144 pub parent_folder_id: Option<String>,
1145}
1146
1147impl std::fmt::Display for CreateMessageTemplateFolder {
1148 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1149 write!(
1150 f,
1151 "{}",
1152 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1153 )
1154 }
1155}
1156
1157impl tabled::Tabled for CreateMessageTemplateFolder {
1158 const LENGTH: usize = 2;
1159 fn fields(&self) -> Vec<String> {
1160 vec![
1161 self.name.clone(),
1162 if let Some(parent_folder_id) = &self.parent_folder_id {
1163 format!("{:?}", parent_folder_id)
1164 } else {
1165 String::new()
1166 },
1167 ]
1168 }
1169
1170 fn headers() -> Vec<String> {
1171 vec!["name".to_string(), "parent_folder_id".to_string()]
1172 }
1173}
1174
1175#[doc = "A message template folder that is used to store message templates or other folders."]
1176#[derive(
1177 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1178)]
1179pub struct UpdateMessageTemplateFolder {
1180 #[doc = "Name of the message template folder"]
1181 #[serde(default, skip_serializing_if = "Option::is_none")]
1182 pub name: Option<String>,
1183 #[doc = "ID of the parent folder to be placed into. Goes into the root folder if unspecified \
1184 or if null."]
1185 #[serde(default, skip_serializing_if = "Option::is_none")]
1186 pub parent_folder_id: Option<String>,
1187}
1188
1189impl std::fmt::Display for UpdateMessageTemplateFolder {
1190 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1191 write!(
1192 f,
1193 "{}",
1194 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1195 )
1196 }
1197}
1198
1199impl tabled::Tabled for UpdateMessageTemplateFolder {
1200 const LENGTH: usize = 2;
1201 fn fields(&self) -> Vec<String> {
1202 vec![
1203 if let Some(name) = &self.name {
1204 format!("{:?}", name)
1205 } else {
1206 String::new()
1207 },
1208 if let Some(parent_folder_id) = &self.parent_folder_id {
1209 format!("{:?}", parent_folder_id)
1210 } else {
1211 String::new()
1212 },
1213 ]
1214 }
1215
1216 fn headers() -> Vec<String> {
1217 vec!["name".to_string(), "parent_folder_id".to_string()]
1218 }
1219}
1220
1221#[derive(
1222 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1223)]
1224pub struct UpdateMessageTemplate {
1225 #[doc = "Name of the message template"]
1226 #[serde(default, skip_serializing_if = "Option::is_none")]
1227 pub name: Option<String>,
1228 #[doc = "Subject of the message template"]
1229 #[serde(default, skip_serializing_if = "Option::is_none")]
1230 pub subject: Option<String>,
1231 #[doc = "Body of the message template"]
1232 #[serde(default, skip_serializing_if = "Option::is_none")]
1233 pub body: Option<String>,
1234 #[doc = "ID of the parent folder to be placed into. Goes into the root folder if unspecified \
1235 or if null."]
1236 #[serde(default, skip_serializing_if = "Option::is_none")]
1237 pub folder_id: Option<String>,
1238 #[serde(default, skip_serializing_if = "Option::is_none")]
1239 pub inbox_ids: Option<Vec<String>>,
1240}
1241
1242impl std::fmt::Display for UpdateMessageTemplate {
1243 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1244 write!(
1245 f,
1246 "{}",
1247 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1248 )
1249 }
1250}
1251
1252impl tabled::Tabled for UpdateMessageTemplate {
1253 const LENGTH: usize = 5;
1254 fn fields(&self) -> Vec<String> {
1255 vec![
1256 if let Some(name) = &self.name {
1257 format!("{:?}", name)
1258 } else {
1259 String::new()
1260 },
1261 if let Some(subject) = &self.subject {
1262 format!("{:?}", subject)
1263 } else {
1264 String::new()
1265 },
1266 if let Some(body) = &self.body {
1267 format!("{:?}", body)
1268 } else {
1269 String::new()
1270 },
1271 if let Some(folder_id) = &self.folder_id {
1272 format!("{:?}", folder_id)
1273 } else {
1274 String::new()
1275 },
1276 if let Some(inbox_ids) = &self.inbox_ids {
1277 format!("{:?}", inbox_ids)
1278 } else {
1279 String::new()
1280 },
1281 ]
1282 }
1283
1284 fn headers() -> Vec<String> {
1285 vec![
1286 "name".to_string(),
1287 "subject".to_string(),
1288 "body".to_string(),
1289 "folder_id".to_string(),
1290 "inbox_ids".to_string(),
1291 ]
1292 }
1293}
1294
1295#[doc = "A message template that is used for pre-written responses"]
1296#[derive(
1297 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1298)]
1299pub struct CreateMessageTemplateAsChild {
1300 #[doc = "Name of the message template"]
1301 pub name: String,
1302 #[doc = "Subject of the message template. If not set, the name will be used to populate the \
1303 subject."]
1304 #[serde(default, skip_serializing_if = "Option::is_none")]
1305 pub subject: Option<String>,
1306 #[doc = "Body of the message template"]
1307 pub body: String,
1308 #[serde(default, skip_serializing_if = "Option::is_none")]
1309 pub inbox_ids: Option<Vec<String>>,
1310}
1311
1312impl std::fmt::Display for CreateMessageTemplateAsChild {
1313 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1314 write!(
1315 f,
1316 "{}",
1317 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1318 )
1319 }
1320}
1321
1322impl tabled::Tabled for CreateMessageTemplateAsChild {
1323 const LENGTH: usize = 4;
1324 fn fields(&self) -> Vec<String> {
1325 vec![
1326 self.name.clone(),
1327 if let Some(subject) = &self.subject {
1328 format!("{:?}", subject)
1329 } else {
1330 String::new()
1331 },
1332 self.body.clone(),
1333 if let Some(inbox_ids) = &self.inbox_ids {
1334 format!("{:?}", inbox_ids)
1335 } else {
1336 String::new()
1337 },
1338 ]
1339 }
1340
1341 fn headers() -> Vec<String> {
1342 vec![
1343 "name".to_string(),
1344 "subject".to_string(),
1345 "body".to_string(),
1346 "inbox_ids".to_string(),
1347 ]
1348 }
1349}
1350
1351#[doc = "A message template that is used for pre-written responses"]
1352#[derive(
1353 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1354)]
1355pub struct CreatePrivateMessageTemplate {
1356 #[doc = "Name of the message template"]
1357 pub name: String,
1358 #[doc = "Subject of the message template. If not set, the name will be used to populate the \
1359 subject."]
1360 #[serde(default, skip_serializing_if = "Option::is_none")]
1361 pub subject: Option<String>,
1362 #[doc = "Body of the message template"]
1363 pub body: String,
1364 #[doc = "ID of the message template folder to place this message template in"]
1365 #[serde(default, skip_serializing_if = "Option::is_none")]
1366 pub folder_id: Option<String>,
1367}
1368
1369impl std::fmt::Display for CreatePrivateMessageTemplate {
1370 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1371 write!(
1372 f,
1373 "{}",
1374 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1375 )
1376 }
1377}
1378
1379impl tabled::Tabled for CreatePrivateMessageTemplate {
1380 const LENGTH: usize = 4;
1381 fn fields(&self) -> Vec<String> {
1382 vec![
1383 self.name.clone(),
1384 if let Some(subject) = &self.subject {
1385 format!("{:?}", subject)
1386 } else {
1387 String::new()
1388 },
1389 self.body.clone(),
1390 if let Some(folder_id) = &self.folder_id {
1391 format!("{:?}", folder_id)
1392 } else {
1393 String::new()
1394 },
1395 ]
1396 }
1397
1398 fn headers() -> Vec<String> {
1399 vec![
1400 "name".to_string(),
1401 "subject".to_string(),
1402 "body".to_string(),
1403 "folder_id".to_string(),
1404 ]
1405 }
1406}
1407
1408#[doc = "A message template that is used for pre-written responses"]
1409#[derive(
1410 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1411)]
1412pub struct CreateSharedMessageTemplate {
1413 #[doc = "Name of the message template"]
1414 pub name: String,
1415 #[doc = "Subject of the message template. If not set, the name will be used to populate the \
1416 subject."]
1417 #[serde(default, skip_serializing_if = "Option::is_none")]
1418 pub subject: Option<String>,
1419 #[doc = "Body of the message template"]
1420 pub body: String,
1421 #[doc = "ID of the message template folder to place this message template in"]
1422 #[serde(default, skip_serializing_if = "Option::is_none")]
1423 pub folder_id: Option<String>,
1424 #[serde(default, skip_serializing_if = "Option::is_none")]
1425 pub inbox_ids: Option<Vec<String>>,
1426}
1427
1428impl std::fmt::Display for CreateSharedMessageTemplate {
1429 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1430 write!(
1431 f,
1432 "{}",
1433 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1434 )
1435 }
1436}
1437
1438impl tabled::Tabled for CreateSharedMessageTemplate {
1439 const LENGTH: usize = 5;
1440 fn fields(&self) -> Vec<String> {
1441 vec![
1442 self.name.clone(),
1443 if let Some(subject) = &self.subject {
1444 format!("{:?}", subject)
1445 } else {
1446 String::new()
1447 },
1448 self.body.clone(),
1449 if let Some(folder_id) = &self.folder_id {
1450 format!("{:?}", folder_id)
1451 } else {
1452 String::new()
1453 },
1454 if let Some(inbox_ids) = &self.inbox_ids {
1455 format!("{:?}", inbox_ids)
1456 } else {
1457 String::new()
1458 },
1459 ]
1460 }
1461
1462 fn headers() -> Vec<String> {
1463 vec![
1464 "name".to_string(),
1465 "subject".to_string(),
1466 "body".to_string(),
1467 "folder_id".to_string(),
1468 "inbox_ids".to_string(),
1469 ]
1470 }
1471}
1472
1473#[derive(
1474 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1475)]
1476pub struct CreateContactGroup {
1477 #[doc = "Name of the group"]
1478 pub name: String,
1479}
1480
1481impl std::fmt::Display for CreateContactGroup {
1482 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1483 write!(
1484 f,
1485 "{}",
1486 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1487 )
1488 }
1489}
1490
1491impl tabled::Tabled for CreateContactGroup {
1492 const LENGTH: usize = 1;
1493 fn fields(&self) -> Vec<String> {
1494 vec![self.name.clone()]
1495 }
1496
1497 fn headers() -> Vec<String> {
1498 vec!["name".to_string()]
1499 }
1500}
1501
1502#[derive(
1503 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1504)]
1505pub struct AddContactsToGroup {
1506 #[doc = "List of IDs of the contacts to add in the requested group"]
1507 pub contact_ids: Vec<String>,
1508}
1509
1510impl std::fmt::Display for AddContactsToGroup {
1511 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1512 write!(
1513 f,
1514 "{}",
1515 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1516 )
1517 }
1518}
1519
1520impl tabled::Tabled for AddContactsToGroup {
1521 const LENGTH: usize = 1;
1522 fn fields(&self) -> Vec<String> {
1523 vec![format!("{:?}", self.contact_ids)]
1524 }
1525
1526 fn headers() -> Vec<String> {
1527 vec!["contact_ids".to_string()]
1528 }
1529}
1530
1531#[doc = "Source of the handle. Can be `email`, `phone`, `twitter`, `facebook`, `intercom`, \
1532 `front_chat`, or `custom`."]
1533#[derive(
1534 serde :: Serialize,
1535 serde :: Deserialize,
1536 PartialEq,
1537 Eq,
1538 Hash,
1539 Debug,
1540 Clone,
1541 schemars :: JsonSchema,
1542 tabled :: Tabled,
1543 clap :: ValueEnum,
1544 parse_display :: FromStr,
1545 parse_display :: Display,
1546)]
1547pub enum Source {
1548 #[serde(rename = "twitter")]
1549 #[display("twitter")]
1550 Twitter,
1551 #[serde(rename = "email")]
1552 #[display("email")]
1553 Email,
1554 #[serde(rename = "phone")]
1555 #[display("phone")]
1556 Phone,
1557 #[serde(rename = "facebook")]
1558 #[display("facebook")]
1559 Facebook,
1560 #[serde(rename = "intercom")]
1561 #[display("intercom")]
1562 Intercom,
1563 #[serde(rename = "front_chat")]
1564 #[display("front_chat")]
1565 FrontChat,
1566 #[serde(rename = "custom")]
1567 #[display("custom")]
1568 Custom,
1569}
1570
1571#[derive(
1572 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1573)]
1574pub struct ContactHandle {
1575 #[doc = "Handle used to reach the contact."]
1576 pub handle: String,
1577 #[doc = "Source of the handle. Can be `email`, `phone`, `twitter`, `facebook`, `intercom`, \
1578 `front_chat`, or `custom`."]
1579 pub source: Source,
1580}
1581
1582impl std::fmt::Display for ContactHandle {
1583 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1584 write!(
1585 f,
1586 "{}",
1587 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1588 )
1589 }
1590}
1591
1592impl tabled::Tabled for ContactHandle {
1593 const LENGTH: usize = 2;
1594 fn fields(&self) -> Vec<String> {
1595 vec![self.handle.clone(), format!("{:?}", self.source)]
1596 }
1597
1598 fn headers() -> Vec<String> {
1599 vec!["handle".to_string(), "source".to_string()]
1600 }
1601}
1602
1603#[derive(
1604 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1605)]
1606pub struct CreateContact {
1607 #[doc = "Contact name"]
1608 #[serde(default, skip_serializing_if = "Option::is_none")]
1609 pub name: Option<String>,
1610 #[doc = "Contact description"]
1611 #[serde(default, skip_serializing_if = "Option::is_none")]
1612 pub description: Option<String>,
1613 #[doc = "Binary data of avatar. Must use `Content-Type: multipart/form-data` if specified."]
1614 #[serde(default, skip_serializing_if = "Option::is_none")]
1615 pub avatar: Option<bytes::Bytes>,
1616 #[doc = "Whether or not the contact is marked as a spammer"]
1617 #[serde(default, skip_serializing_if = "Option::is_none")]
1618 pub is_spammer: Option<bool>,
1619 #[doc = "List of all the links of the contact"]
1620 #[serde(default, skip_serializing_if = "Option::is_none")]
1621 pub links: Option<Vec<String>>,
1622 #[doc = "List of all the group names the contact belongs to. It will automatically create \
1623 missing groups"]
1624 #[serde(default, skip_serializing_if = "Option::is_none")]
1625 pub group_names: Option<Vec<String>>,
1626 #[doc = "Custom field attributes for this contact. Leave empty if you do not wish to update \
1627 the attributes. Not sending existing attributes will automatically remove them."]
1628 #[serde(default, skip_serializing_if = "Option::is_none")]
1629 pub custom_fields: Option<std::collections::HashMap<String, String>>,
1630 #[doc = "List of the handles for this contact. Each handle object should include `handle` and \
1631 `source` fields."]
1632 #[serde(default, skip_serializing_if = "Option::is_none")]
1633 pub handles: Option<Vec<ContactHandle>>,
1634}
1635
1636impl std::fmt::Display for CreateContact {
1637 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1638 write!(
1639 f,
1640 "{}",
1641 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1642 )
1643 }
1644}
1645
1646impl tabled::Tabled for CreateContact {
1647 const LENGTH: usize = 8;
1648 fn fields(&self) -> Vec<String> {
1649 vec![
1650 if let Some(name) = &self.name {
1651 format!("{:?}", name)
1652 } else {
1653 String::new()
1654 },
1655 if let Some(description) = &self.description {
1656 format!("{:?}", description)
1657 } else {
1658 String::new()
1659 },
1660 if let Some(avatar) = &self.avatar {
1661 format!("{:?}", avatar)
1662 } else {
1663 String::new()
1664 },
1665 if let Some(is_spammer) = &self.is_spammer {
1666 format!("{:?}", is_spammer)
1667 } else {
1668 String::new()
1669 },
1670 if let Some(links) = &self.links {
1671 format!("{:?}", links)
1672 } else {
1673 String::new()
1674 },
1675 if let Some(group_names) = &self.group_names {
1676 format!("{:?}", group_names)
1677 } else {
1678 String::new()
1679 },
1680 if let Some(custom_fields) = &self.custom_fields {
1681 format!("{:?}", custom_fields)
1682 } else {
1683 String::new()
1684 },
1685 if let Some(handles) = &self.handles {
1686 format!("{:?}", handles)
1687 } else {
1688 String::new()
1689 },
1690 ]
1691 }
1692
1693 fn headers() -> Vec<String> {
1694 vec![
1695 "name".to_string(),
1696 "description".to_string(),
1697 "avatar".to_string(),
1698 "is_spammer".to_string(),
1699 "links".to_string(),
1700 "group_names".to_string(),
1701 "custom_fields".to_string(),
1702 "handles".to_string(),
1703 ]
1704 }
1705}
1706
1707#[derive(
1708 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1709)]
1710pub struct Contact {
1711 #[doc = "Contact name"]
1712 #[serde(default, skip_serializing_if = "Option::is_none")]
1713 pub name: Option<String>,
1714 #[doc = "Contact description"]
1715 #[serde(default, skip_serializing_if = "Option::is_none")]
1716 pub description: Option<String>,
1717 #[doc = "Binary data of avatar. Must use `Content-Type: multipart/form-data` if specified."]
1718 #[serde(default, skip_serializing_if = "Option::is_none")]
1719 pub avatar: Option<bytes::Bytes>,
1720 #[doc = "Whether or not the contact is marked as a spammer"]
1721 #[serde(default, skip_serializing_if = "Option::is_none")]
1722 pub is_spammer: Option<bool>,
1723 #[doc = "List of all the links of the contact"]
1724 #[serde(default, skip_serializing_if = "Option::is_none")]
1725 pub links: Option<Vec<String>>,
1726 #[doc = "List of all the group names the contact belongs to. It will automatically create \
1727 missing groups"]
1728 #[serde(default, skip_serializing_if = "Option::is_none")]
1729 pub group_names: Option<Vec<String>>,
1730 #[doc = "Custom field attributes for this contact. Leave empty if you do not wish to update \
1731 the attributes. Not sending existing attributes will automatically remove them."]
1732 #[serde(default, skip_serializing_if = "Option::is_none")]
1733 pub custom_fields: Option<std::collections::HashMap<String, String>>,
1734}
1735
1736impl std::fmt::Display for Contact {
1737 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1738 write!(
1739 f,
1740 "{}",
1741 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1742 )
1743 }
1744}
1745
1746impl tabled::Tabled for Contact {
1747 const LENGTH: usize = 7;
1748 fn fields(&self) -> Vec<String> {
1749 vec![
1750 if let Some(name) = &self.name {
1751 format!("{:?}", name)
1752 } else {
1753 String::new()
1754 },
1755 if let Some(description) = &self.description {
1756 format!("{:?}", description)
1757 } else {
1758 String::new()
1759 },
1760 if let Some(avatar) = &self.avatar {
1761 format!("{:?}", avatar)
1762 } else {
1763 String::new()
1764 },
1765 if let Some(is_spammer) = &self.is_spammer {
1766 format!("{:?}", is_spammer)
1767 } else {
1768 String::new()
1769 },
1770 if let Some(links) = &self.links {
1771 format!("{:?}", links)
1772 } else {
1773 String::new()
1774 },
1775 if let Some(group_names) = &self.group_names {
1776 format!("{:?}", group_names)
1777 } else {
1778 String::new()
1779 },
1780 if let Some(custom_fields) = &self.custom_fields {
1781 format!("{:?}", custom_fields)
1782 } else {
1783 String::new()
1784 },
1785 ]
1786 }
1787
1788 fn headers() -> Vec<String> {
1789 vec![
1790 "name".to_string(),
1791 "description".to_string(),
1792 "avatar".to_string(),
1793 "is_spammer".to_string(),
1794 "links".to_string(),
1795 "group_names".to_string(),
1796 "custom_fields".to_string(),
1797 ]
1798 }
1799}
1800
1801#[derive(
1802 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1803)]
1804pub struct MergeContacts {
1805 #[doc = "Optional contact ID to merge the other contacts into."]
1806 #[serde(default, skip_serializing_if = "Option::is_none")]
1807 pub target_contact_id: Option<String>,
1808 #[doc = "Array of all the contact IDs of the contacts to be merged. If a target contact id \
1809 is provided and that contact id is not in this array, the length of this array must \
1810 be between 1 and 49. If no target contact id is provided or it is contained in this \
1811 array, the length must be between 2 and 50."]
1812 pub contact_ids: Vec<String>,
1813}
1814
1815impl std::fmt::Display for MergeContacts {
1816 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1817 write!(
1818 f,
1819 "{}",
1820 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1821 )
1822 }
1823}
1824
1825impl tabled::Tabled for MergeContacts {
1826 const LENGTH: usize = 2;
1827 fn fields(&self) -> Vec<String> {
1828 vec![
1829 if let Some(target_contact_id) = &self.target_contact_id {
1830 format!("{:?}", target_contact_id)
1831 } else {
1832 String::new()
1833 },
1834 format!("{:?}", self.contact_ids),
1835 ]
1836 }
1837
1838 fn headers() -> Vec<String> {
1839 vec!["target_contact_id".to_string(), "contact_ids".to_string()]
1840 }
1841}
1842
1843#[derive(
1844 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1845)]
1846pub struct DeleteContactHandle {
1847 #[doc = "Handle used to reach the contact."]
1848 pub handle: String,
1849 #[doc = "Source of the handle. Can be `email`, `phone`, `twitter`, `facebook`, `intercom`, \
1850 `front_chat`, or `custom`."]
1851 pub source: Source,
1852 #[doc = "Force the deletetion of the contact if the handle is the last one"]
1853 #[serde(default, skip_serializing_if = "Option::is_none")]
1854 pub force: Option<bool>,
1855}
1856
1857impl std::fmt::Display for DeleteContactHandle {
1858 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1859 write!(
1860 f,
1861 "{}",
1862 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1863 )
1864 }
1865}
1866
1867impl tabled::Tabled for DeleteContactHandle {
1868 const LENGTH: usize = 3;
1869 fn fields(&self) -> Vec<String> {
1870 vec![
1871 self.handle.clone(),
1872 format!("{:?}", self.source),
1873 if let Some(force) = &self.force {
1874 format!("{:?}", force)
1875 } else {
1876 String::new()
1877 },
1878 ]
1879 }
1880
1881 fn headers() -> Vec<String> {
1882 vec![
1883 "handle".to_string(),
1884 "source".to_string(),
1885 "force".to_string(),
1886 ]
1887 }
1888}
1889
1890#[derive(
1891 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1892)]
1893pub struct CreateContactNote {
1894 #[doc = "ID of teammate creating the note"]
1895 pub author_id: String,
1896 #[doc = "Content of the note"]
1897 pub body: String,
1898}
1899
1900impl std::fmt::Display for CreateContactNote {
1901 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1902 write!(
1903 f,
1904 "{}",
1905 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1906 )
1907 }
1908}
1909
1910impl tabled::Tabled for CreateContactNote {
1911 const LENGTH: usize = 2;
1912 fn fields(&self) -> Vec<String> {
1913 vec![self.author_id.clone(), self.body.clone()]
1914 }
1915
1916 fn headers() -> Vec<String> {
1917 vec!["author_id".to_string(), "body".to_string()]
1918 }
1919}
1920
1921#[doc = "Settings to replace.\nFor custom channels, all settings may be replaced.\nFor all other \
1922 channels, only `undo_send_time` and `all_teammates_can_reply` may be replaced.\n"]
1923#[derive(
1924 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1925)]
1926pub struct Settings {
1927 #[doc = "The time (measured in seconds) that users have to undo a send operation in the \
1928 channel."]
1929 #[serde(default, skip_serializing_if = "Option::is_none")]
1930 pub undo_send_time: Option<i64>,
1931 #[doc = "Whether teammates without inbox access can reply on this channel. Only allowed for \
1932 shared channels."]
1933 #[serde(default, skip_serializing_if = "Option::is_none")]
1934 pub all_teammates_can_reply: Option<bool>,
1935}
1936
1937impl std::fmt::Display for Settings {
1938 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1939 write!(
1940 f,
1941 "{}",
1942 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1943 )
1944 }
1945}
1946
1947impl tabled::Tabled for Settings {
1948 const LENGTH: usize = 2;
1949 fn fields(&self) -> Vec<String> {
1950 vec![
1951 if let Some(undo_send_time) = &self.undo_send_time {
1952 format!("{:?}", undo_send_time)
1953 } else {
1954 String::new()
1955 },
1956 if let Some(all_teammates_can_reply) = &self.all_teammates_can_reply {
1957 format!("{:?}", all_teammates_can_reply)
1958 } else {
1959 String::new()
1960 },
1961 ]
1962 }
1963
1964 fn headers() -> Vec<String> {
1965 vec![
1966 "undo_send_time".to_string(),
1967 "all_teammates_can_reply".to_string(),
1968 ]
1969 }
1970}
1971
1972#[derive(
1973 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
1974)]
1975pub struct UpdateChannel {
1976 #[doc = "Name of the channel"]
1977 #[serde(default, skip_serializing_if = "Option::is_none")]
1978 pub name: Option<String>,
1979 #[doc = "Settings to replace.\nFor custom channels, all settings may be replaced.\nFor all \
1980 other channels, only `undo_send_time` and `all_teammates_can_reply` may be \
1981 replaced.\n"]
1982 #[serde(default, skip_serializing_if = "Option::is_none")]
1983 pub settings: Option<Settings>,
1984}
1985
1986impl std::fmt::Display for UpdateChannel {
1987 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1988 write!(
1989 f,
1990 "{}",
1991 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1992 )
1993 }
1994}
1995
1996impl tabled::Tabled for UpdateChannel {
1997 const LENGTH: usize = 2;
1998 fn fields(&self) -> Vec<String> {
1999 vec![
2000 if let Some(name) = &self.name {
2001 format!("{:?}", name)
2002 } else {
2003 String::new()
2004 },
2005 if let Some(settings) = &self.settings {
2006 format!("{:?}", settings)
2007 } else {
2008 String::new()
2009 },
2010 ]
2011 }
2012
2013 fn headers() -> Vec<String> {
2014 vec!["name".to_string(), "settings".to_string()]
2015 }
2016}
2017
2018#[doc = "Settings of the channel"]
2019#[derive(
2020 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2021)]
2022pub struct CreateChannelSettings {
2023 #[doc = "The time (measured in seconds) that users have to undo a send operation in the \
2024 channel."]
2025 #[serde(default, skip_serializing_if = "Option::is_none")]
2026 pub undo_send_time: Option<i64>,
2027 #[doc = "Whether teammates without inbox access can reply on this channel. Only allowed for \
2028 shared channels."]
2029 #[serde(default, skip_serializing_if = "Option::is_none")]
2030 pub all_teammates_can_reply: Option<bool>,
2031}
2032
2033impl std::fmt::Display for CreateChannelSettings {
2034 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2035 write!(
2036 f,
2037 "{}",
2038 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2039 )
2040 }
2041}
2042
2043impl tabled::Tabled for CreateChannelSettings {
2044 const LENGTH: usize = 2;
2045 fn fields(&self) -> Vec<String> {
2046 vec![
2047 if let Some(undo_send_time) = &self.undo_send_time {
2048 format!("{:?}", undo_send_time)
2049 } else {
2050 String::new()
2051 },
2052 if let Some(all_teammates_can_reply) = &self.all_teammates_can_reply {
2053 format!("{:?}", all_teammates_can_reply)
2054 } else {
2055 String::new()
2056 },
2057 ]
2058 }
2059
2060 fn headers() -> Vec<String> {
2061 vec![
2062 "undo_send_time".to_string(),
2063 "all_teammates_can_reply".to_string(),
2064 ]
2065 }
2066}
2067
2068#[doc = "Type of the channel"]
2069#[derive(
2070 serde :: Serialize,
2071 serde :: Deserialize,
2072 PartialEq,
2073 Eq,
2074 Hash,
2075 Debug,
2076 Clone,
2077 schemars :: JsonSchema,
2078 tabled :: Tabled,
2079 clap :: ValueEnum,
2080 parse_display :: FromStr,
2081 parse_display :: Display,
2082)]
2083pub enum CreateChannelType {
2084 #[serde(rename = "custom")]
2085 #[display("custom")]
2086 Custom,
2087 #[serde(rename = "smtp")]
2088 #[display("smtp")]
2089 Smtp,
2090 #[serde(rename = "twilio")]
2091 #[display("twilio")]
2092 Twilio,
2093}
2094
2095#[derive(
2096 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2097)]
2098pub struct CreateChannel {
2099 #[doc = "Name of the channel"]
2100 #[serde(default, skip_serializing_if = "Option::is_none")]
2101 pub name: Option<String>,
2102 #[doc = "Settings of the channel"]
2103 #[serde(default, skip_serializing_if = "Option::is_none")]
2104 pub settings: Option<CreateChannelSettings>,
2105 #[doc = "Type of the channel"]
2106 #[serde(rename = "type")]
2107 pub type_: CreateChannelType,
2108 #[doc = "Sending address of your channel"]
2109 #[serde(default, skip_serializing_if = "Option::is_none")]
2110 pub send_as: Option<String>,
2111}
2112
2113impl std::fmt::Display for CreateChannel {
2114 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2115 write!(
2116 f,
2117 "{}",
2118 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2119 )
2120 }
2121}
2122
2123impl tabled::Tabled for CreateChannel {
2124 const LENGTH: usize = 4;
2125 fn fields(&self) -> Vec<String> {
2126 vec![
2127 if let Some(name) = &self.name {
2128 format!("{:?}", name)
2129 } else {
2130 String::new()
2131 },
2132 if let Some(settings) = &self.settings {
2133 format!("{:?}", settings)
2134 } else {
2135 String::new()
2136 },
2137 format!("{:?}", self.type_),
2138 if let Some(send_as) = &self.send_as {
2139 format!("{:?}", send_as)
2140 } else {
2141 String::new()
2142 },
2143 ]
2144 }
2145
2146 fn headers() -> Vec<String> {
2147 vec![
2148 "name".to_string(),
2149 "settings".to_string(),
2150 "type_".to_string(),
2151 "send_as".to_string(),
2152 ]
2153 }
2154}
2155
2156#[derive(
2157 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2158)]
2159pub struct CreateComment {
2160 #[doc = "ID of the teammate creating the comment. If omitted, will post as the API Token or \
2161 OAuth client of the requester."]
2162 #[serde(default, skip_serializing_if = "Option::is_none")]
2163 pub author_id: Option<String>,
2164 #[doc = "Content of the comment"]
2165 pub body: String,
2166 #[doc = "Binary data of attached files. Must use `Content-Type: multipart/form-data` if specified. See [example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb)."]
2167 #[serde(default, skip_serializing_if = "Option::is_none")]
2168 pub attachments: Option<Vec<bytes::Bytes>>,
2169}
2170
2171impl std::fmt::Display for CreateComment {
2172 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2173 write!(
2174 f,
2175 "{}",
2176 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2177 )
2178 }
2179}
2180
2181impl tabled::Tabled for CreateComment {
2182 const LENGTH: usize = 3;
2183 fn fields(&self) -> Vec<String> {
2184 vec![
2185 if let Some(author_id) = &self.author_id {
2186 format!("{:?}", author_id)
2187 } else {
2188 String::new()
2189 },
2190 self.body.clone(),
2191 if let Some(attachments) = &self.attachments {
2192 format!("{:?}", attachments)
2193 } else {
2194 String::new()
2195 },
2196 ]
2197 }
2198
2199 fn headers() -> Vec<String> {
2200 vec![
2201 "author_id".to_string(),
2202 "body".to_string(),
2203 "attachments".to_string(),
2204 ]
2205 }
2206}
2207
2208#[doc = "Conversation type"]
2209#[derive(
2210 serde :: Serialize,
2211 serde :: Deserialize,
2212 PartialEq,
2213 Eq,
2214 Hash,
2215 Debug,
2216 Clone,
2217 schemars :: JsonSchema,
2218 tabled :: Tabled,
2219 clap :: ValueEnum,
2220 parse_display :: FromStr,
2221 parse_display :: Display,
2222)]
2223pub enum CreateConversationType {
2224 #[serde(rename = "discussion")]
2225 #[display("discussion")]
2226 Discussion,
2227}
2228
2229impl std::default::Default for CreateConversationType {
2230 fn default() -> Self {
2231 CreateConversationType::Discussion
2232 }
2233}
2234
2235#[doc = "Details for the starter comment"]
2236#[derive(
2237 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2238)]
2239pub struct Comment {
2240 #[doc = "ID of the teammate creating the comment. If omitted, will post as the API Token or \
2241 OAuth client of the requester."]
2242 #[serde(default, skip_serializing_if = "Option::is_none")]
2243 pub author_id: Option<String>,
2244 #[doc = "Content of the comment"]
2245 pub body: String,
2246 #[doc = "Binary data of attached files. Must use `Content-Type: multipart/form-data` if specified. See [example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb)."]
2247 #[serde(default, skip_serializing_if = "Option::is_none")]
2248 pub attachments: Option<Vec<bytes::Bytes>>,
2249}
2250
2251impl std::fmt::Display for Comment {
2252 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2253 write!(
2254 f,
2255 "{}",
2256 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2257 )
2258 }
2259}
2260
2261impl tabled::Tabled for Comment {
2262 const LENGTH: usize = 3;
2263 fn fields(&self) -> Vec<String> {
2264 vec![
2265 if let Some(author_id) = &self.author_id {
2266 format!("{:?}", author_id)
2267 } else {
2268 String::new()
2269 },
2270 self.body.clone(),
2271 if let Some(attachments) = &self.attachments {
2272 format!("{:?}", attachments)
2273 } else {
2274 String::new()
2275 },
2276 ]
2277 }
2278
2279 fn headers() -> Vec<String> {
2280 vec![
2281 "author_id".to_string(),
2282 "body".to_string(),
2283 "attachments".to_string(),
2284 ]
2285 }
2286}
2287
2288#[derive(
2289 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2290)]
2291pub struct CreateConversation {
2292 #[doc = "Conversation type"]
2293 #[serde(rename = "type")]
2294 pub type_: CreateConversationType,
2295 #[doc = "Inbox ID for the conversation. Either `inbox_id` OR `teammate_ids` must be provided \
2296 (not both)."]
2297 #[serde(default, skip_serializing_if = "Option::is_none")]
2298 pub inbox_id: Option<String>,
2299 #[doc = "Teammates to add to the conversation. Either `inbox_id` OR `teammate_ids` must be \
2300 provided (not both)."]
2301 #[serde(default, skip_serializing_if = "Option::is_none")]
2302 pub teammate_ids: Option<Vec<String>>,
2303 #[doc = "Subject of the conversation"]
2304 pub subject: String,
2305 #[doc = "Details for the starter comment"]
2306 pub comment: Comment,
2307}
2308
2309impl std::fmt::Display for CreateConversation {
2310 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2311 write!(
2312 f,
2313 "{}",
2314 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2315 )
2316 }
2317}
2318
2319impl tabled::Tabled for CreateConversation {
2320 const LENGTH: usize = 5;
2321 fn fields(&self) -> Vec<String> {
2322 vec![
2323 format!("{:?}", self.type_),
2324 if let Some(inbox_id) = &self.inbox_id {
2325 format!("{:?}", inbox_id)
2326 } else {
2327 String::new()
2328 },
2329 if let Some(teammate_ids) = &self.teammate_ids {
2330 format!("{:?}", teammate_ids)
2331 } else {
2332 String::new()
2333 },
2334 self.subject.clone(),
2335 format!("{:?}", self.comment),
2336 ]
2337 }
2338
2339 fn headers() -> Vec<String> {
2340 vec![
2341 "type_".to_string(),
2342 "inbox_id".to_string(),
2343 "teammate_ids".to_string(),
2344 "subject".to_string(),
2345 "comment".to_string(),
2346 ]
2347 }
2348}
2349
2350#[doc = "New status of the conversation"]
2351#[derive(
2352 serde :: Serialize,
2353 serde :: Deserialize,
2354 PartialEq,
2355 Eq,
2356 Hash,
2357 Debug,
2358 Clone,
2359 schemars :: JsonSchema,
2360 tabled :: Tabled,
2361 clap :: ValueEnum,
2362 parse_display :: FromStr,
2363 parse_display :: Display,
2364)]
2365pub enum Status {
2366 #[serde(rename = "archived")]
2367 #[display("archived")]
2368 Archived,
2369 #[serde(rename = "open")]
2370 #[display("open")]
2371 Open,
2372 #[serde(rename = "deleted")]
2373 #[display("deleted")]
2374 Deleted,
2375 #[serde(rename = "spam")]
2376 #[display("spam")]
2377 Spam,
2378}
2379
2380#[derive(
2381 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2382)]
2383pub struct UpdateConversation {
2384 #[doc = "ID of the teammate to assign the conversation to. Set it to null to unassign."]
2385 #[serde(default, skip_serializing_if = "Option::is_none")]
2386 pub assignee_id: Option<String>,
2387 #[doc = "ID of the inbox to move the conversation to."]
2388 #[serde(default, skip_serializing_if = "Option::is_none")]
2389 pub inbox_id: Option<String>,
2390 #[doc = "New status of the conversation"]
2391 #[serde(default, skip_serializing_if = "Option::is_none")]
2392 pub status: Option<Status>,
2393 #[doc = "List of all the tag IDs replacing the old conversation tags"]
2394 #[serde(default, skip_serializing_if = "Option::is_none")]
2395 pub tag_ids: Option<Vec<String>>,
2396}
2397
2398impl std::fmt::Display for UpdateConversation {
2399 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2400 write!(
2401 f,
2402 "{}",
2403 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2404 )
2405 }
2406}
2407
2408impl tabled::Tabled for UpdateConversation {
2409 const LENGTH: usize = 4;
2410 fn fields(&self) -> Vec<String> {
2411 vec![
2412 if let Some(assignee_id) = &self.assignee_id {
2413 format!("{:?}", assignee_id)
2414 } else {
2415 String::new()
2416 },
2417 if let Some(inbox_id) = &self.inbox_id {
2418 format!("{:?}", inbox_id)
2419 } else {
2420 String::new()
2421 },
2422 if let Some(status) = &self.status {
2423 format!("{:?}", status)
2424 } else {
2425 String::new()
2426 },
2427 if let Some(tag_ids) = &self.tag_ids {
2428 format!("{:?}", tag_ids)
2429 } else {
2430 String::new()
2431 },
2432 ]
2433 }
2434
2435 fn headers() -> Vec<String> {
2436 vec![
2437 "assignee_id".to_string(),
2438 "inbox_id".to_string(),
2439 "status".to_string(),
2440 "tag_ids".to_string(),
2441 ]
2442 }
2443}
2444
2445#[derive(
2446 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2447)]
2448pub struct UpdateConversationAssignee {
2449 #[doc = "ID of the teammate to assign the conversation to. Set it to null to unassign."]
2450 pub assignee_id: String,
2451}
2452
2453impl std::fmt::Display for UpdateConversationAssignee {
2454 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2455 write!(
2456 f,
2457 "{}",
2458 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2459 )
2460 }
2461}
2462
2463impl tabled::Tabled for UpdateConversationAssignee {
2464 const LENGTH: usize = 1;
2465 fn fields(&self) -> Vec<String> {
2466 vec![self.assignee_id.clone()]
2467 }
2468
2469 fn headers() -> Vec<String> {
2470 vec!["assignee_id".to_string()]
2471 }
2472}
2473
2474#[derive(
2475 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2476)]
2477pub struct UpdateConversationReminders {
2478 #[doc = "ID of the teammate to create a reminder for. For a private conversation, specify the \
2479 id of the teammate that owns the conversation. For a shared conversation, use the id \
2480 of any teammate that has access to the conversation's shared inbox."]
2481 pub teammate_id: String,
2482 #[doc = "Timestamp to schedule the reminder for. Set to null to cancel."]
2483 pub scheduled_at: String,
2484}
2485
2486impl std::fmt::Display for UpdateConversationReminders {
2487 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2488 write!(
2489 f,
2490 "{}",
2491 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2492 )
2493 }
2494}
2495
2496impl tabled::Tabled for UpdateConversationReminders {
2497 const LENGTH: usize = 2;
2498 fn fields(&self) -> Vec<String> {
2499 vec![self.teammate_id.clone(), self.scheduled_at.clone()]
2500 }
2501
2502 fn headers() -> Vec<String> {
2503 vec!["teammate_id".to_string(), "scheduled_at".to_string()]
2504 }
2505}
2506
2507#[derive(
2508 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2509)]
2510pub struct UpdateCustomField {
2511 #[doc = "Name of the custom field"]
2512 #[serde(default, skip_serializing_if = "Option::is_none")]
2513 pub name: Option<String>,
2514 #[doc = "Description of the custom field"]
2515 #[serde(default, skip_serializing_if = "Option::is_none")]
2516 pub description: Option<String>,
2517}
2518
2519impl std::fmt::Display for UpdateCustomField {
2520 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2521 write!(
2522 f,
2523 "{}",
2524 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2525 )
2526 }
2527}
2528
2529impl tabled::Tabled for UpdateCustomField {
2530 const LENGTH: usize = 2;
2531 fn fields(&self) -> Vec<String> {
2532 vec![
2533 if let Some(name) = &self.name {
2534 format!("{:?}", name)
2535 } else {
2536 String::new()
2537 },
2538 if let Some(description) = &self.description {
2539 format!("{:?}", description)
2540 } else {
2541 String::new()
2542 },
2543 ]
2544 }
2545
2546 fn headers() -> Vec<String> {
2547 vec!["name".to_string(), "description".to_string()]
2548 }
2549}
2550
2551#[doc = "Mode of the draft to create. Can be 'private' (draft is visible to the author only) or \
2552 'shared' (draft is visible to all teammates with access to the conversation)."]
2553#[derive(
2554 serde :: Serialize,
2555 serde :: Deserialize,
2556 PartialEq,
2557 Eq,
2558 Hash,
2559 Debug,
2560 Clone,
2561 schemars :: JsonSchema,
2562 tabled :: Tabled,
2563 clap :: ValueEnum,
2564 parse_display :: FromStr,
2565 parse_display :: Display,
2566)]
2567pub enum Mode {
2568 #[serde(rename = "private")]
2569 #[display("private")]
2570 Private,
2571 #[serde(rename = "shared")]
2572 #[display("shared")]
2573 Shared,
2574}
2575
2576impl std::default::Default for Mode {
2577 fn default() -> Self {
2578 Mode::Private
2579 }
2580}
2581
2582#[derive(
2583 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2584)]
2585pub struct CreateDraft {
2586 #[doc = "ID of the teammate on behalf of whom the draft will be created"]
2587 pub author_id: String,
2588 #[serde(default, skip_serializing_if = "Option::is_none")]
2589 pub to: Option<Vec<String>>,
2590 #[serde(default, skip_serializing_if = "Option::is_none")]
2591 pub cc: Option<Vec<String>>,
2592 #[serde(default, skip_serializing_if = "Option::is_none")]
2593 pub bcc: Option<Vec<String>>,
2594 #[doc = "Subject of the draft."]
2595 #[serde(default, skip_serializing_if = "Option::is_none")]
2596 pub subject: Option<String>,
2597 #[doc = "Body of the draft"]
2598 pub body: String,
2599 #[doc = "Binary data of attached files. Must use `Content-Type: multipart/form-data` if specified. See [example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb)."]
2600 #[serde(default, skip_serializing_if = "Option::is_none")]
2601 pub attachments: Option<Vec<bytes::Bytes>>,
2602 #[doc = "Mode of the draft to create. Can be 'private' (draft is visible to the author only) \
2603 or 'shared' (draft is visible to all teammates with access to the conversation)."]
2604 #[serde(default, skip_serializing_if = "Option::is_none")]
2605 pub mode: Option<Mode>,
2606 #[doc = "ID of the signature to attach to this draft. If null, no signature is attached."]
2607 #[serde(default, skip_serializing_if = "Option::is_none")]
2608 pub signature_id: Option<String>,
2609 #[doc = "Whether or not Front should try to resolve a signature for the message. Is ignored \
2610 if signature_id is included. Default false;"]
2611 #[serde(default, skip_serializing_if = "Option::is_none")]
2612 pub should_add_default_signature: Option<bool>,
2613}
2614
2615impl std::fmt::Display for CreateDraft {
2616 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2617 write!(
2618 f,
2619 "{}",
2620 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2621 )
2622 }
2623}
2624
2625impl tabled::Tabled for CreateDraft {
2626 const LENGTH: usize = 10;
2627 fn fields(&self) -> Vec<String> {
2628 vec![
2629 self.author_id.clone(),
2630 if let Some(to) = &self.to {
2631 format!("{:?}", to)
2632 } else {
2633 String::new()
2634 },
2635 if let Some(cc) = &self.cc {
2636 format!("{:?}", cc)
2637 } else {
2638 String::new()
2639 },
2640 if let Some(bcc) = &self.bcc {
2641 format!("{:?}", bcc)
2642 } else {
2643 String::new()
2644 },
2645 if let Some(subject) = &self.subject {
2646 format!("{:?}", subject)
2647 } else {
2648 String::new()
2649 },
2650 self.body.clone(),
2651 if let Some(attachments) = &self.attachments {
2652 format!("{:?}", attachments)
2653 } else {
2654 String::new()
2655 },
2656 if let Some(mode) = &self.mode {
2657 format!("{:?}", mode)
2658 } else {
2659 String::new()
2660 },
2661 if let Some(signature_id) = &self.signature_id {
2662 format!("{:?}", signature_id)
2663 } else {
2664 String::new()
2665 },
2666 if let Some(should_add_default_signature) = &self.should_add_default_signature {
2667 format!("{:?}", should_add_default_signature)
2668 } else {
2669 String::new()
2670 },
2671 ]
2672 }
2673
2674 fn headers() -> Vec<String> {
2675 vec![
2676 "author_id".to_string(),
2677 "to".to_string(),
2678 "cc".to_string(),
2679 "bcc".to_string(),
2680 "subject".to_string(),
2681 "body".to_string(),
2682 "attachments".to_string(),
2683 "mode".to_string(),
2684 "signature_id".to_string(),
2685 "should_add_default_signature".to_string(),
2686 ]
2687 }
2688}
2689
2690#[derive(
2691 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2692)]
2693pub struct ReplyDraft {
2694 #[doc = "ID of the teammate on behalf of whom the draft will be created"]
2695 pub author_id: String,
2696 #[serde(default, skip_serializing_if = "Option::is_none")]
2697 pub to: Option<Vec<String>>,
2698 #[serde(default, skip_serializing_if = "Option::is_none")]
2699 pub cc: Option<Vec<String>>,
2700 #[serde(default, skip_serializing_if = "Option::is_none")]
2701 pub bcc: Option<Vec<String>>,
2702 #[doc = "Subject of the draft."]
2703 #[serde(default, skip_serializing_if = "Option::is_none")]
2704 pub subject: Option<String>,
2705 #[doc = "Body of the draft"]
2706 pub body: String,
2707 #[doc = "Binary data of attached files. Must use `Content-Type: multipart/form-data` if specified. See [example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb)."]
2708 #[serde(default, skip_serializing_if = "Option::is_none")]
2709 pub attachments: Option<Vec<bytes::Bytes>>,
2710 #[doc = "Mode of the draft to create. Can be 'private' (draft is visible to the author only) \
2711 or 'shared' (draft is visible to all teammates with access to the conversation)."]
2712 #[serde(default, skip_serializing_if = "Option::is_none")]
2713 pub mode: Option<Mode>,
2714 #[doc = "ID of the signature to attach to this draft. If null, no signature is attached."]
2715 #[serde(default, skip_serializing_if = "Option::is_none")]
2716 pub signature_id: Option<String>,
2717 #[doc = "Whether or not Front should try to resolve a signature for the message. Is ignored \
2718 if signature_id is included. Default false;"]
2719 #[serde(default, skip_serializing_if = "Option::is_none")]
2720 pub should_add_default_signature: Option<bool>,
2721 #[doc = "ID of the channel from which the draft will be sent"]
2722 #[serde(default, skip_serializing_if = "Option::is_none")]
2723 pub channel_id: Option<String>,
2724}
2725
2726impl std::fmt::Display for ReplyDraft {
2727 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2728 write!(
2729 f,
2730 "{}",
2731 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2732 )
2733 }
2734}
2735
2736impl tabled::Tabled for ReplyDraft {
2737 const LENGTH: usize = 11;
2738 fn fields(&self) -> Vec<String> {
2739 vec![
2740 self.author_id.clone(),
2741 if let Some(to) = &self.to {
2742 format!("{:?}", to)
2743 } else {
2744 String::new()
2745 },
2746 if let Some(cc) = &self.cc {
2747 format!("{:?}", cc)
2748 } else {
2749 String::new()
2750 },
2751 if let Some(bcc) = &self.bcc {
2752 format!("{:?}", bcc)
2753 } else {
2754 String::new()
2755 },
2756 if let Some(subject) = &self.subject {
2757 format!("{:?}", subject)
2758 } else {
2759 String::new()
2760 },
2761 self.body.clone(),
2762 if let Some(attachments) = &self.attachments {
2763 format!("{:?}", attachments)
2764 } else {
2765 String::new()
2766 },
2767 if let Some(mode) = &self.mode {
2768 format!("{:?}", mode)
2769 } else {
2770 String::new()
2771 },
2772 if let Some(signature_id) = &self.signature_id {
2773 format!("{:?}", signature_id)
2774 } else {
2775 String::new()
2776 },
2777 if let Some(should_add_default_signature) = &self.should_add_default_signature {
2778 format!("{:?}", should_add_default_signature)
2779 } else {
2780 String::new()
2781 },
2782 if let Some(channel_id) = &self.channel_id {
2783 format!("{:?}", channel_id)
2784 } else {
2785 String::new()
2786 },
2787 ]
2788 }
2789
2790 fn headers() -> Vec<String> {
2791 vec![
2792 "author_id".to_string(),
2793 "to".to_string(),
2794 "cc".to_string(),
2795 "bcc".to_string(),
2796 "subject".to_string(),
2797 "body".to_string(),
2798 "attachments".to_string(),
2799 "mode".to_string(),
2800 "signature_id".to_string(),
2801 "should_add_default_signature".to_string(),
2802 "channel_id".to_string(),
2803 ]
2804 }
2805}
2806
2807#[doc = "Mode of the draft to update. Can only be 'shared' (draft is visible to all teammates with \
2808 access to the conversation)."]
2809#[derive(
2810 serde :: Serialize,
2811 serde :: Deserialize,
2812 PartialEq,
2813 Eq,
2814 Hash,
2815 Debug,
2816 Clone,
2817 schemars :: JsonSchema,
2818 tabled :: Tabled,
2819 clap :: ValueEnum,
2820 parse_display :: FromStr,
2821 parse_display :: Display,
2822)]
2823pub enum EditDraftMode {
2824 #[serde(rename = "shared")]
2825 #[display("shared")]
2826 Shared,
2827}
2828
2829impl std::default::Default for EditDraftMode {
2830 fn default() -> Self {
2831 EditDraftMode::Shared
2832 }
2833}
2834
2835#[derive(
2836 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2837)]
2838pub struct EditDraft {
2839 #[doc = "ID of the teammate on behalf of whom the draft will be created"]
2840 pub author_id: String,
2841 #[serde(default, skip_serializing_if = "Option::is_none")]
2842 pub to: Option<Vec<String>>,
2843 #[serde(default, skip_serializing_if = "Option::is_none")]
2844 pub cc: Option<Vec<String>>,
2845 #[serde(default, skip_serializing_if = "Option::is_none")]
2846 pub bcc: Option<Vec<String>>,
2847 #[doc = "Subject of the draft."]
2848 #[serde(default, skip_serializing_if = "Option::is_none")]
2849 pub subject: Option<String>,
2850 #[doc = "Body of the draft"]
2851 pub body: String,
2852 #[doc = "Binary data of attached files. Must use `Content-Type: multipart/form-data` if specified. See [example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb)."]
2853 #[serde(default, skip_serializing_if = "Option::is_none")]
2854 pub attachments: Option<Vec<bytes::Bytes>>,
2855 #[doc = "Mode of the draft to update. Can only be 'shared' (draft is visible to all teammates \
2856 with access to the conversation)."]
2857 #[serde(default, skip_serializing_if = "Option::is_none")]
2858 pub mode: Option<EditDraftMode>,
2859 #[doc = "ID of the signature to attach to this draft. If null, no signature is attached."]
2860 #[serde(default, skip_serializing_if = "Option::is_none")]
2861 pub signature_id: Option<String>,
2862 #[doc = "Whether or not Front should try to resolve a signature for the message. Is ignored \
2863 if signature_id is included. Default false;"]
2864 #[serde(default, skip_serializing_if = "Option::is_none")]
2865 pub should_add_default_signature: Option<bool>,
2866 #[doc = "ID of the channel from which the draft will be sent"]
2867 #[serde(default, skip_serializing_if = "Option::is_none")]
2868 pub channel_id: Option<String>,
2869 #[doc = "Version of the draft"]
2870 #[serde(default, skip_serializing_if = "Option::is_none")]
2871 pub version: Option<String>,
2872}
2873
2874impl std::fmt::Display for EditDraft {
2875 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2876 write!(
2877 f,
2878 "{}",
2879 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2880 )
2881 }
2882}
2883
2884impl tabled::Tabled for EditDraft {
2885 const LENGTH: usize = 12;
2886 fn fields(&self) -> Vec<String> {
2887 vec![
2888 self.author_id.clone(),
2889 if let Some(to) = &self.to {
2890 format!("{:?}", to)
2891 } else {
2892 String::new()
2893 },
2894 if let Some(cc) = &self.cc {
2895 format!("{:?}", cc)
2896 } else {
2897 String::new()
2898 },
2899 if let Some(bcc) = &self.bcc {
2900 format!("{:?}", bcc)
2901 } else {
2902 String::new()
2903 },
2904 if let Some(subject) = &self.subject {
2905 format!("{:?}", subject)
2906 } else {
2907 String::new()
2908 },
2909 self.body.clone(),
2910 if let Some(attachments) = &self.attachments {
2911 format!("{:?}", attachments)
2912 } else {
2913 String::new()
2914 },
2915 if let Some(mode) = &self.mode {
2916 format!("{:?}", mode)
2917 } else {
2918 String::new()
2919 },
2920 if let Some(signature_id) = &self.signature_id {
2921 format!("{:?}", signature_id)
2922 } else {
2923 String::new()
2924 },
2925 if let Some(should_add_default_signature) = &self.should_add_default_signature {
2926 format!("{:?}", should_add_default_signature)
2927 } else {
2928 String::new()
2929 },
2930 if let Some(channel_id) = &self.channel_id {
2931 format!("{:?}", channel_id)
2932 } else {
2933 String::new()
2934 },
2935 if let Some(version) = &self.version {
2936 format!("{:?}", version)
2937 } else {
2938 String::new()
2939 },
2940 ]
2941 }
2942
2943 fn headers() -> Vec<String> {
2944 vec![
2945 "author_id".to_string(),
2946 "to".to_string(),
2947 "cc".to_string(),
2948 "bcc".to_string(),
2949 "subject".to_string(),
2950 "body".to_string(),
2951 "attachments".to_string(),
2952 "mode".to_string(),
2953 "signature_id".to_string(),
2954 "should_add_default_signature".to_string(),
2955 "channel_id".to_string(),
2956 "version".to_string(),
2957 ]
2958 }
2959}
2960
2961#[derive(
2962 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2963)]
2964pub struct DeleteDraft {
2965 #[doc = "Version of the draft"]
2966 pub version: String,
2967}
2968
2969impl std::fmt::Display for DeleteDraft {
2970 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2971 write!(
2972 f,
2973 "{}",
2974 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2975 )
2976 }
2977}
2978
2979impl tabled::Tabled for DeleteDraft {
2980 const LENGTH: usize = 1;
2981 fn fields(&self) -> Vec<String> {
2982 vec![self.version.clone()]
2983 }
2984
2985 fn headers() -> Vec<String> {
2986 vec!["version".to_string()]
2987 }
2988}
2989
2990#[derive(
2991 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
2992)]
2993pub struct CreateInbox {
2994 pub name: String,
2995 #[serde(default, skip_serializing_if = "Option::is_none")]
2996 pub teammate_ids: Option<Vec<String>>,
2997}
2998
2999impl std::fmt::Display for CreateInbox {
3000 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3001 write!(
3002 f,
3003 "{}",
3004 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3005 )
3006 }
3007}
3008
3009impl tabled::Tabled for CreateInbox {
3010 const LENGTH: usize = 2;
3011 fn fields(&self) -> Vec<String> {
3012 vec![
3013 self.name.clone(),
3014 if let Some(teammate_ids) = &self.teammate_ids {
3015 format!("{:?}", teammate_ids)
3016 } else {
3017 String::new()
3018 },
3019 ]
3020 }
3021
3022 fn headers() -> Vec<String> {
3023 vec!["name".to_string(), "teammate_ids".to_string()]
3024 }
3025}
3026
3027#[derive(
3028 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
3029)]
3030pub struct Options {
3031 #[serde(default, skip_serializing_if = "Option::is_none")]
3032 pub tag_ids: Option<Vec<String>>,
3033 #[doc = "Archive the conversation right when sending the message"]
3034 #[serde(default, skip_serializing_if = "Option::is_none")]
3035 pub archive: Option<bool>,
3036}
3037
3038impl std::fmt::Display for Options {
3039 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3040 write!(
3041 f,
3042 "{}",
3043 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3044 )
3045 }
3046}
3047
3048impl tabled::Tabled for Options {
3049 const LENGTH: usize = 2;
3050 fn fields(&self) -> Vec<String> {
3051 vec![
3052 if let Some(tag_ids) = &self.tag_ids {
3053 format!("{:?}", tag_ids)
3054 } else {
3055 String::new()
3056 },
3057 if let Some(archive) = &self.archive {
3058 format!("{:?}", archive)
3059 } else {
3060 String::new()
3061 },
3062 ]
3063 }
3064
3065 fn headers() -> Vec<String> {
3066 vec!["tag_ids".to_string(), "archive".to_string()]
3067 }
3068}
3069
3070#[derive(
3071 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
3072)]
3073pub struct OutboundMessage {
3074 pub to: Vec<String>,
3075 #[serde(default, skip_serializing_if = "Option::is_none")]
3076 pub cc: Option<Vec<String>>,
3077 #[serde(default, skip_serializing_if = "Option::is_none")]
3078 pub bcc: Option<Vec<String>>,
3079 #[doc = "Name used for the sender info of the message"]
3080 #[serde(default, skip_serializing_if = "Option::is_none")]
3081 pub sender_name: Option<String>,
3082 #[doc = "Subject of the message for email message"]
3083 #[serde(default, skip_serializing_if = "Option::is_none")]
3084 pub subject: Option<String>,
3085 #[doc = "ID of the teammate on behalf of whom the answer is sent"]
3086 #[serde(default, skip_serializing_if = "Option::is_none")]
3087 pub author_id: Option<String>,
3088 #[doc = "Body of the message"]
3089 pub body: String,
3090 #[doc = "Text version of the body for email messages"]
3091 #[serde(default, skip_serializing_if = "Option::is_none")]
3092 pub text: Option<String>,
3093 #[serde(default, skip_serializing_if = "Option::is_none")]
3094 pub options: Option<Options>,
3095 #[doc = "Binary data of attached files. Must use `Content-Type: multipart/form-data` if specified. See [example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb)."]
3096 #[serde(default, skip_serializing_if = "Option::is_none")]
3097 pub attachments: Option<Vec<bytes::Bytes>>,
3098 #[doc = "ID of the signature to attach to this draft. If null, no signature is attached."]
3099 #[serde(default, skip_serializing_if = "Option::is_none")]
3100 pub signature_id: Option<String>,
3101 #[doc = "Whether or not Front should try to resolve a signature for the message. Is ignored \
3102 if signature_id is included. Default false;"]
3103 #[serde(default, skip_serializing_if = "Option::is_none")]
3104 pub should_add_default_signature: Option<bool>,
3105}
3106
3107impl std::fmt::Display for OutboundMessage {
3108 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3109 write!(
3110 f,
3111 "{}",
3112 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3113 )
3114 }
3115}
3116
3117impl tabled::Tabled for OutboundMessage {
3118 const LENGTH: usize = 12;
3119 fn fields(&self) -> Vec<String> {
3120 vec![
3121 format!("{:?}", self.to),
3122 if let Some(cc) = &self.cc {
3123 format!("{:?}", cc)
3124 } else {
3125 String::new()
3126 },
3127 if let Some(bcc) = &self.bcc {
3128 format!("{:?}", bcc)
3129 } else {
3130 String::new()
3131 },
3132 if let Some(sender_name) = &self.sender_name {
3133 format!("{:?}", sender_name)
3134 } else {
3135 String::new()
3136 },
3137 if let Some(subject) = &self.subject {
3138 format!("{:?}", subject)
3139 } else {
3140 String::new()
3141 },
3142 if let Some(author_id) = &self.author_id {
3143 format!("{:?}", author_id)
3144 } else {
3145 String::new()
3146 },
3147 self.body.clone(),
3148 if let Some(text) = &self.text {
3149 format!("{:?}", text)
3150 } else {
3151 String::new()
3152 },
3153 if let Some(options) = &self.options {
3154 format!("{:?}", options)
3155 } else {
3156 String::new()
3157 },
3158 if let Some(attachments) = &self.attachments {
3159 format!("{:?}", attachments)
3160 } else {
3161 String::new()
3162 },
3163 if let Some(signature_id) = &self.signature_id {
3164 format!("{:?}", signature_id)
3165 } else {
3166 String::new()
3167 },
3168 if let Some(should_add_default_signature) = &self.should_add_default_signature {
3169 format!("{:?}", should_add_default_signature)
3170 } else {
3171 String::new()
3172 },
3173 ]
3174 }
3175
3176 fn headers() -> Vec<String> {
3177 vec![
3178 "to".to_string(),
3179 "cc".to_string(),
3180 "bcc".to_string(),
3181 "sender_name".to_string(),
3182 "subject".to_string(),
3183 "author_id".to_string(),
3184 "body".to_string(),
3185 "text".to_string(),
3186 "options".to_string(),
3187 "attachments".to_string(),
3188 "signature_id".to_string(),
3189 "should_add_default_signature".to_string(),
3190 ]
3191 }
3192}
3193
3194#[derive(
3195 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
3196)]
3197pub struct OutboundReplyMessageOptions {
3198 #[serde(default, skip_serializing_if = "Option::is_none")]
3199 pub tag_ids: Option<Vec<String>>,
3200 #[doc = "Archive the conversation right when sending the message. `true` by default"]
3201 #[serde(default, skip_serializing_if = "Option::is_none")]
3202 pub archive: Option<bool>,
3203}
3204
3205impl std::fmt::Display for OutboundReplyMessageOptions {
3206 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3207 write!(
3208 f,
3209 "{}",
3210 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3211 )
3212 }
3213}
3214
3215impl tabled::Tabled for OutboundReplyMessageOptions {
3216 const LENGTH: usize = 2;
3217 fn fields(&self) -> Vec<String> {
3218 vec![
3219 if let Some(tag_ids) = &self.tag_ids {
3220 format!("{:?}", tag_ids)
3221 } else {
3222 String::new()
3223 },
3224 if let Some(archive) = &self.archive {
3225 format!("{:?}", archive)
3226 } else {
3227 String::new()
3228 },
3229 ]
3230 }
3231
3232 fn headers() -> Vec<String> {
3233 vec!["tag_ids".to_string(), "archive".to_string()]
3234 }
3235}
3236
3237#[derive(
3238 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
3239)]
3240pub struct OutboundReplyMessage {
3241 #[serde(default, skip_serializing_if = "Option::is_none")]
3242 pub to: Option<Vec<String>>,
3243 #[serde(default, skip_serializing_if = "Option::is_none")]
3244 pub cc: Option<Vec<String>>,
3245 #[serde(default, skip_serializing_if = "Option::is_none")]
3246 pub bcc: Option<Vec<String>>,
3247 #[doc = "Name used for the sender info of the message"]
3248 #[serde(default, skip_serializing_if = "Option::is_none")]
3249 pub sender_name: Option<String>,
3250 #[doc = "Subject of the message for email message"]
3251 #[serde(default, skip_serializing_if = "Option::is_none")]
3252 pub subject: Option<String>,
3253 #[doc = "ID of the teammate on behalf of whom the answer is sent"]
3254 #[serde(default, skip_serializing_if = "Option::is_none")]
3255 pub author_id: Option<String>,
3256 #[doc = "Channel ID the message is sent from"]
3257 #[serde(default, skip_serializing_if = "Option::is_none")]
3258 pub channel_id: Option<String>,
3259 #[doc = "Body of the message"]
3260 pub body: String,
3261 #[doc = "Text version of the body for email messages"]
3262 #[serde(default, skip_serializing_if = "Option::is_none")]
3263 pub text: Option<String>,
3264 #[serde(default, skip_serializing_if = "Option::is_none")]
3265 pub options: Option<OutboundReplyMessageOptions>,
3266 #[doc = "Binary data of attached files. Must use `Content-Type: multipart/form-data` if specified. See [example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb)."]
3267 #[serde(default, skip_serializing_if = "Option::is_none")]
3268 pub attachments: Option<Vec<bytes::Bytes>>,
3269 #[doc = "ID of the signature to attach to this draft. If null, no signature is attached."]
3270 #[serde(default, skip_serializing_if = "Option::is_none")]
3271 pub signature_id: Option<String>,
3272 #[doc = "Whether or not Front should try to resolve a signature for the message. Is ignored \
3273 if signature_id is included. Default false;"]
3274 #[serde(default, skip_serializing_if = "Option::is_none")]
3275 pub should_add_default_signature: Option<bool>,
3276}
3277
3278impl std::fmt::Display for OutboundReplyMessage {
3279 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3280 write!(
3281 f,
3282 "{}",
3283 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3284 )
3285 }
3286}
3287
3288impl tabled::Tabled for OutboundReplyMessage {
3289 const LENGTH: usize = 13;
3290 fn fields(&self) -> Vec<String> {
3291 vec![
3292 if let Some(to) = &self.to {
3293 format!("{:?}", to)
3294 } else {
3295 String::new()
3296 },
3297 if let Some(cc) = &self.cc {
3298 format!("{:?}", cc)
3299 } else {
3300 String::new()
3301 },
3302 if let Some(bcc) = &self.bcc {
3303 format!("{:?}", bcc)
3304 } else {
3305 String::new()
3306 },
3307 if let Some(sender_name) = &self.sender_name {
3308 format!("{:?}", sender_name)
3309 } else {
3310 String::new()
3311 },
3312 if let Some(subject) = &self.subject {
3313 format!("{:?}", subject)
3314 } else {
3315 String::new()
3316 },
3317 if let Some(author_id) = &self.author_id {
3318 format!("{:?}", author_id)
3319 } else {
3320 String::new()
3321 },
3322 if let Some(channel_id) = &self.channel_id {
3323 format!("{:?}", channel_id)
3324 } else {
3325 String::new()
3326 },
3327 self.body.clone(),
3328 if let Some(text) = &self.text {
3329 format!("{:?}", text)
3330 } else {
3331 String::new()
3332 },
3333 if let Some(options) = &self.options {
3334 format!("{:?}", options)
3335 } else {
3336 String::new()
3337 },
3338 if let Some(attachments) = &self.attachments {
3339 format!("{:?}", attachments)
3340 } else {
3341 String::new()
3342 },
3343 if let Some(signature_id) = &self.signature_id {
3344 format!("{:?}", signature_id)
3345 } else {
3346 String::new()
3347 },
3348 if let Some(should_add_default_signature) = &self.should_add_default_signature {
3349 format!("{:?}", should_add_default_signature)
3350 } else {
3351 String::new()
3352 },
3353 ]
3354 }
3355
3356 fn headers() -> Vec<String> {
3357 vec![
3358 "to".to_string(),
3359 "cc".to_string(),
3360 "bcc".to_string(),
3361 "sender_name".to_string(),
3362 "subject".to_string(),
3363 "author_id".to_string(),
3364 "channel_id".to_string(),
3365 "body".to_string(),
3366 "text".to_string(),
3367 "options".to_string(),
3368 "attachments".to_string(),
3369 "signature_id".to_string(),
3370 "should_add_default_signature".to_string(),
3371 ]
3372 }
3373}
3374
3375#[doc = "Data of the sender"]
3376#[derive(
3377 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
3378)]
3379pub struct Sender {
3380 #[doc = "ID of the contact in Front corresponding to the sender"]
3381 #[serde(default, skip_serializing_if = "Option::is_none")]
3382 pub contact_id: Option<String>,
3383 #[doc = "Name of the sender"]
3384 #[serde(default, skip_serializing_if = "Option::is_none")]
3385 pub name: Option<String>,
3386 #[doc = "Handle of the sender. It can be any string used to uniquely identify the sender"]
3387 pub handle: String,
3388}
3389
3390impl std::fmt::Display for Sender {
3391 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3392 write!(
3393 f,
3394 "{}",
3395 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3396 )
3397 }
3398}
3399
3400impl tabled::Tabled for Sender {
3401 const LENGTH: usize = 3;
3402 fn fields(&self) -> Vec<String> {
3403 vec![
3404 if let Some(contact_id) = &self.contact_id {
3405 format!("{:?}", contact_id)
3406 } else {
3407 String::new()
3408 },
3409 if let Some(name) = &self.name {
3410 format!("{:?}", name)
3411 } else {
3412 String::new()
3413 },
3414 self.handle.clone(),
3415 ]
3416 }
3417
3418 fn headers() -> Vec<String> {
3419 vec![
3420 "contact_id".to_string(),
3421 "name".to_string(),
3422 "handle".to_string(),
3423 ]
3424 }
3425}
3426
3427#[doc = "Format of the message body. Can be `markdown` (default) or `html`."]
3428#[derive(
3429 serde :: Serialize,
3430 serde :: Deserialize,
3431 PartialEq,
3432 Eq,
3433 Hash,
3434 Debug,
3435 Clone,
3436 schemars :: JsonSchema,
3437 tabled :: Tabled,
3438 clap :: ValueEnum,
3439 parse_display :: FromStr,
3440 parse_display :: Display,
3441)]
3442pub enum BodyFormat {
3443 #[serde(rename = "html")]
3444 #[display("html")]
3445 Html,
3446 #[serde(rename = "markdown")]
3447 #[display("markdown")]
3448 Markdown,
3449}
3450
3451impl std::default::Default for BodyFormat {
3452 fn default() -> Self {
3453 BodyFormat::Markdown
3454 }
3455}
3456
3457#[derive(
3458 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
3459)]
3460pub struct Metadata {
3461 #[doc = "Reference which will be used to thread messages. If omitted, Front threads by \
3462 sender instead"]
3463 #[serde(default, skip_serializing_if = "Option::is_none")]
3464 pub thread_ref: Option<String>,
3465 #[doc = "Custom object where any internal information can be stored"]
3466 #[serde(default, skip_serializing_if = "Option::is_none")]
3467 pub headers: Option<std::collections::HashMap<String, String>>,
3468}
3469
3470impl std::fmt::Display for Metadata {
3471 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3472 write!(
3473 f,
3474 "{}",
3475 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3476 )
3477 }
3478}
3479
3480impl tabled::Tabled for Metadata {
3481 const LENGTH: usize = 2;
3482 fn fields(&self) -> Vec<String> {
3483 vec![
3484 if let Some(thread_ref) = &self.thread_ref {
3485 format!("{:?}", thread_ref)
3486 } else {
3487 String::new()
3488 },
3489 if let Some(headers) = &self.headers {
3490 format!("{:?}", headers)
3491 } else {
3492 String::new()
3493 },
3494 ]
3495 }
3496
3497 fn headers() -> Vec<String> {
3498 vec!["thread_ref".to_string(), "headers".to_string()]
3499 }
3500}
3501
3502#[derive(
3503 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
3504)]
3505pub struct CustomMessage {
3506 #[doc = "Data of the sender"]
3507 pub sender: Sender,
3508 #[doc = "Subject of the message"]
3509 #[serde(default, skip_serializing_if = "Option::is_none")]
3510 pub subject: Option<String>,
3511 #[doc = "Body of the message"]
3512 pub body: String,
3513 #[doc = "Format of the message body. Can be `markdown` (default) or `html`."]
3514 #[serde(default, skip_serializing_if = "Option::is_none")]
3515 pub body_format: Option<BodyFormat>,
3516 #[serde(default, skip_serializing_if = "Option::is_none")]
3517 pub metadata: Option<Metadata>,
3518 #[doc = "Binary data of attached files. Must use `Content-Type: multipart/form-data` if specified. See [example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb)."]
3519 #[serde(default, skip_serializing_if = "Option::is_none")]
3520 pub attachments: Option<Vec<bytes::Bytes>>,
3521}
3522
3523impl std::fmt::Display for CustomMessage {
3524 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3525 write!(
3526 f,
3527 "{}",
3528 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3529 )
3530 }
3531}
3532
3533impl tabled::Tabled for CustomMessage {
3534 const LENGTH: usize = 6;
3535 fn fields(&self) -> Vec<String> {
3536 vec![
3537 format!("{:?}", self.sender),
3538 if let Some(subject) = &self.subject {
3539 format!("{:?}", subject)
3540 } else {
3541 String::new()
3542 },
3543 self.body.clone(),
3544 if let Some(body_format) = &self.body_format {
3545 format!("{:?}", body_format)
3546 } else {
3547 String::new()
3548 },
3549 if let Some(metadata) = &self.metadata {
3550 format!("{:?}", metadata)
3551 } else {
3552 String::new()
3553 },
3554 if let Some(attachments) = &self.attachments {
3555 format!("{:?}", attachments)
3556 } else {
3557 String::new()
3558 },
3559 ]
3560 }
3561
3562 fn headers() -> Vec<String> {
3563 vec![
3564 "sender".to_string(),
3565 "subject".to_string(),
3566 "body".to_string(),
3567 "body_format".to_string(),
3568 "metadata".to_string(),
3569 "attachments".to_string(),
3570 ]
3571 }
3572}
3573
3574#[doc = "Data of the sender"]
3575#[derive(
3576 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
3577)]
3578pub struct ImportMessageSender {
3579 #[doc = "ID of the teammate who is the author of the message. Ignored if the message is \
3580 inbound."]
3581 #[serde(default, skip_serializing_if = "Option::is_none")]
3582 pub author_id: Option<String>,
3583 #[doc = "Name of the sender"]
3584 #[serde(default, skip_serializing_if = "Option::is_none")]
3585 pub name: Option<String>,
3586 #[doc = "Handle of the sender. It can be any string used to uniquely identify the sender"]
3587 pub handle: String,
3588}
3589
3590impl std::fmt::Display for ImportMessageSender {
3591 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3592 write!(
3593 f,
3594 "{}",
3595 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3596 )
3597 }
3598}
3599
3600impl tabled::Tabled for ImportMessageSender {
3601 const LENGTH: usize = 3;
3602 fn fields(&self) -> Vec<String> {
3603 vec![
3604 if let Some(author_id) = &self.author_id {
3605 format!("{:?}", author_id)
3606 } else {
3607 String::new()
3608 },
3609 if let Some(name) = &self.name {
3610 format!("{:?}", name)
3611 } else {
3612 String::new()
3613 },
3614 self.handle.clone(),
3615 ]
3616 }
3617
3618 fn headers() -> Vec<String> {
3619 vec![
3620 "author_id".to_string(),
3621 "name".to_string(),
3622 "handle".to_string(),
3623 ]
3624 }
3625}
3626
3627#[doc = "Format of the message body. Can be `markdown` (default) or `html`, and can only be \
3628 specified for `email` type."]
3629#[derive(
3630 serde :: Serialize,
3631 serde :: Deserialize,
3632 PartialEq,
3633 Eq,
3634 Hash,
3635 Debug,
3636 Clone,
3637 schemars :: JsonSchema,
3638 tabled :: Tabled,
3639 clap :: ValueEnum,
3640 parse_display :: FromStr,
3641 parse_display :: Display,
3642)]
3643pub enum ImportMessageBodyFormat {
3644 #[serde(rename = "html")]
3645 #[display("html")]
3646 Html,
3647 #[serde(rename = "markdown")]
3648 #[display("markdown")]
3649 Markdown,
3650}
3651
3652impl std::default::Default for ImportMessageBodyFormat {
3653 fn default() -> Self {
3654 ImportMessageBodyFormat::Markdown
3655 }
3656}
3657
3658#[doc = "Type of the message to import. Default is `email`."]
3659#[derive(
3660 serde :: Serialize,
3661 serde :: Deserialize,
3662 PartialEq,
3663 Eq,
3664 Hash,
3665 Debug,
3666 Clone,
3667 schemars :: JsonSchema,
3668 tabled :: Tabled,
3669 clap :: ValueEnum,
3670 parse_display :: FromStr,
3671 parse_display :: Display,
3672)]
3673pub enum ImportMessageType {
3674 #[serde(rename = "email")]
3675 #[display("email")]
3676 Email,
3677 #[serde(rename = "sms")]
3678 #[display("sms")]
3679 Sms,
3680 #[serde(rename = "intercom")]
3681 #[display("intercom")]
3682 Intercom,
3683 #[serde(rename = "custom")]
3684 #[display("custom")]
3685 Custom,
3686}
3687
3688impl std::default::Default for ImportMessageType {
3689 fn default() -> Self {
3690 ImportMessageType::Email
3691 }
3692}
3693
3694#[derive(
3695 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
3696)]
3697pub struct ImportMessageMetadata {
3698 #[doc = "Reference which will be used to thread messages. If omitted, Front threads by \
3699 sender instead"]
3700 #[serde(default, skip_serializing_if = "Option::is_none")]
3701 pub thread_ref: Option<String>,
3702 #[doc = "Determines if message is received (inbound) or sent (outbound) by you."]
3703 pub is_inbound: bool,
3704 #[doc = "Determines if message is archived after import."]
3705 #[serde(default, skip_serializing_if = "Option::is_none")]
3706 pub is_archived: Option<bool>,
3707 #[doc = "Determines if rules should be skipped. `true` by default."]
3708 #[serde(default, skip_serializing_if = "Option::is_none")]
3709 pub should_skip_rules: Option<bool>,
3710}
3711
3712impl std::fmt::Display for ImportMessageMetadata {
3713 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3714 write!(
3715 f,
3716 "{}",
3717 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3718 )
3719 }
3720}
3721
3722impl tabled::Tabled for ImportMessageMetadata {
3723 const LENGTH: usize = 4;
3724 fn fields(&self) -> Vec<String> {
3725 vec![
3726 if let Some(thread_ref) = &self.thread_ref {
3727 format!("{:?}", thread_ref)
3728 } else {
3729 String::new()
3730 },
3731 format!("{:?}", self.is_inbound),
3732 if let Some(is_archived) = &self.is_archived {
3733 format!("{:?}", is_archived)
3734 } else {
3735 String::new()
3736 },
3737 if let Some(should_skip_rules) = &self.should_skip_rules {
3738 format!("{:?}", should_skip_rules)
3739 } else {
3740 String::new()
3741 },
3742 ]
3743 }
3744
3745 fn headers() -> Vec<String> {
3746 vec![
3747 "thread_ref".to_string(),
3748 "is_inbound".to_string(),
3749 "is_archived".to_string(),
3750 "should_skip_rules".to_string(),
3751 ]
3752 }
3753}
3754
3755#[derive(
3756 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
3757)]
3758pub struct ImportMessage {
3759 #[doc = "Data of the sender"]
3760 pub sender: ImportMessageSender,
3761 pub to: Vec<String>,
3762 #[serde(default, skip_serializing_if = "Option::is_none")]
3763 pub cc: Option<Vec<String>>,
3764 #[serde(default, skip_serializing_if = "Option::is_none")]
3765 pub bcc: Option<Vec<String>>,
3766 #[doc = "Subject of the message"]
3767 #[serde(default, skip_serializing_if = "Option::is_none")]
3768 pub subject: Option<String>,
3769 #[doc = "Body of the message"]
3770 pub body: String,
3771 #[doc = "Format of the message body. Can be `markdown` (default) or `html`, and can only be \
3772 specified for `email` type."]
3773 #[serde(default, skip_serializing_if = "Option::is_none")]
3774 pub body_format: Option<ImportMessageBodyFormat>,
3775 #[doc = "External identifier of the message. Front won't import two messages with the same \
3776 external ID."]
3777 pub external_id: String,
3778 #[doc = "Date at which the message as been sent or received."]
3779 pub created_at: i64,
3780 #[doc = "Type of the message to import. Default is `email`."]
3781 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
3782 pub type_: Option<ImportMessageType>,
3783 #[doc = "ID of the teammate who will be assigned to the conversation."]
3784 #[serde(default, skip_serializing_if = "Option::is_none")]
3785 pub assignee_id: Option<String>,
3786 #[doc = "List of tag names to add to the conversation"]
3787 #[serde(default, skip_serializing_if = "Option::is_none")]
3788 pub tags: Option<Vec<String>>,
3789 pub metadata: ImportMessageMetadata,
3790 #[doc = "Binary data of attached files. Must use `Content-Type: multipart/form-data` if specified. See [example](https://gist.github.com/hdornier/e04d04921032e98271f46ff8a539a4cb)."]
3791 #[serde(default, skip_serializing_if = "Option::is_none")]
3792 pub attachments: Option<Vec<bytes::Bytes>>,
3793}
3794
3795impl std::fmt::Display for ImportMessage {
3796 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3797 write!(
3798 f,
3799 "{}",
3800 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3801 )
3802 }
3803}
3804
3805impl tabled::Tabled for ImportMessage {
3806 const LENGTH: usize = 14;
3807 fn fields(&self) -> Vec<String> {
3808 vec![
3809 format!("{:?}", self.sender),
3810 format!("{:?}", self.to),
3811 if let Some(cc) = &self.cc {
3812 format!("{:?}", cc)
3813 } else {
3814 String::new()
3815 },
3816 if let Some(bcc) = &self.bcc {
3817 format!("{:?}", bcc)
3818 } else {
3819 String::new()
3820 },
3821 if let Some(subject) = &self.subject {
3822 format!("{:?}", subject)
3823 } else {
3824 String::new()
3825 },
3826 self.body.clone(),
3827 if let Some(body_format) = &self.body_format {
3828 format!("{:?}", body_format)
3829 } else {
3830 String::new()
3831 },
3832 self.external_id.clone(),
3833 format!("{:?}", self.created_at),
3834 if let Some(type_) = &self.type_ {
3835 format!("{:?}", type_)
3836 } else {
3837 String::new()
3838 },
3839 if let Some(assignee_id) = &self.assignee_id {
3840 format!("{:?}", assignee_id)
3841 } else {
3842 String::new()
3843 },
3844 if let Some(tags) = &self.tags {
3845 format!("{:?}", tags)
3846 } else {
3847 String::new()
3848 },
3849 format!("{:?}", self.metadata),
3850 if let Some(attachments) = &self.attachments {
3851 format!("{:?}", attachments)
3852 } else {
3853 String::new()
3854 },
3855 ]
3856 }
3857
3858 fn headers() -> Vec<String> {
3859 vec![
3860 "sender".to_string(),
3861 "to".to_string(),
3862 "cc".to_string(),
3863 "bcc".to_string(),
3864 "subject".to_string(),
3865 "body".to_string(),
3866 "body_format".to_string(),
3867 "external_id".to_string(),
3868 "created_at".to_string(),
3869 "type_".to_string(),
3870 "assignee_id".to_string(),
3871 "tags".to_string(),
3872 "metadata".to_string(),
3873 "attachments".to_string(),
3874 ]
3875 }
3876}
3877
3878#[doc = "Color of the shift"]
3879#[derive(
3880 serde :: Serialize,
3881 serde :: Deserialize,
3882 PartialEq,
3883 Eq,
3884 Hash,
3885 Debug,
3886 Clone,
3887 schemars :: JsonSchema,
3888 tabled :: Tabled,
3889 clap :: ValueEnum,
3890 parse_display :: FromStr,
3891 parse_display :: Display,
3892)]
3893pub enum Color {
3894 #[serde(rename = "black")]
3895 #[display("black")]
3896 Black,
3897 #[serde(rename = "grey")]
3898 #[display("grey")]
3899 Grey,
3900 #[serde(rename = "pink")]
3901 #[display("pink")]
3902 Pink,
3903 #[serde(rename = "purple")]
3904 #[display("purple")]
3905 Purple,
3906 #[serde(rename = "blue")]
3907 #[display("blue")]
3908 Blue,
3909 #[serde(rename = "teal")]
3910 #[display("teal")]
3911 Teal,
3912 #[serde(rename = "green")]
3913 #[display("green")]
3914 Green,
3915 #[serde(rename = "yellow")]
3916 #[display("yellow")]
3917 Yellow,
3918 #[serde(rename = "orange")]
3919 #[display("orange")]
3920 Orange,
3921 #[serde(rename = "red")]
3922 #[display("red")]
3923 Red,
3924}
3925
3926#[derive(
3927 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3928)]
3929pub struct CreateShift {
3930 #[doc = "Name of the shift"]
3931 pub name: String,
3932 #[doc = "Color of the shift"]
3933 pub color: Color,
3934 #[doc = "A timezone name as defined in the IANA tz database"]
3935 pub timezone: String,
3936 pub times: ShiftIntervals,
3937 pub teammate_ids: Vec<String>,
3938}
3939
3940impl std::fmt::Display for CreateShift {
3941 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3942 write!(
3943 f,
3944 "{}",
3945 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3946 )
3947 }
3948}
3949
3950impl tabled::Tabled for CreateShift {
3951 const LENGTH: usize = 5;
3952 fn fields(&self) -> Vec<String> {
3953 vec![
3954 self.name.clone(),
3955 format!("{:?}", self.color),
3956 self.timezone.clone(),
3957 format!("{:?}", self.times),
3958 format!("{:?}", self.teammate_ids),
3959 ]
3960 }
3961
3962 fn headers() -> Vec<String> {
3963 vec![
3964 "name".to_string(),
3965 "color".to_string(),
3966 "timezone".to_string(),
3967 "times".to_string(),
3968 "teammate_ids".to_string(),
3969 ]
3970 }
3971}
3972
3973#[derive(
3974 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3975)]
3976pub struct UpdateShift {
3977 #[doc = "Name of the shift"]
3978 #[serde(default, skip_serializing_if = "Option::is_none")]
3979 pub name: Option<String>,
3980 #[doc = "Color of the shift"]
3981 #[serde(default, skip_serializing_if = "Option::is_none")]
3982 pub color: Option<Color>,
3983 #[doc = "A timezone name as defined in the IANA tz database"]
3984 #[serde(default, skip_serializing_if = "Option::is_none")]
3985 pub timezone: Option<String>,
3986 #[serde(default, skip_serializing_if = "Option::is_none")]
3987 pub times: Option<ShiftIntervals>,
3988 #[doc = "List of all the teammate ids who will be part of this shift."]
3989 #[serde(default, skip_serializing_if = "Option::is_none")]
3990 pub teammate_ids: Option<Vec<String>>,
3991}
3992
3993impl std::fmt::Display for UpdateShift {
3994 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3995 write!(
3996 f,
3997 "{}",
3998 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3999 )
4000 }
4001}
4002
4003impl tabled::Tabled for UpdateShift {
4004 const LENGTH: usize = 5;
4005 fn fields(&self) -> Vec<String> {
4006 vec![
4007 if let Some(name) = &self.name {
4008 format!("{:?}", name)
4009 } else {
4010 String::new()
4011 },
4012 if let Some(color) = &self.color {
4013 format!("{:?}", color)
4014 } else {
4015 String::new()
4016 },
4017 if let Some(timezone) = &self.timezone {
4018 format!("{:?}", timezone)
4019 } else {
4020 String::new()
4021 },
4022 if let Some(times) = &self.times {
4023 format!("{:?}", times)
4024 } else {
4025 String::new()
4026 },
4027 if let Some(teammate_ids) = &self.teammate_ids {
4028 format!("{:?}", teammate_ids)
4029 } else {
4030 String::new()
4031 },
4032 ]
4033 }
4034
4035 fn headers() -> Vec<String> {
4036 vec![
4037 "name".to_string(),
4038 "color".to_string(),
4039 "timezone".to_string(),
4040 "times".to_string(),
4041 "teammate_ids".to_string(),
4042 ]
4043 }
4044}
4045
4046#[doc = "A signature that can be used to sign messages."]
4047#[derive(
4048 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
4049)]
4050pub struct CreatePrivateSignature {
4051 #[doc = "Name of the signature"]
4052 pub name: String,
4053 #[doc = "Sender info of the signature that will appear in the From line of emails sent."]
4054 #[serde(default, skip_serializing_if = "Option::is_none")]
4055 pub sender_info: Option<String>,
4056 #[doc = "Body of the signature"]
4057 pub body: String,
4058 #[doc = "If true, the signature will be set as the default signature for the teammate."]
4059 #[serde(default, skip_serializing_if = "Option::is_none")]
4060 pub is_default: Option<bool>,
4061 #[serde(default, skip_serializing_if = "Option::is_none")]
4062 pub channel_ids: Option<Vec<String>>,
4063}
4064
4065impl std::fmt::Display for CreatePrivateSignature {
4066 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4067 write!(
4068 f,
4069 "{}",
4070 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4071 )
4072 }
4073}
4074
4075impl tabled::Tabled for CreatePrivateSignature {
4076 const LENGTH: usize = 5;
4077 fn fields(&self) -> Vec<String> {
4078 vec![
4079 self.name.clone(),
4080 if let Some(sender_info) = &self.sender_info {
4081 format!("{:?}", sender_info)
4082 } else {
4083 String::new()
4084 },
4085 self.body.clone(),
4086 if let Some(is_default) = &self.is_default {
4087 format!("{:?}", is_default)
4088 } else {
4089 String::new()
4090 },
4091 if let Some(channel_ids) = &self.channel_ids {
4092 format!("{:?}", channel_ids)
4093 } else {
4094 String::new()
4095 },
4096 ]
4097 }
4098
4099 fn headers() -> Vec<String> {
4100 vec![
4101 "name".to_string(),
4102 "sender_info".to_string(),
4103 "body".to_string(),
4104 "is_default".to_string(),
4105 "channel_ids".to_string(),
4106 ]
4107 }
4108}
4109
4110#[doc = "A signature that can be used to sign messages."]
4111#[derive(
4112 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
4113)]
4114pub struct CreateSharedSignature {
4115 #[doc = "Name of the signature"]
4116 pub name: String,
4117 #[doc = "Sender info of the signature that will appear in the From line of emails sent."]
4118 #[serde(default, skip_serializing_if = "Option::is_none")]
4119 pub sender_info: Option<String>,
4120 #[doc = "Body of the signature"]
4121 pub body: String,
4122 #[doc = "Whether or not the signature is visible in all individual channels for teammates in \
4123 the given team."]
4124 #[serde(default, skip_serializing_if = "Option::is_none")]
4125 pub is_visible_for_all_teammate_channels: Option<bool>,
4126 #[doc = "If true, the signature will be set as the default signature for the team."]
4127 #[serde(default, skip_serializing_if = "Option::is_none")]
4128 pub is_default: Option<bool>,
4129 #[serde(default, skip_serializing_if = "Option::is_none")]
4130 pub channel_ids: Option<Vec<String>>,
4131}
4132
4133impl std::fmt::Display for CreateSharedSignature {
4134 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4135 write!(
4136 f,
4137 "{}",
4138 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4139 )
4140 }
4141}
4142
4143impl tabled::Tabled for CreateSharedSignature {
4144 const LENGTH: usize = 6;
4145 fn fields(&self) -> Vec<String> {
4146 vec![
4147 self.name.clone(),
4148 if let Some(sender_info) = &self.sender_info {
4149 format!("{:?}", sender_info)
4150 } else {
4151 String::new()
4152 },
4153 self.body.clone(),
4154 if let Some(is_visible_for_all_teammate_channels) =
4155 &self.is_visible_for_all_teammate_channels
4156 {
4157 format!("{:?}", is_visible_for_all_teammate_channels)
4158 } else {
4159 String::new()
4160 },
4161 if let Some(is_default) = &self.is_default {
4162 format!("{:?}", is_default)
4163 } else {
4164 String::new()
4165 },
4166 if let Some(channel_ids) = &self.channel_ids {
4167 format!("{:?}", channel_ids)
4168 } else {
4169 String::new()
4170 },
4171 ]
4172 }
4173
4174 fn headers() -> Vec<String> {
4175 vec![
4176 "name".to_string(),
4177 "sender_info".to_string(),
4178 "body".to_string(),
4179 "is_visible_for_all_teammate_channels".to_string(),
4180 "is_default".to_string(),
4181 "channel_ids".to_string(),
4182 ]
4183 }
4184}
4185
4186#[doc = "A signature that can be used to sign messages."]
4187#[derive(
4188 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
4189)]
4190pub struct UpdateSignature {
4191 #[doc = "Name of the signature"]
4192 #[serde(default, skip_serializing_if = "Option::is_none")]
4193 pub name: Option<String>,
4194 #[doc = "Sender info of the signature that will appear in the From line of emails sent."]
4195 #[serde(default, skip_serializing_if = "Option::is_none")]
4196 pub sender_info: Option<String>,
4197 #[doc = "Body of the signature"]
4198 #[serde(default, skip_serializing_if = "Option::is_none")]
4199 pub body: Option<String>,
4200 #[doc = "Whether or not the signature is visible in all individual channels for teammates in \
4201 the given team. Can only be set for shared signatures."]
4202 #[serde(default, skip_serializing_if = "Option::is_none")]
4203 pub is_visible_for_all_teammate_channels: Option<bool>,
4204 #[doc = "If true, the signature will be set as the default signature for the team or teammate."]
4205 #[serde(default, skip_serializing_if = "Option::is_none")]
4206 pub is_default: Option<bool>,
4207 #[serde(default, skip_serializing_if = "Option::is_none")]
4208 pub channel_ids: Option<Vec<String>>,
4209}
4210
4211impl std::fmt::Display for UpdateSignature {
4212 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4213 write!(
4214 f,
4215 "{}",
4216 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4217 )
4218 }
4219}
4220
4221impl tabled::Tabled for UpdateSignature {
4222 const LENGTH: usize = 6;
4223 fn fields(&self) -> Vec<String> {
4224 vec![
4225 if let Some(name) = &self.name {
4226 format!("{:?}", name)
4227 } else {
4228 String::new()
4229 },
4230 if let Some(sender_info) = &self.sender_info {
4231 format!("{:?}", sender_info)
4232 } else {
4233 String::new()
4234 },
4235 if let Some(body) = &self.body {
4236 format!("{:?}", body)
4237 } else {
4238 String::new()
4239 },
4240 if let Some(is_visible_for_all_teammate_channels) =
4241 &self.is_visible_for_all_teammate_channels
4242 {
4243 format!("{:?}", is_visible_for_all_teammate_channels)
4244 } else {
4245 String::new()
4246 },
4247 if let Some(is_default) = &self.is_default {
4248 format!("{:?}", is_default)
4249 } else {
4250 String::new()
4251 },
4252 if let Some(channel_ids) = &self.channel_ids {
4253 format!("{:?}", channel_ids)
4254 } else {
4255 String::new()
4256 },
4257 ]
4258 }
4259
4260 fn headers() -> Vec<String> {
4261 vec![
4262 "name".to_string(),
4263 "sender_info".to_string(),
4264 "body".to_string(),
4265 "is_visible_for_all_teammate_channels".to_string(),
4266 "is_default".to_string(),
4267 "channel_ids".to_string(),
4268 ]
4269 }
4270}
4271
4272#[doc = "Highlight color of the tag."]
4273#[derive(
4274 serde :: Serialize,
4275 serde :: Deserialize,
4276 PartialEq,
4277 Eq,
4278 Hash,
4279 Debug,
4280 Clone,
4281 schemars :: JsonSchema,
4282 tabled :: Tabled,
4283 clap :: ValueEnum,
4284 parse_display :: FromStr,
4285 parse_display :: Display,
4286)]
4287pub enum Highlight {
4288 #[serde(rename = "grey")]
4289 #[display("grey")]
4290 Grey,
4291 #[serde(rename = "pink")]
4292 #[display("pink")]
4293 Pink,
4294 #[serde(rename = "red")]
4295 #[display("red")]
4296 Red,
4297 #[serde(rename = "orange")]
4298 #[display("orange")]
4299 Orange,
4300 #[serde(rename = "yellow")]
4301 #[display("yellow")]
4302 Yellow,
4303 #[serde(rename = "green")]
4304 #[display("green")]
4305 Green,
4306 #[serde(rename = "light-blue")]
4307 #[display("light-blue")]
4308 LightBlue,
4309 #[serde(rename = "blue")]
4310 #[display("blue")]
4311 Blue,
4312 #[serde(rename = "purple")]
4313 #[display("purple")]
4314 Purple,
4315}
4316
4317#[doc = "A tag is a label that can be used to classify conversations."]
4318#[derive(
4319 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
4320)]
4321pub struct CreateTag {
4322 #[doc = "Name of the tag"]
4323 pub name: String,
4324 #[doc = "Highlight color of the tag."]
4325 #[serde(default, skip_serializing_if = "Option::is_none")]
4326 pub highlight: Option<Highlight>,
4327 #[doc = "Whether the tag is visible in conversation lists."]
4328 #[serde(default, skip_serializing_if = "Option::is_none")]
4329 pub is_visible_in_conversation_lists: Option<bool>,
4330}
4331
4332impl std::fmt::Display for CreateTag {
4333 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4334 write!(
4335 f,
4336 "{}",
4337 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4338 )
4339 }
4340}
4341
4342impl tabled::Tabled for CreateTag {
4343 const LENGTH: usize = 3;
4344 fn fields(&self) -> Vec<String> {
4345 vec![
4346 self.name.clone(),
4347 if let Some(highlight) = &self.highlight {
4348 format!("{:?}", highlight)
4349 } else {
4350 String::new()
4351 },
4352 if let Some(is_visible_in_conversation_lists) = &self.is_visible_in_conversation_lists {
4353 format!("{:?}", is_visible_in_conversation_lists)
4354 } else {
4355 String::new()
4356 },
4357 ]
4358 }
4359
4360 fn headers() -> Vec<String> {
4361 vec![
4362 "name".to_string(),
4363 "highlight".to_string(),
4364 "is_visible_in_conversation_lists".to_string(),
4365 ]
4366 }
4367}
4368
4369#[derive(
4370 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
4371)]
4372pub struct UpdateTag {
4373 #[doc = "Name of the tag"]
4374 #[serde(default, skip_serializing_if = "Option::is_none")]
4375 pub name: Option<String>,
4376 #[doc = "Highlight color of the tag."]
4377 #[serde(default, skip_serializing_if = "Option::is_none")]
4378 pub highlight: Option<Highlight>,
4379 #[doc = "ID of the parent of this tag. Set to `null` to remove the parent tag."]
4380 #[serde(default, skip_serializing_if = "Option::is_none")]
4381 pub parent_tag_id: Option<String>,
4382 #[doc = "Whether the tag is visible in conversation lists."]
4383 #[serde(default, skip_serializing_if = "Option::is_none")]
4384 pub is_visible_in_conversation_lists: Option<bool>,
4385}
4386
4387impl std::fmt::Display for UpdateTag {
4388 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4389 write!(
4390 f,
4391 "{}",
4392 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4393 )
4394 }
4395}
4396
4397impl tabled::Tabled for UpdateTag {
4398 const LENGTH: usize = 4;
4399 fn fields(&self) -> Vec<String> {
4400 vec![
4401 if let Some(name) = &self.name {
4402 format!("{:?}", name)
4403 } else {
4404 String::new()
4405 },
4406 if let Some(highlight) = &self.highlight {
4407 format!("{:?}", highlight)
4408 } else {
4409 String::new()
4410 },
4411 if let Some(parent_tag_id) = &self.parent_tag_id {
4412 format!("{:?}", parent_tag_id)
4413 } else {
4414 String::new()
4415 },
4416 if let Some(is_visible_in_conversation_lists) = &self.is_visible_in_conversation_lists {
4417 format!("{:?}", is_visible_in_conversation_lists)
4418 } else {
4419 String::new()
4420 },
4421 ]
4422 }
4423
4424 fn headers() -> Vec<String> {
4425 vec![
4426 "name".to_string(),
4427 "highlight".to_string(),
4428 "parent_tag_id".to_string(),
4429 "is_visible_in_conversation_lists".to_string(),
4430 ]
4431 }
4432}
4433
4434#[derive(
4435 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
4436)]
4437pub struct UpdateTeammate {
4438 #[doc = "New username. It must be unique and can only contains lowercase letters, numbers and \
4439 underscores."]
4440 #[serde(default, skip_serializing_if = "Option::is_none")]
4441 pub username: Option<String>,
4442 #[doc = "New first name"]
4443 #[serde(default, skip_serializing_if = "Option::is_none")]
4444 pub first_name: Option<String>,
4445 #[doc = "New last name"]
4446 #[serde(default, skip_serializing_if = "Option::is_none")]
4447 pub last_name: Option<String>,
4448 #[doc = "New availability status"]
4449 #[serde(default, skip_serializing_if = "Option::is_none")]
4450 pub is_available: Option<bool>,
4451}
4452
4453impl std::fmt::Display for UpdateTeammate {
4454 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4455 write!(
4456 f,
4457 "{}",
4458 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4459 )
4460 }
4461}
4462
4463impl tabled::Tabled for UpdateTeammate {
4464 const LENGTH: usize = 4;
4465 fn fields(&self) -> Vec<String> {
4466 vec![
4467 if let Some(username) = &self.username {
4468 format!("{:?}", username)
4469 } else {
4470 String::new()
4471 },
4472 if let Some(first_name) = &self.first_name {
4473 format!("{:?}", first_name)
4474 } else {
4475 String::new()
4476 },
4477 if let Some(last_name) = &self.last_name {
4478 format!("{:?}", last_name)
4479 } else {
4480 String::new()
4481 },
4482 if let Some(is_available) = &self.is_available {
4483 format!("{:?}", is_available)
4484 } else {
4485 String::new()
4486 },
4487 ]
4488 }
4489
4490 fn headers() -> Vec<String> {
4491 vec![
4492 "username".to_string(),
4493 "first_name".to_string(),
4494 "last_name".to_string(),
4495 "is_available".to_string(),
4496 ]
4497 }
4498}
4499
4500#[doc = "A link is used to connect a Front conversation to an external resource."]
4501#[derive(
4502 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
4503)]
4504pub struct CreateLink {
4505 #[doc = "Name of the link. If none is specified, the external_url is used as a default"]
4506 #[serde(default, skip_serializing_if = "Option::is_none")]
4507 pub name: Option<String>,
4508 #[doc = "Underlying identifying url of the link"]
4509 pub external_url: String,
4510}
4511
4512impl std::fmt::Display for CreateLink {
4513 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4514 write!(
4515 f,
4516 "{}",
4517 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4518 )
4519 }
4520}
4521
4522impl tabled::Tabled for CreateLink {
4523 const LENGTH: usize = 2;
4524 fn fields(&self) -> Vec<String> {
4525 vec![
4526 if let Some(name) = &self.name {
4527 format!("{:?}", name)
4528 } else {
4529 String::new()
4530 },
4531 self.external_url.clone(),
4532 ]
4533 }
4534
4535 fn headers() -> Vec<String> {
4536 vec!["name".to_string(), "external_url".to_string()]
4537 }
4538}
4539
4540#[derive(
4541 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
4542)]
4543pub struct UpdateLink {
4544 #[doc = "Name of the link"]
4545 #[serde(default, skip_serializing_if = "Option::is_none")]
4546 pub name: Option<String>,
4547}
4548
4549impl std::fmt::Display for UpdateLink {
4550 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4551 write!(
4552 f,
4553 "{}",
4554 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4555 )
4556 }
4557}
4558
4559impl tabled::Tabled for UpdateLink {
4560 const LENGTH: usize = 1;
4561 fn fields(&self) -> Vec<String> {
4562 vec![if let Some(name) = &self.name {
4563 format!("{:?}", name)
4564 } else {
4565 String::new()
4566 }]
4567 }
4568
4569 fn headers() -> Vec<String> {
4570 vec!["name".to_string()]
4571 }
4572}
4573
4574#[derive(
4575 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
4576)]
4577pub struct Related {
4578 #[doc = "Link to contacts associated to the account"]
4579 #[serde(default, skip_serializing_if = "Option::is_none")]
4580 pub contacts: Option<String>,
4581}
4582
4583impl std::fmt::Display for Related {
4584 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4585 write!(
4586 f,
4587 "{}",
4588 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4589 )
4590 }
4591}
4592
4593impl tabled::Tabled for Related {
4594 const LENGTH: usize = 1;
4595 fn fields(&self) -> Vec<String> {
4596 vec![if let Some(contacts) = &self.contacts {
4597 format!("{:?}", contacts)
4598 } else {
4599 String::new()
4600 }]
4601 }
4602
4603 fn headers() -> Vec<String> {
4604 vec!["contacts".to_string()]
4605 }
4606}
4607
4608#[derive(
4609 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
4610)]
4611pub struct UnderscoreLinks {
4612 #[doc = "Link to resource"]
4613 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
4614 pub self_: Option<String>,
4615 #[serde(default, skip_serializing_if = "Option::is_none")]
4616 pub related: Option<Related>,
4617}
4618
4619impl std::fmt::Display for UnderscoreLinks {
4620 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4621 write!(
4622 f,
4623 "{}",
4624 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4625 )
4626 }
4627}
4628
4629impl tabled::Tabled for UnderscoreLinks {
4630 const LENGTH: usize = 2;
4631 fn fields(&self) -> Vec<String> {
4632 vec![
4633 if let Some(self_) = &self.self_ {
4634 format!("{:?}", self_)
4635 } else {
4636 String::new()
4637 },
4638 if let Some(related) = &self.related {
4639 format!("{:?}", related)
4640 } else {
4641 String::new()
4642 },
4643 ]
4644 }
4645
4646 fn headers() -> Vec<String> {
4647 vec!["self_".to_string(), "related".to_string()]
4648 }
4649}
4650
4651#[derive(
4652 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4653)]
4654pub struct AccountResponse {
4655 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
4656 pub underscore_links: Option<UnderscoreLinks>,
4657 #[doc = "Unique identifier of the account"]
4658 #[serde(default, skip_serializing_if = "Option::is_none")]
4659 pub id: Option<String>,
4660 #[doc = "Account name"]
4661 #[serde(default, skip_serializing_if = "Option::is_none")]
4662 pub name: Option<String>,
4663 #[doc = "URL of the Account's logo"]
4664 #[serde(default, skip_serializing_if = "Option::is_none")]
4665 pub logo_url: Option<String>,
4666 #[doc = "Account Description"]
4667 #[serde(default, skip_serializing_if = "Option::is_none")]
4668 pub description: Option<String>,
4669 #[serde(default, skip_serializing_if = "Option::is_none")]
4670 pub domains: Option<Vec<String>>,
4671 #[doc = "ID of the Account in an External system, such as your backoffice system or CRM"]
4672 #[serde(default, skip_serializing_if = "Option::is_none")]
4673 pub external_id: Option<String>,
4674 #[doc = "Custom Attributes for this account"]
4675 #[serde(default, skip_serializing_if = "Option::is_none")]
4676 pub custom_fields: Option<std::collections::HashMap<String, String>>,
4677 #[doc = "Timestamp when the account was created"]
4678 #[serde(default, skip_serializing_if = "Option::is_none")]
4679 pub created_at: Option<i64>,
4680 #[doc = "Timestamp when the account was updated"]
4681 #[serde(default, skip_serializing_if = "Option::is_none")]
4682 pub updated_at: Option<i64>,
4683}
4684
4685impl std::fmt::Display for AccountResponse {
4686 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4687 write!(
4688 f,
4689 "{}",
4690 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4691 )
4692 }
4693}
4694
4695impl tabled::Tabled for AccountResponse {
4696 const LENGTH: usize = 10;
4697 fn fields(&self) -> Vec<String> {
4698 vec![
4699 if let Some(underscore_links) = &self.underscore_links {
4700 format!("{:?}", underscore_links)
4701 } else {
4702 String::new()
4703 },
4704 if let Some(id) = &self.id {
4705 format!("{:?}", id)
4706 } else {
4707 String::new()
4708 },
4709 if let Some(name) = &self.name {
4710 format!("{:?}", name)
4711 } else {
4712 String::new()
4713 },
4714 if let Some(logo_url) = &self.logo_url {
4715 format!("{:?}", logo_url)
4716 } else {
4717 String::new()
4718 },
4719 if let Some(description) = &self.description {
4720 format!("{:?}", description)
4721 } else {
4722 String::new()
4723 },
4724 if let Some(domains) = &self.domains {
4725 format!("{:?}", domains)
4726 } else {
4727 String::new()
4728 },
4729 if let Some(external_id) = &self.external_id {
4730 format!("{:?}", external_id)
4731 } else {
4732 String::new()
4733 },
4734 if let Some(custom_fields) = &self.custom_fields {
4735 format!("{:?}", custom_fields)
4736 } else {
4737 String::new()
4738 },
4739 if let Some(created_at) = &self.created_at {
4740 format!("{:?}", created_at)
4741 } else {
4742 String::new()
4743 },
4744 if let Some(updated_at) = &self.updated_at {
4745 format!("{:?}", updated_at)
4746 } else {
4747 String::new()
4748 },
4749 ]
4750 }
4751
4752 fn headers() -> Vec<String> {
4753 vec![
4754 "underscore_links".to_string(),
4755 "id".to_string(),
4756 "name".to_string(),
4757 "logo_url".to_string(),
4758 "description".to_string(),
4759 "domains".to_string(),
4760 "external_id".to_string(),
4761 "custom_fields".to_string(),
4762 "created_at".to_string(),
4763 "updated_at".to_string(),
4764 ]
4765 }
4766}
4767
4768#[derive(
4769 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
4770)]
4771pub struct EventResponseUnderscoreLinks {
4772 #[doc = "Link to resource"]
4773 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
4774 pub self_: Option<String>,
4775}
4776
4777impl std::fmt::Display for EventResponseUnderscoreLinks {
4778 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4779 write!(
4780 f,
4781 "{}",
4782 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4783 )
4784 }
4785}
4786
4787impl tabled::Tabled for EventResponseUnderscoreLinks {
4788 const LENGTH: usize = 1;
4789 fn fields(&self) -> Vec<String> {
4790 vec![if let Some(self_) = &self.self_ {
4791 format!("{:?}", self_)
4792 } else {
4793 String::new()
4794 }]
4795 }
4796
4797 fn headers() -> Vec<String> {
4798 vec!["self_".to_string()]
4799 }
4800}
4801
4802#[doc = "Type of event"]
4803#[derive(
4804 serde :: Serialize,
4805 serde :: Deserialize,
4806 PartialEq,
4807 Eq,
4808 Hash,
4809 Debug,
4810 Clone,
4811 schemars :: JsonSchema,
4812 tabled :: Tabled,
4813 clap :: ValueEnum,
4814 parse_display :: FromStr,
4815 parse_display :: Display,
4816)]
4817pub enum EventResponseType {
4818 #[serde(rename = "assign")]
4819 #[display("assign")]
4820 Assign,
4821 #[serde(rename = "unassign")]
4822 #[display("unassign")]
4823 Unassign,
4824 #[serde(rename = "archive")]
4825 #[display("archive")]
4826 Archive,
4827 #[serde(rename = "reopen")]
4828 #[display("reopen")]
4829 Reopen,
4830 #[serde(rename = "trash")]
4831 #[display("trash")]
4832 Trash,
4833 #[serde(rename = "restore")]
4834 #[display("restore")]
4835 Restore,
4836 #[serde(rename = "comment")]
4837 #[display("comment")]
4838 Comment,
4839 #[serde(rename = "inbound")]
4840 #[display("inbound")]
4841 Inbound,
4842 #[serde(rename = "outbound")]
4843 #[display("outbound")]
4844 Outbound,
4845 #[serde(rename = "move")]
4846 #[display("move")]
4847 Move,
4848 #[serde(rename = "forward")]
4849 #[display("forward")]
4850 Forward,
4851 #[serde(rename = "tag")]
4852 #[display("tag")]
4853 Tag,
4854 #[serde(rename = "untag")]
4855 #[display("untag")]
4856 Untag,
4857 #[serde(rename = "sending_error")]
4858 #[display("sending_error")]
4859 SendingError,
4860}
4861
4862#[doc = "Type of resource"]
4863#[derive(
4864 serde :: Serialize,
4865 serde :: Deserialize,
4866 PartialEq,
4867 Eq,
4868 Hash,
4869 Debug,
4870 Clone,
4871 schemars :: JsonSchema,
4872 tabled :: Tabled,
4873 clap :: ValueEnum,
4874 parse_display :: FromStr,
4875 parse_display :: Display,
4876)]
4877pub enum MetaType {
4878 #[serde(rename = "teamate")]
4879 #[display("teamate")]
4880 Teamate,
4881 #[serde(rename = "inbox")]
4882 #[display("inbox")]
4883 Inbox,
4884 #[serde(rename = "tag")]
4885 #[display("tag")]
4886 Tag,
4887 #[serde(rename = "comment")]
4888 #[display("comment")]
4889 Comment,
4890 #[serde(rename = "message")]
4891 #[display("message")]
4892 Message,
4893}
4894
4895#[doc = "Metadata about the resource"]
4896#[derive(
4897 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
4898)]
4899pub struct Meta {
4900 #[doc = "Type of resource"]
4901 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
4902 pub type_: Option<MetaType>,
4903}
4904
4905impl std::fmt::Display for Meta {
4906 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4907 write!(
4908 f,
4909 "{}",
4910 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4911 )
4912 }
4913}
4914
4915impl tabled::Tabled for Meta {
4916 const LENGTH: usize = 1;
4917 fn fields(&self) -> Vec<String> {
4918 vec![if let Some(type_) = &self.type_ {
4919 format!("{:?}", type_)
4920 } else {
4921 String::new()
4922 }]
4923 }
4924
4925 fn headers() -> Vec<String> {
4926 vec!["type_".to_string()]
4927 }
4928}
4929
4930#[doc = "The resource which triggered the event"]
4931#[derive(
4932 serde :: Serialize,
4933 serde :: Deserialize,
4934 PartialEq,
4935 Debug,
4936 Clone,
4937 schemars :: JsonSchema,
4938 tabled :: Tabled,
4939)]
4940pub enum Data {
4941 RuleResponse(RuleResponse),
4942 TeammateResponse(TeammateResponse),
4943 InboxResponse(Vec<InboxResponse>),
4944}
4945
4946#[doc = "Event source"]
4947#[derive(
4948 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4949)]
4950pub struct EventResponseSource {
4951 #[doc = "Metadata about the resource"]
4952 #[serde(rename = "_meta", default, skip_serializing_if = "Option::is_none")]
4953 pub meta: Option<Meta>,
4954 #[doc = "The resource which triggered the event"]
4955 #[serde(default, skip_serializing_if = "Option::is_none")]
4956 pub data: Option<Data>,
4957}
4958
4959impl std::fmt::Display for EventResponseSource {
4960 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4961 write!(
4962 f,
4963 "{}",
4964 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4965 )
4966 }
4967}
4968
4969impl tabled::Tabled for EventResponseSource {
4970 const LENGTH: usize = 2;
4971 fn fields(&self) -> Vec<String> {
4972 vec![
4973 if let Some(meta) = &self.meta {
4974 format!("{:?}", meta)
4975 } else {
4976 String::new()
4977 },
4978 if let Some(data) = &self.data {
4979 format!("{:?}", data)
4980 } else {
4981 String::new()
4982 },
4983 ]
4984 }
4985
4986 fn headers() -> Vec<String> {
4987 vec!["meta".to_string(), "data".to_string()]
4988 }
4989}
4990
4991#[doc = "Type of resource"]
4992#[derive(
4993 serde :: Serialize,
4994 serde :: Deserialize,
4995 PartialEq,
4996 Eq,
4997 Hash,
4998 Debug,
4999 Clone,
5000 schemars :: JsonSchema,
5001 tabled :: Tabled,
5002 clap :: ValueEnum,
5003 parse_display :: FromStr,
5004 parse_display :: Display,
5005)]
5006pub enum TargetMetaType {
5007 #[serde(rename = "teamate")]
5008 #[display("teamate")]
5009 Teamate,
5010 #[serde(rename = "inbox")]
5011 #[display("inbox")]
5012 Inbox,
5013 #[serde(rename = "tag")]
5014 #[display("tag")]
5015 Tag,
5016 #[serde(rename = "comment")]
5017 #[display("comment")]
5018 Comment,
5019 #[serde(rename = "message")]
5020 #[display("message")]
5021 Message,
5022 #[serde(rename = "link")]
5023 #[display("link")]
5024 Link,
5025}
5026
5027#[doc = "The resource which received the event"]
5028#[derive(
5029 serde :: Serialize,
5030 serde :: Deserialize,
5031 PartialEq,
5032 Debug,
5033 Clone,
5034 schemars :: JsonSchema,
5035 tabled :: Tabled,
5036)]
5037pub enum TargetMetaData {
5038 TeammateResponse(TeammateResponse),
5039 InboxResponse(InboxResponse),
5040 TagResponse(TagResponse),
5041 CommentResponse(CommentResponse),
5042 MessageResponse(MessageResponse),
5043 LinkResponse(LinkResponse),
5044}
5045
5046#[doc = "Metadata about the resource"]
5047#[derive(
5048 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5049)]
5050pub struct TargetMeta {
5051 #[doc = "Type of resource"]
5052 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
5053 pub type_: Option<TargetMetaType>,
5054 #[doc = "The resource which received the event"]
5055 #[serde(default, skip_serializing_if = "Option::is_none")]
5056 pub data: Option<TargetMetaData>,
5057}
5058
5059impl std::fmt::Display for TargetMeta {
5060 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5061 write!(
5062 f,
5063 "{}",
5064 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5065 )
5066 }
5067}
5068
5069impl tabled::Tabled for TargetMeta {
5070 const LENGTH: usize = 2;
5071 fn fields(&self) -> Vec<String> {
5072 vec![
5073 if let Some(type_) = &self.type_ {
5074 format!("{:?}", type_)
5075 } else {
5076 String::new()
5077 },
5078 if let Some(data) = &self.data {
5079 format!("{:?}", data)
5080 } else {
5081 String::new()
5082 },
5083 ]
5084 }
5085
5086 fn headers() -> Vec<String> {
5087 vec!["type_".to_string(), "data".to_string()]
5088 }
5089}
5090
5091#[doc = "Partial representation (type & id) of the event's target"]
5092#[derive(
5093 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5094)]
5095pub struct Target {
5096 #[doc = "Metadata about the resource"]
5097 #[serde(rename = "_meta", default, skip_serializing_if = "Option::is_none")]
5098 pub meta: Option<TargetMeta>,
5099}
5100
5101impl std::fmt::Display for Target {
5102 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5103 write!(
5104 f,
5105 "{}",
5106 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5107 )
5108 }
5109}
5110
5111impl tabled::Tabled for Target {
5112 const LENGTH: usize = 1;
5113 fn fields(&self) -> Vec<String> {
5114 vec![if let Some(meta) = &self.meta {
5115 format!("{:?}", meta)
5116 } else {
5117 String::new()
5118 }]
5119 }
5120
5121 fn headers() -> Vec<String> {
5122 vec!["meta".to_string()]
5123 }
5124}
5125
5126#[doc = "An event is created everytime something interesting is happening in Front."]
5127#[derive(
5128 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5129)]
5130pub struct EventResponse {
5131 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
5132 pub underscore_links: Option<EventResponseUnderscoreLinks>,
5133 #[doc = "Unique identifier of the event"]
5134 #[serde(default, skip_serializing_if = "Option::is_none")]
5135 pub id: Option<i64>,
5136 #[doc = "Type of event"]
5137 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
5138 pub type_: Option<EventResponseType>,
5139 #[doc = "Date at which the event has been emitted"]
5140 #[serde(default, skip_serializing_if = "Option::is_none")]
5141 pub emitted_at: Option<String>,
5142 #[doc = "Event source"]
5143 #[serde(default, skip_serializing_if = "Option::is_none")]
5144 pub source: Option<EventResponseSource>,
5145 #[doc = "Partial representation (type & id) of the event's target"]
5146 #[serde(default, skip_serializing_if = "Option::is_none")]
5147 pub target: Option<Target>,
5148 #[serde(default, skip_serializing_if = "Option::is_none")]
5149 pub conversation: Option<ConversationResponse>,
5150}
5151
5152impl std::fmt::Display for EventResponse {
5153 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5154 write!(
5155 f,
5156 "{}",
5157 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5158 )
5159 }
5160}
5161
5162impl tabled::Tabled for EventResponse {
5163 const LENGTH: usize = 7;
5164 fn fields(&self) -> Vec<String> {
5165 vec![
5166 if let Some(underscore_links) = &self.underscore_links {
5167 format!("{:?}", underscore_links)
5168 } else {
5169 String::new()
5170 },
5171 if let Some(id) = &self.id {
5172 format!("{:?}", id)
5173 } else {
5174 String::new()
5175 },
5176 if let Some(type_) = &self.type_ {
5177 format!("{:?}", type_)
5178 } else {
5179 String::new()
5180 },
5181 if let Some(emitted_at) = &self.emitted_at {
5182 format!("{:?}", emitted_at)
5183 } else {
5184 String::new()
5185 },
5186 if let Some(source) = &self.source {
5187 format!("{:?}", source)
5188 } else {
5189 String::new()
5190 },
5191 if let Some(target) = &self.target {
5192 format!("{:?}", target)
5193 } else {
5194 String::new()
5195 },
5196 if let Some(conversation) = &self.conversation {
5197 format!("{:?}", conversation)
5198 } else {
5199 String::new()
5200 },
5201 ]
5202 }
5203
5204 fn headers() -> Vec<String> {
5205 vec![
5206 "underscore_links".to_string(),
5207 "id".to_string(),
5208 "type_".to_string(),
5209 "emitted_at".to_string(),
5210 "source".to_string(),
5211 "target".to_string(),
5212 "conversation".to_string(),
5213 ]
5214 }
5215}
5216
5217#[derive(
5218 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
5219)]
5220pub struct IdentityResponseUnderscoreLinks {
5221 #[doc = "Link to resource"]
5222 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
5223 pub self_: Option<String>,
5224}
5225
5226impl std::fmt::Display for IdentityResponseUnderscoreLinks {
5227 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5228 write!(
5229 f,
5230 "{}",
5231 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5232 )
5233 }
5234}
5235
5236impl tabled::Tabled for IdentityResponseUnderscoreLinks {
5237 const LENGTH: usize = 1;
5238 fn fields(&self) -> Vec<String> {
5239 vec![if let Some(self_) = &self.self_ {
5240 format!("{:?}", self_)
5241 } else {
5242 String::new()
5243 }]
5244 }
5245
5246 fn headers() -> Vec<String> {
5247 vec!["self_".to_string()]
5248 }
5249}
5250
5251#[derive(
5252 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
5253)]
5254pub struct IdentityResponse {
5255 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
5256 pub underscore_links: Option<IdentityResponseUnderscoreLinks>,
5257 #[doc = "Unique ID of company"]
5258 #[serde(default, skip_serializing_if = "Option::is_none")]
5259 pub id: Option<i64>,
5260 #[doc = "Name of company"]
5261 #[serde(default, skip_serializing_if = "Option::is_none")]
5262 pub name: Option<String>,
5263}
5264
5265impl std::fmt::Display for IdentityResponse {
5266 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5267 write!(
5268 f,
5269 "{}",
5270 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5271 )
5272 }
5273}
5274
5275impl tabled::Tabled for IdentityResponse {
5276 const LENGTH: usize = 3;
5277 fn fields(&self) -> Vec<String> {
5278 vec![
5279 if let Some(underscore_links) = &self.underscore_links {
5280 format!("{:?}", underscore_links)
5281 } else {
5282 String::new()
5283 },
5284 if let Some(id) = &self.id {
5285 format!("{:?}", id)
5286 } else {
5287 String::new()
5288 },
5289 if let Some(name) = &self.name {
5290 format!("{:?}", name)
5291 } else {
5292 String::new()
5293 },
5294 ]
5295 }
5296
5297 fn headers() -> Vec<String> {
5298 vec![
5299 "underscore_links".to_string(),
5300 "id".to_string(),
5301 "name".to_string(),
5302 ]
5303 }
5304}
5305
5306#[derive(
5307 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
5308)]
5309pub struct AnalyticsExportResponse2UnderscoreLinks {
5310 #[doc = "Link to analytics export"]
5311 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
5312 pub self_: Option<String>,
5313}
5314
5315impl std::fmt::Display for AnalyticsExportResponse2UnderscoreLinks {
5316 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5317 write!(
5318 f,
5319 "{}",
5320 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5321 )
5322 }
5323}
5324
5325impl tabled::Tabled for AnalyticsExportResponse2UnderscoreLinks {
5326 const LENGTH: usize = 1;
5327 fn fields(&self) -> Vec<String> {
5328 vec![if let Some(self_) = &self.self_ {
5329 format!("{:?}", self_)
5330 } else {
5331 String::new()
5332 }]
5333 }
5334
5335 fn headers() -> Vec<String> {
5336 vec!["self_".to_string()]
5337 }
5338}
5339
5340#[doc = "Status of the analytics"]
5341#[derive(
5342 serde :: Serialize,
5343 serde :: Deserialize,
5344 PartialEq,
5345 Eq,
5346 Hash,
5347 Debug,
5348 Clone,
5349 schemars :: JsonSchema,
5350 tabled :: Tabled,
5351 clap :: ValueEnum,
5352 parse_display :: FromStr,
5353 parse_display :: Display,
5354)]
5355pub enum AnalyticsExportResponse2Status {
5356 #[serde(rename = "running")]
5357 #[display("running")]
5358 Running,
5359 #[serde(rename = "done")]
5360 #[display("done")]
5361 Done,
5362 #[serde(rename = "failed")]
5363 #[display("failed")]
5364 Failed,
5365}
5366
5367#[derive(
5368 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5369)]
5370pub struct AnalyticsExportResponse2 {
5371 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
5372 pub underscore_links: Option<AnalyticsExportResponse2UnderscoreLinks>,
5373 #[doc = "Status of the analytics"]
5374 #[serde(default, skip_serializing_if = "Option::is_none")]
5375 pub status: Option<AnalyticsExportResponse2Status>,
5376 #[doc = "Number ranging from 0 to 100 corresponding to the percentage of the analytics \
5377 processed."]
5378 #[serde(default, skip_serializing_if = "Option::is_none")]
5379 pub progress: Option<i64>,
5380 #[doc = "The URL from which the export data can be downloaded."]
5381 #[serde(default, skip_serializing_if = "Option::is_none")]
5382 pub url: Option<String>,
5383 #[doc = "Size (in bytes) of the export data."]
5384 #[serde(default, skip_serializing_if = "Option::is_none")]
5385 pub size: Option<f64>,
5386 #[doc = "Timestamp (in seconds) at which the export was requested."]
5387 #[serde(default, skip_serializing_if = "Option::is_none")]
5388 pub created_at: Option<f64>,
5389 #[doc = "Resources to compute the analytics for. Defaults to all."]
5390 #[serde(default, skip_serializing_if = "Option::is_none")]
5391 pub filters: Option<AnalyticsFilters>,
5392}
5393
5394impl std::fmt::Display for AnalyticsExportResponse2 {
5395 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5396 write!(
5397 f,
5398 "{}",
5399 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5400 )
5401 }
5402}
5403
5404impl tabled::Tabled for AnalyticsExportResponse2 {
5405 const LENGTH: usize = 7;
5406 fn fields(&self) -> Vec<String> {
5407 vec![
5408 if let Some(underscore_links) = &self.underscore_links {
5409 format!("{:?}", underscore_links)
5410 } else {
5411 String::new()
5412 },
5413 if let Some(status) = &self.status {
5414 format!("{:?}", status)
5415 } else {
5416 String::new()
5417 },
5418 if let Some(progress) = &self.progress {
5419 format!("{:?}", progress)
5420 } else {
5421 String::new()
5422 },
5423 if let Some(url) = &self.url {
5424 format!("{:?}", url)
5425 } else {
5426 String::new()
5427 },
5428 if let Some(size) = &self.size {
5429 format!("{:?}", size)
5430 } else {
5431 String::new()
5432 },
5433 if let Some(created_at) = &self.created_at {
5434 format!("{:?}", created_at)
5435 } else {
5436 String::new()
5437 },
5438 if let Some(filters) = &self.filters {
5439 format!("{:?}", filters)
5440 } else {
5441 String::new()
5442 },
5443 ]
5444 }
5445
5446 fn headers() -> Vec<String> {
5447 vec![
5448 "underscore_links".to_string(),
5449 "status".to_string(),
5450 "progress".to_string(),
5451 "url".to_string(),
5452 "size".to_string(),
5453 "created_at".to_string(),
5454 "filters".to_string(),
5455 ]
5456 }
5457}
5458
5459#[derive(
5460 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
5461)]
5462pub struct AnalyticsReportResponse2UnderscoreLinks {
5463 #[doc = "Link to analytics job."]
5464 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
5465 pub self_: Option<String>,
5466}
5467
5468impl std::fmt::Display for AnalyticsReportResponse2UnderscoreLinks {
5469 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5470 write!(
5471 f,
5472 "{}",
5473 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5474 )
5475 }
5476}
5477
5478impl tabled::Tabled for AnalyticsReportResponse2UnderscoreLinks {
5479 const LENGTH: usize = 1;
5480 fn fields(&self) -> Vec<String> {
5481 vec![if let Some(self_) = &self.self_ {
5482 format!("{:?}", self_)
5483 } else {
5484 String::new()
5485 }]
5486 }
5487
5488 fn headers() -> Vec<String> {
5489 vec!["self_".to_string()]
5490 }
5491}
5492
5493#[doc = "Status of the report."]
5494#[derive(
5495 serde :: Serialize,
5496 serde :: Deserialize,
5497 PartialEq,
5498 Eq,
5499 Hash,
5500 Debug,
5501 Clone,
5502 schemars :: JsonSchema,
5503 tabled :: Tabled,
5504 clap :: ValueEnum,
5505 parse_display :: FromStr,
5506 parse_display :: Display,
5507)]
5508pub enum AnalyticsReportResponse2Status {
5509 #[serde(rename = "running")]
5510 #[display("running")]
5511 Running,
5512 #[serde(rename = "done")]
5513 #[display("done")]
5514 Done,
5515 #[serde(rename = "failed")]
5516 #[display("failed")]
5517 Failed,
5518}
5519
5520#[derive(
5521 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5522)]
5523pub struct AnalyticsReportResponse2 {
5524 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
5525 pub underscore_links: Option<AnalyticsReportResponse2UnderscoreLinks>,
5526 #[doc = "Status of the report."]
5527 #[serde(default, skip_serializing_if = "Option::is_none")]
5528 pub status: Option<AnalyticsReportResponse2Status>,
5529 #[doc = "Number ranging from 0 to 100 corresponding to the percentage of the analytics \
5530 processed."]
5531 #[serde(default, skip_serializing_if = "Option::is_none")]
5532 pub progress: Option<i64>,
5533 #[doc = "The metrics computed for the report."]
5534 #[serde(default, skip_serializing_if = "Option::is_none")]
5535 pub metrics: Option<Vec<AnalyticsScalar2>>,
5536}
5537
5538impl std::fmt::Display for AnalyticsReportResponse2 {
5539 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5540 write!(
5541 f,
5542 "{}",
5543 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5544 )
5545 }
5546}
5547
5548impl tabled::Tabled for AnalyticsReportResponse2 {
5549 const LENGTH: usize = 4;
5550 fn fields(&self) -> Vec<String> {
5551 vec![
5552 if let Some(underscore_links) = &self.underscore_links {
5553 format!("{:?}", underscore_links)
5554 } else {
5555 String::new()
5556 },
5557 if let Some(status) = &self.status {
5558 format!("{:?}", status)
5559 } else {
5560 String::new()
5561 },
5562 if let Some(progress) = &self.progress {
5563 format!("{:?}", progress)
5564 } else {
5565 String::new()
5566 },
5567 if let Some(metrics) = &self.metrics {
5568 format!("{:?}", metrics)
5569 } else {
5570 String::new()
5571 },
5572 ]
5573 }
5574
5575 fn headers() -> Vec<String> {
5576 vec![
5577 "underscore_links".to_string(),
5578 "status".to_string(),
5579 "progress".to_string(),
5580 "metrics".to_string(),
5581 ]
5582 }
5583}
5584
5585#[derive(
5586 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5587)]
5588pub struct AnalyticsScalar2 {
5589 #[serde(default, skip_serializing_if = "Option::is_none")]
5590 pub id: Option<AnalyticsMetricId>,
5591 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
5592 pub type_: Option<AnalyticsScalarType>,
5593 #[serde(default, skip_serializing_if = "Option::is_none")]
5594 pub value: Option<AnalyticsScalarValue>,
5595}
5596
5597impl std::fmt::Display for AnalyticsScalar2 {
5598 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5599 write!(
5600 f,
5601 "{}",
5602 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5603 )
5604 }
5605}
5606
5607impl tabled::Tabled for AnalyticsScalar2 {
5608 const LENGTH: usize = 3;
5609 fn fields(&self) -> Vec<String> {
5610 vec![
5611 if let Some(id) = &self.id {
5612 format!("{:?}", id)
5613 } else {
5614 String::new()
5615 },
5616 if let Some(type_) = &self.type_ {
5617 format!("{:?}", type_)
5618 } else {
5619 String::new()
5620 },
5621 if let Some(value) = &self.value {
5622 format!("{:?}", value)
5623 } else {
5624 String::new()
5625 },
5626 ]
5627 }
5628
5629 fn headers() -> Vec<String> {
5630 vec!["id".to_string(), "type_".to_string(), "value".to_string()]
5631 }
5632}
5633
5634#[derive(
5635 serde :: Serialize,
5636 serde :: Deserialize,
5637 PartialEq,
5638 Eq,
5639 Hash,
5640 Debug,
5641 Clone,
5642 schemars :: JsonSchema,
5643 tabled :: Tabled,
5644 clap :: ValueEnum,
5645 parse_display :: FromStr,
5646 parse_display :: Display,
5647)]
5648pub enum AnalyticsScalarType {
5649 #[serde(rename = "number")]
5650 #[display("number")]
5651 Number,
5652 #[serde(rename = "percentage")]
5653 #[display("percentage")]
5654 Percentage,
5655 #[serde(rename = "string")]
5656 #[display("string")]
5657 String,
5658 #[serde(rename = "duration")]
5659 #[display("duration")]
5660 Duration,
5661}
5662
5663#[derive(
5664 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
5665)]
5666pub struct ResourceUnderscoreLinks {
5667 #[doc = "Link to a resource."]
5668 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
5669 pub self_: Option<String>,
5670}
5671
5672impl std::fmt::Display for ResourceUnderscoreLinks {
5673 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5674 write!(
5675 f,
5676 "{}",
5677 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5678 )
5679 }
5680}
5681
5682impl tabled::Tabled for ResourceUnderscoreLinks {
5683 const LENGTH: usize = 1;
5684 fn fields(&self) -> Vec<String> {
5685 vec![if let Some(self_) = &self.self_ {
5686 format!("{:?}", self_)
5687 } else {
5688 String::new()
5689 }]
5690 }
5691
5692 fn headers() -> Vec<String> {
5693 vec!["self_".to_string()]
5694 }
5695}
5696
5697#[derive(
5698 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5699)]
5700pub struct Resource {
5701 #[serde(default, skip_serializing_if = "Option::is_none")]
5702 pub id: Option<f64>,
5703 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
5704 pub underscore_links: Option<ResourceUnderscoreLinks>,
5705}
5706
5707impl std::fmt::Display for Resource {
5708 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5709 write!(
5710 f,
5711 "{}",
5712 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5713 )
5714 }
5715}
5716
5717impl tabled::Tabled for Resource {
5718 const LENGTH: usize = 2;
5719 fn fields(&self) -> Vec<String> {
5720 vec![
5721 if let Some(id) = &self.id {
5722 format!("{:?}", id)
5723 } else {
5724 String::new()
5725 },
5726 if let Some(underscore_links) = &self.underscore_links {
5727 format!("{:?}", underscore_links)
5728 } else {
5729 String::new()
5730 },
5731 ]
5732 }
5733
5734 fn headers() -> Vec<String> {
5735 vec!["id".to_string(), "underscore_links".to_string()]
5736 }
5737}
5738
5739#[derive(
5740 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5741)]
5742pub struct ValueOneOf {
5743 #[serde(default, skip_serializing_if = "Option::is_none")]
5744 pub label: Option<String>,
5745 #[serde(default, skip_serializing_if = "Option::is_none")]
5746 pub resource: Option<Resource>,
5747}
5748
5749impl std::fmt::Display for ValueOneOf {
5750 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5751 write!(
5752 f,
5753 "{}",
5754 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5755 )
5756 }
5757}
5758
5759impl tabled::Tabled for ValueOneOf {
5760 const LENGTH: usize = 2;
5761 fn fields(&self) -> Vec<String> {
5762 vec![
5763 if let Some(label) = &self.label {
5764 format!("{:?}", label)
5765 } else {
5766 String::new()
5767 },
5768 if let Some(resource) = &self.resource {
5769 format!("{:?}", resource)
5770 } else {
5771 String::new()
5772 },
5773 ]
5774 }
5775
5776 fn headers() -> Vec<String> {
5777 vec!["label".to_string(), "resource".to_string()]
5778 }
5779}
5780
5781#[doc = "The value of a scalar metric."]
5782#[derive(
5783 serde :: Serialize,
5784 serde :: Deserialize,
5785 PartialEq,
5786 Debug,
5787 Clone,
5788 schemars :: JsonSchema,
5789 tabled :: Tabled,
5790)]
5791pub enum Value {
5792 I64(i64),
5793 String(String),
5794 ValueOneOf(ValueOneOf),
5795}
5796
5797#[derive(
5798 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5799)]
5800pub struct AnalyticsScalarValue {
5801 #[serde(default, skip_serializing_if = "Option::is_none")]
5802 pub id: Option<AnalyticsMetricId>,
5803 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
5804 pub type_: Option<AnalyticsScalarType>,
5805 #[doc = "The value of a scalar metric."]
5806 #[serde(default, skip_serializing_if = "Option::is_none")]
5807 pub value: Option<Value>,
5808}
5809
5810impl std::fmt::Display for AnalyticsScalarValue {
5811 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5812 write!(
5813 f,
5814 "{}",
5815 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5816 )
5817 }
5818}
5819
5820impl tabled::Tabled for AnalyticsScalarValue {
5821 const LENGTH: usize = 3;
5822 fn fields(&self) -> Vec<String> {
5823 vec![
5824 if let Some(id) = &self.id {
5825 format!("{:?}", id)
5826 } else {
5827 String::new()
5828 },
5829 if let Some(type_) = &self.type_ {
5830 format!("{:?}", type_)
5831 } else {
5832 String::new()
5833 },
5834 if let Some(value) = &self.value {
5835 format!("{:?}", value)
5836 } else {
5837 String::new()
5838 },
5839 ]
5840 }
5841
5842 fn headers() -> Vec<String> {
5843 vec!["id".to_string(), "type_".to_string(), "value".to_string()]
5844 }
5845}
5846
5847#[doc = "Attachment metadata"]
5848#[derive(
5849 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
5850)]
5851pub struct AttachmentMetadata {
5852 #[doc = "Whether or not the attachment is part of the message body"]
5853 #[serde(default, skip_serializing_if = "Option::is_none")]
5854 pub is_inline: Option<bool>,
5855 #[doc = "Unique identifier used to link an attachment to where it is used in the message body"]
5856 #[serde(default, skip_serializing_if = "Option::is_none")]
5857 pub cid: Option<String>,
5858}
5859
5860impl std::fmt::Display for AttachmentMetadata {
5861 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5862 write!(
5863 f,
5864 "{}",
5865 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5866 )
5867 }
5868}
5869
5870impl tabled::Tabled for AttachmentMetadata {
5871 const LENGTH: usize = 2;
5872 fn fields(&self) -> Vec<String> {
5873 vec![
5874 if let Some(is_inline) = &self.is_inline {
5875 format!("{:?}", is_inline)
5876 } else {
5877 String::new()
5878 },
5879 if let Some(cid) = &self.cid {
5880 format!("{:?}", cid)
5881 } else {
5882 String::new()
5883 },
5884 ]
5885 }
5886
5887 fn headers() -> Vec<String> {
5888 vec!["is_inline".to_string(), "cid".to_string()]
5889 }
5890}
5891
5892#[derive(
5893 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
5894)]
5895pub struct Attachment {
5896 #[serde(default, skip_serializing_if = "Option::is_none")]
5897 pub id: Option<String>,
5898 #[doc = "Name of the attached file"]
5899 #[serde(default, skip_serializing_if = "Option::is_none")]
5900 pub filename: Option<String>,
5901 #[doc = "URL to download the attached file"]
5902 #[serde(default, skip_serializing_if = "Option::is_none")]
5903 pub url: Option<String>,
5904 #[doc = "Content type of the attached file"]
5905 #[serde(default, skip_serializing_if = "Option::is_none")]
5906 pub content_type: Option<String>,
5907 #[doc = "Size (in byte) of the attached file"]
5908 #[serde(default, skip_serializing_if = "Option::is_none")]
5909 pub size: Option<i64>,
5910 #[doc = "Attachment metadata"]
5911 #[serde(default, skip_serializing_if = "Option::is_none")]
5912 pub metadata: Option<AttachmentMetadata>,
5913}
5914
5915impl std::fmt::Display for Attachment {
5916 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5917 write!(
5918 f,
5919 "{}",
5920 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5921 )
5922 }
5923}
5924
5925impl tabled::Tabled for Attachment {
5926 const LENGTH: usize = 6;
5927 fn fields(&self) -> Vec<String> {
5928 vec![
5929 if let Some(id) = &self.id {
5930 format!("{:?}", id)
5931 } else {
5932 String::new()
5933 },
5934 if let Some(filename) = &self.filename {
5935 format!("{:?}", filename)
5936 } else {
5937 String::new()
5938 },
5939 if let Some(url) = &self.url {
5940 format!("{:?}", url)
5941 } else {
5942 String::new()
5943 },
5944 if let Some(content_type) = &self.content_type {
5945 format!("{:?}", content_type)
5946 } else {
5947 String::new()
5948 },
5949 if let Some(size) = &self.size {
5950 format!("{:?}", size)
5951 } else {
5952 String::new()
5953 },
5954 if let Some(metadata) = &self.metadata {
5955 format!("{:?}", metadata)
5956 } else {
5957 String::new()
5958 },
5959 ]
5960 }
5961
5962 fn headers() -> Vec<String> {
5963 vec![
5964 "id".to_string(),
5965 "filename".to_string(),
5966 "url".to_string(),
5967 "content_type".to_string(),
5968 "size".to_string(),
5969 "metadata".to_string(),
5970 ]
5971 }
5972}
5973
5974#[derive(
5975 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
5976)]
5977pub struct MessageTemplateFolderResponseUnderscoreLinksRelated {
5978 #[doc = "Link to resource's owner"]
5979 #[serde(default, skip_serializing_if = "Option::is_none")]
5980 pub owner: Option<String>,
5981}
5982
5983impl std::fmt::Display for MessageTemplateFolderResponseUnderscoreLinksRelated {
5984 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5985 write!(
5986 f,
5987 "{}",
5988 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5989 )
5990 }
5991}
5992
5993impl tabled::Tabled for MessageTemplateFolderResponseUnderscoreLinksRelated {
5994 const LENGTH: usize = 1;
5995 fn fields(&self) -> Vec<String> {
5996 vec![if let Some(owner) = &self.owner {
5997 format!("{:?}", owner)
5998 } else {
5999 String::new()
6000 }]
6001 }
6002
6003 fn headers() -> Vec<String> {
6004 vec!["owner".to_string()]
6005 }
6006}
6007
6008#[derive(
6009 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
6010)]
6011pub struct MessageTemplateFolderResponseUnderscoreLinks {
6012 #[doc = "Link to resource"]
6013 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
6014 pub self_: Option<String>,
6015 #[serde(default, skip_serializing_if = "Option::is_none")]
6016 pub related: Option<MessageTemplateFolderResponseUnderscoreLinksRelated>,
6017}
6018
6019impl std::fmt::Display for MessageTemplateFolderResponseUnderscoreLinks {
6020 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6021 write!(
6022 f,
6023 "{}",
6024 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6025 )
6026 }
6027}
6028
6029impl tabled::Tabled for MessageTemplateFolderResponseUnderscoreLinks {
6030 const LENGTH: usize = 2;
6031 fn fields(&self) -> Vec<String> {
6032 vec![
6033 if let Some(self_) = &self.self_ {
6034 format!("{:?}", self_)
6035 } else {
6036 String::new()
6037 },
6038 if let Some(related) = &self.related {
6039 format!("{:?}", related)
6040 } else {
6041 String::new()
6042 },
6043 ]
6044 }
6045
6046 fn headers() -> Vec<String> {
6047 vec!["self_".to_string(), "related".to_string()]
6048 }
6049}
6050
6051#[derive(
6052 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6053)]
6054pub struct MessageTemplateFolderResponse {
6055 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
6056 pub underscore_links: Option<MessageTemplateFolderResponseUnderscoreLinks>,
6057 #[doc = "Unique identifier of the message template folder"]
6058 #[serde(default, skip_serializing_if = "Option::is_none")]
6059 pub id: Option<String>,
6060 #[doc = "Name of the message template folder"]
6061 #[serde(default, skip_serializing_if = "Option::is_none")]
6062 pub name: Option<String>,
6063}
6064
6065impl std::fmt::Display for MessageTemplateFolderResponse {
6066 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6067 write!(
6068 f,
6069 "{}",
6070 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6071 )
6072 }
6073}
6074
6075impl tabled::Tabled for MessageTemplateFolderResponse {
6076 const LENGTH: usize = 3;
6077 fn fields(&self) -> Vec<String> {
6078 vec![
6079 if let Some(underscore_links) = &self.underscore_links {
6080 format!("{:?}", underscore_links)
6081 } else {
6082 String::new()
6083 },
6084 if let Some(id) = &self.id {
6085 format!("{:?}", id)
6086 } else {
6087 String::new()
6088 },
6089 if let Some(name) = &self.name {
6090 format!("{:?}", name)
6091 } else {
6092 String::new()
6093 },
6094 ]
6095 }
6096
6097 fn headers() -> Vec<String> {
6098 vec![
6099 "underscore_links".to_string(),
6100 "id".to_string(),
6101 "name".to_string(),
6102 ]
6103 }
6104}
6105
6106#[derive(
6107 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
6108)]
6109pub struct MessageTemplateResponseUnderscoreLinksRelated {
6110 #[doc = "Link to resource's owner"]
6111 #[serde(default, skip_serializing_if = "Option::is_none")]
6112 pub owner: Option<String>,
6113}
6114
6115impl std::fmt::Display for MessageTemplateResponseUnderscoreLinksRelated {
6116 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6117 write!(
6118 f,
6119 "{}",
6120 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6121 )
6122 }
6123}
6124
6125impl tabled::Tabled for MessageTemplateResponseUnderscoreLinksRelated {
6126 const LENGTH: usize = 1;
6127 fn fields(&self) -> Vec<String> {
6128 vec![if let Some(owner) = &self.owner {
6129 format!("{:?}", owner)
6130 } else {
6131 String::new()
6132 }]
6133 }
6134
6135 fn headers() -> Vec<String> {
6136 vec!["owner".to_string()]
6137 }
6138}
6139
6140#[derive(
6141 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
6142)]
6143pub struct MessageTemplateResponseUnderscoreLinks {
6144 #[doc = "Link to resource"]
6145 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
6146 pub self_: Option<String>,
6147 #[serde(default, skip_serializing_if = "Option::is_none")]
6148 pub related: Option<MessageTemplateResponseUnderscoreLinksRelated>,
6149}
6150
6151impl std::fmt::Display for MessageTemplateResponseUnderscoreLinks {
6152 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6153 write!(
6154 f,
6155 "{}",
6156 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6157 )
6158 }
6159}
6160
6161impl tabled::Tabled for MessageTemplateResponseUnderscoreLinks {
6162 const LENGTH: usize = 2;
6163 fn fields(&self) -> Vec<String> {
6164 vec![
6165 if let Some(self_) = &self.self_ {
6166 format!("{:?}", self_)
6167 } else {
6168 String::new()
6169 },
6170 if let Some(related) = &self.related {
6171 format!("{:?}", related)
6172 } else {
6173 String::new()
6174 },
6175 ]
6176 }
6177
6178 fn headers() -> Vec<String> {
6179 vec!["self_".to_string(), "related".to_string()]
6180 }
6181}
6182
6183#[derive(
6184 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6185)]
6186pub struct MessageTemplateResponse {
6187 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
6188 pub underscore_links: Option<MessageTemplateResponseUnderscoreLinks>,
6189 #[doc = "Unique identifier of the response"]
6190 #[serde(default, skip_serializing_if = "Option::is_none")]
6191 pub id: Option<String>,
6192 #[doc = "Name of the response"]
6193 #[serde(default, skip_serializing_if = "Option::is_none")]
6194 pub name: Option<String>,
6195 #[doc = "Subject of the response"]
6196 #[serde(default, skip_serializing_if = "Option::is_none")]
6197 pub subject: Option<String>,
6198 #[doc = "Body of the response"]
6199 #[serde(default, skip_serializing_if = "Option::is_none")]
6200 pub body: Option<String>,
6201 #[doc = "List of files attached to the response"]
6202 #[serde(default, skip_serializing_if = "Option::is_none")]
6203 pub attachments: Option<Vec<Attachment>>,
6204 #[doc = "Whether or not the template is available in all inboxes."]
6205 #[serde(default, skip_serializing_if = "Option::is_none")]
6206 pub is_available_for_all_inboxes: Option<bool>,
6207 #[serde(default, skip_serializing_if = "Option::is_none")]
6208 pub inbox_ids: Option<Vec<String>>,
6209}
6210
6211impl std::fmt::Display for MessageTemplateResponse {
6212 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6213 write!(
6214 f,
6215 "{}",
6216 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6217 )
6218 }
6219}
6220
6221impl tabled::Tabled for MessageTemplateResponse {
6222 const LENGTH: usize = 8;
6223 fn fields(&self) -> Vec<String> {
6224 vec![
6225 if let Some(underscore_links) = &self.underscore_links {
6226 format!("{:?}", underscore_links)
6227 } else {
6228 String::new()
6229 },
6230 if let Some(id) = &self.id {
6231 format!("{:?}", id)
6232 } else {
6233 String::new()
6234 },
6235 if let Some(name) = &self.name {
6236 format!("{:?}", name)
6237 } else {
6238 String::new()
6239 },
6240 if let Some(subject) = &self.subject {
6241 format!("{:?}", subject)
6242 } else {
6243 String::new()
6244 },
6245 if let Some(body) = &self.body {
6246 format!("{:?}", body)
6247 } else {
6248 String::new()
6249 },
6250 if let Some(attachments) = &self.attachments {
6251 format!("{:?}", attachments)
6252 } else {
6253 String::new()
6254 },
6255 if let Some(is_available_for_all_inboxes) = &self.is_available_for_all_inboxes {
6256 format!("{:?}", is_available_for_all_inboxes)
6257 } else {
6258 String::new()
6259 },
6260 if let Some(inbox_ids) = &self.inbox_ids {
6261 format!("{:?}", inbox_ids)
6262 } else {
6263 String::new()
6264 },
6265 ]
6266 }
6267
6268 fn headers() -> Vec<String> {
6269 vec![
6270 "underscore_links".to_string(),
6271 "id".to_string(),
6272 "name".to_string(),
6273 "subject".to_string(),
6274 "body".to_string(),
6275 "attachments".to_string(),
6276 "is_available_for_all_inboxes".to_string(),
6277 "inbox_ids".to_string(),
6278 ]
6279 }
6280}
6281
6282#[derive(
6283 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
6284)]
6285pub struct ContactGroupResponsesUnderscoreLinksRelated {
6286 #[doc = "Link to group contacts"]
6287 #[serde(default, skip_serializing_if = "Option::is_none")]
6288 pub contacts: Option<String>,
6289 #[doc = "Link to group owner"]
6290 #[serde(default, skip_serializing_if = "Option::is_none")]
6291 pub owner: Option<String>,
6292}
6293
6294impl std::fmt::Display for ContactGroupResponsesUnderscoreLinksRelated {
6295 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6296 write!(
6297 f,
6298 "{}",
6299 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6300 )
6301 }
6302}
6303
6304impl tabled::Tabled for ContactGroupResponsesUnderscoreLinksRelated {
6305 const LENGTH: usize = 2;
6306 fn fields(&self) -> Vec<String> {
6307 vec![
6308 if let Some(contacts) = &self.contacts {
6309 format!("{:?}", contacts)
6310 } else {
6311 String::new()
6312 },
6313 if let Some(owner) = &self.owner {
6314 format!("{:?}", owner)
6315 } else {
6316 String::new()
6317 },
6318 ]
6319 }
6320
6321 fn headers() -> Vec<String> {
6322 vec!["contacts".to_string(), "owner".to_string()]
6323 }
6324}
6325
6326#[derive(
6327 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
6328)]
6329pub struct ContactGroupResponsesUnderscoreLinks {
6330 #[doc = "Link to resource"]
6331 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
6332 pub self_: Option<String>,
6333 #[serde(default, skip_serializing_if = "Option::is_none")]
6334 pub related: Option<ContactGroupResponsesUnderscoreLinksRelated>,
6335}
6336
6337impl std::fmt::Display for ContactGroupResponsesUnderscoreLinks {
6338 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6339 write!(
6340 f,
6341 "{}",
6342 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6343 )
6344 }
6345}
6346
6347impl tabled::Tabled for ContactGroupResponsesUnderscoreLinks {
6348 const LENGTH: usize = 2;
6349 fn fields(&self) -> Vec<String> {
6350 vec![
6351 if let Some(self_) = &self.self_ {
6352 format!("{:?}", self_)
6353 } else {
6354 String::new()
6355 },
6356 if let Some(related) = &self.related {
6357 format!("{:?}", related)
6358 } else {
6359 String::new()
6360 },
6361 ]
6362 }
6363
6364 fn headers() -> Vec<String> {
6365 vec!["self_".to_string(), "related".to_string()]
6366 }
6367}
6368
6369#[derive(
6370 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6371)]
6372pub struct ContactGroupResponses {
6373 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
6374 pub underscore_links: Option<ContactGroupResponsesUnderscoreLinks>,
6375 #[doc = "Unique identifier of the group"]
6376 #[serde(default, skip_serializing_if = "Option::is_none")]
6377 pub id: Option<String>,
6378 #[doc = "Name of the group"]
6379 #[serde(default, skip_serializing_if = "Option::is_none")]
6380 pub name: Option<String>,
6381 #[doc = "Whether or not the contact is individual"]
6382 #[serde(default, skip_serializing_if = "Option::is_none")]
6383 pub is_private: Option<bool>,
6384}
6385
6386impl std::fmt::Display for ContactGroupResponses {
6387 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6388 write!(
6389 f,
6390 "{}",
6391 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6392 )
6393 }
6394}
6395
6396impl tabled::Tabled for ContactGroupResponses {
6397 const LENGTH: usize = 4;
6398 fn fields(&self) -> Vec<String> {
6399 vec![
6400 if let Some(underscore_links) = &self.underscore_links {
6401 format!("{:?}", underscore_links)
6402 } else {
6403 String::new()
6404 },
6405 if let Some(id) = &self.id {
6406 format!("{:?}", id)
6407 } else {
6408 String::new()
6409 },
6410 if let Some(name) = &self.name {
6411 format!("{:?}", name)
6412 } else {
6413 String::new()
6414 },
6415 if let Some(is_private) = &self.is_private {
6416 format!("{:?}", is_private)
6417 } else {
6418 String::new()
6419 },
6420 ]
6421 }
6422
6423 fn headers() -> Vec<String> {
6424 vec![
6425 "underscore_links".to_string(),
6426 "id".to_string(),
6427 "name".to_string(),
6428 "is_private".to_string(),
6429 ]
6430 }
6431}
6432
6433#[derive(
6434 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6435)]
6436pub struct ContactNoteResponses {
6437 #[doc = "A teammate is a user in Front."]
6438 #[serde(default, skip_serializing_if = "Option::is_none")]
6439 pub author: Option<TeammateResponse>,
6440 #[doc = "Content of the note"]
6441 #[serde(default, skip_serializing_if = "Option::is_none")]
6442 pub body: Option<String>,
6443 #[doc = "Date at which the note have been created"]
6444 #[serde(default, skip_serializing_if = "Option::is_none")]
6445 pub created_at: Option<i64>,
6446}
6447
6448impl std::fmt::Display for ContactNoteResponses {
6449 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6450 write!(
6451 f,
6452 "{}",
6453 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6454 )
6455 }
6456}
6457
6458impl tabled::Tabled for ContactNoteResponses {
6459 const LENGTH: usize = 3;
6460 fn fields(&self) -> Vec<String> {
6461 vec![
6462 if let Some(author) = &self.author {
6463 format!("{:?}", author)
6464 } else {
6465 String::new()
6466 },
6467 if let Some(body) = &self.body {
6468 format!("{:?}", body)
6469 } else {
6470 String::new()
6471 },
6472 if let Some(created_at) = &self.created_at {
6473 format!("{:?}", created_at)
6474 } else {
6475 String::new()
6476 },
6477 ]
6478 }
6479
6480 fn headers() -> Vec<String> {
6481 vec![
6482 "author".to_string(),
6483 "body".to_string(),
6484 "created_at".to_string(),
6485 ]
6486 }
6487}
6488
6489#[derive(
6490 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
6491)]
6492pub struct ChannelResponseUnderscoreLinksRelated {
6493 #[doc = "Link to channel inbox"]
6494 #[serde(default, skip_serializing_if = "Option::is_none")]
6495 pub inbox: Option<String>,
6496 #[doc = "Link to channel owner"]
6497 #[serde(default, skip_serializing_if = "Option::is_none")]
6498 pub owner: Option<String>,
6499}
6500
6501impl std::fmt::Display for ChannelResponseUnderscoreLinksRelated {
6502 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6503 write!(
6504 f,
6505 "{}",
6506 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6507 )
6508 }
6509}
6510
6511impl tabled::Tabled for ChannelResponseUnderscoreLinksRelated {
6512 const LENGTH: usize = 2;
6513 fn fields(&self) -> Vec<String> {
6514 vec![
6515 if let Some(inbox) = &self.inbox {
6516 format!("{:?}", inbox)
6517 } else {
6518 String::new()
6519 },
6520 if let Some(owner) = &self.owner {
6521 format!("{:?}", owner)
6522 } else {
6523 String::new()
6524 },
6525 ]
6526 }
6527
6528 fn headers() -> Vec<String> {
6529 vec!["inbox".to_string(), "owner".to_string()]
6530 }
6531}
6532
6533#[derive(
6534 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
6535)]
6536pub struct ChannelResponseUnderscoreLinks {
6537 #[doc = "Link to resource"]
6538 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
6539 pub self_: Option<String>,
6540 #[serde(default, skip_serializing_if = "Option::is_none")]
6541 pub related: Option<ChannelResponseUnderscoreLinksRelated>,
6542}
6543
6544impl std::fmt::Display for ChannelResponseUnderscoreLinks {
6545 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6546 write!(
6547 f,
6548 "{}",
6549 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6550 )
6551 }
6552}
6553
6554impl tabled::Tabled for ChannelResponseUnderscoreLinks {
6555 const LENGTH: usize = 2;
6556 fn fields(&self) -> Vec<String> {
6557 vec![
6558 if let Some(self_) = &self.self_ {
6559 format!("{:?}", self_)
6560 } else {
6561 String::new()
6562 },
6563 if let Some(related) = &self.related {
6564 format!("{:?}", related)
6565 } else {
6566 String::new()
6567 },
6568 ]
6569 }
6570
6571 fn headers() -> Vec<String> {
6572 vec!["self_".to_string(), "related".to_string()]
6573 }
6574}
6575
6576#[doc = "Type of the channel"]
6577#[derive(
6578 serde :: Serialize,
6579 serde :: Deserialize,
6580 PartialEq,
6581 Eq,
6582 Hash,
6583 Debug,
6584 Clone,
6585 schemars :: JsonSchema,
6586 tabled :: Tabled,
6587 clap :: ValueEnum,
6588 parse_display :: FromStr,
6589 parse_display :: Display,
6590)]
6591pub enum Types {
6592 #[serde(rename = "smtp")]
6593 #[display("smtp")]
6594 Smtp,
6595 #[serde(rename = "imap")]
6596 #[display("imap")]
6597 Imap,
6598 #[serde(rename = "twilio")]
6599 #[display("twilio")]
6600 Twilio,
6601 #[serde(rename = "twitter")]
6602 #[display("twitter")]
6603 Twitter,
6604 #[serde(rename = "facebook")]
6605 #[display("facebook")]
6606 Facebook,
6607 #[serde(rename = "smooch")]
6608 #[display("smooch")]
6609 Smooch,
6610 #[serde(rename = "intercom")]
6611 #[display("intercom")]
6612 Intercom,
6613 #[serde(rename = "truly")]
6614 #[display("truly")]
6615 Truly,
6616 #[serde(rename = "custom")]
6617 #[display("custom")]
6618 Custom,
6619}
6620
6621#[doc = "Channel settings"]
6622#[derive(
6623 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
6624)]
6625pub struct ChannelResponseSettings {
6626 #[doc = "The time (measured in seconds) that users have to undo a send operation in the \
6627 channel."]
6628 #[serde(default, skip_serializing_if = "Option::is_none")]
6629 pub undo_send_time: Option<i64>,
6630 #[doc = "Whether teammates without inbox access can reply on this channel. Only present for \
6631 shared channels; omitted for private channels."]
6632 #[serde(default, skip_serializing_if = "Option::is_none")]
6633 pub all_teammates_can_reply: Option<bool>,
6634}
6635
6636impl std::fmt::Display for ChannelResponseSettings {
6637 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6638 write!(
6639 f,
6640 "{}",
6641 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6642 )
6643 }
6644}
6645
6646impl tabled::Tabled for ChannelResponseSettings {
6647 const LENGTH: usize = 2;
6648 fn fields(&self) -> Vec<String> {
6649 vec![
6650 if let Some(undo_send_time) = &self.undo_send_time {
6651 format!("{:?}", undo_send_time)
6652 } else {
6653 String::new()
6654 },
6655 if let Some(all_teammates_can_reply) = &self.all_teammates_can_reply {
6656 format!("{:?}", all_teammates_can_reply)
6657 } else {
6658 String::new()
6659 },
6660 ]
6661 }
6662
6663 fn headers() -> Vec<String> {
6664 vec![
6665 "undo_send_time".to_string(),
6666 "all_teammates_can_reply".to_string(),
6667 ]
6668 }
6669}
6670
6671#[derive(
6672 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6673)]
6674pub struct ChannelResponse {
6675 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
6676 pub underscore_links: Option<ChannelResponseUnderscoreLinks>,
6677 #[doc = "Unique identifier for the channel"]
6678 #[serde(default, skip_serializing_if = "Option::is_none")]
6679 pub id: Option<String>,
6680 #[doc = "Address receiving the messages"]
6681 #[serde(default, skip_serializing_if = "Option::is_none")]
6682 pub address: Option<String>,
6683 #[doc = "Type of the channel"]
6684 #[serde(default, skip_serializing_if = "Option::is_none")]
6685 pub types: Option<Types>,
6686 #[doc = "Address which appears as the sender for messages sent from Front"]
6687 #[serde(default, skip_serializing_if = "Option::is_none")]
6688 pub send_as: Option<String>,
6689 #[doc = "Channel settings"]
6690 #[serde(default, skip_serializing_if = "Option::is_none")]
6691 pub settings: Option<ChannelResponseSettings>,
6692 #[doc = "Whether or not the channel is individual"]
6693 #[serde(default, skip_serializing_if = "Option::is_none")]
6694 pub is_private: Option<bool>,
6695 #[doc = "Whether or not the channel configuration is valid"]
6696 #[serde(default, skip_serializing_if = "Option::is_none")]
6697 pub is_valid: Option<bool>,
6698}
6699
6700impl std::fmt::Display for ChannelResponse {
6701 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6702 write!(
6703 f,
6704 "{}",
6705 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6706 )
6707 }
6708}
6709
6710impl tabled::Tabled for ChannelResponse {
6711 const LENGTH: usize = 8;
6712 fn fields(&self) -> Vec<String> {
6713 vec![
6714 if let Some(underscore_links) = &self.underscore_links {
6715 format!("{:?}", underscore_links)
6716 } else {
6717 String::new()
6718 },
6719 if let Some(id) = &self.id {
6720 format!("{:?}", id)
6721 } else {
6722 String::new()
6723 },
6724 if let Some(address) = &self.address {
6725 format!("{:?}", address)
6726 } else {
6727 String::new()
6728 },
6729 if let Some(types) = &self.types {
6730 format!("{:?}", types)
6731 } else {
6732 String::new()
6733 },
6734 if let Some(send_as) = &self.send_as {
6735 format!("{:?}", send_as)
6736 } else {
6737 String::new()
6738 },
6739 if let Some(settings) = &self.settings {
6740 format!("{:?}", settings)
6741 } else {
6742 String::new()
6743 },
6744 if let Some(is_private) = &self.is_private {
6745 format!("{:?}", is_private)
6746 } else {
6747 String::new()
6748 },
6749 if let Some(is_valid) = &self.is_valid {
6750 format!("{:?}", is_valid)
6751 } else {
6752 String::new()
6753 },
6754 ]
6755 }
6756
6757 fn headers() -> Vec<String> {
6758 vec![
6759 "underscore_links".to_string(),
6760 "id".to_string(),
6761 "address".to_string(),
6762 "types".to_string(),
6763 "send_as".to_string(),
6764 "settings".to_string(),
6765 "is_private".to_string(),
6766 "is_valid".to_string(),
6767 ]
6768 }
6769}
6770
6771#[derive(
6772 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
6773)]
6774pub struct CommentResponseUnderscoreLinksRelated {
6775 #[doc = "Link to comment's conversation"]
6776 #[serde(default, skip_serializing_if = "Option::is_none")]
6777 pub conversations: Option<String>,
6778 #[doc = "Link to comment mentions"]
6779 #[serde(default, skip_serializing_if = "Option::is_none")]
6780 pub mentions: Option<String>,
6781}
6782
6783impl std::fmt::Display for CommentResponseUnderscoreLinksRelated {
6784 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6785 write!(
6786 f,
6787 "{}",
6788 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6789 )
6790 }
6791}
6792
6793impl tabled::Tabled for CommentResponseUnderscoreLinksRelated {
6794 const LENGTH: usize = 2;
6795 fn fields(&self) -> Vec<String> {
6796 vec![
6797 if let Some(conversations) = &self.conversations {
6798 format!("{:?}", conversations)
6799 } else {
6800 String::new()
6801 },
6802 if let Some(mentions) = &self.mentions {
6803 format!("{:?}", mentions)
6804 } else {
6805 String::new()
6806 },
6807 ]
6808 }
6809
6810 fn headers() -> Vec<String> {
6811 vec!["conversations".to_string(), "mentions".to_string()]
6812 }
6813}
6814
6815#[derive(
6816 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
6817)]
6818pub struct CommentResponseUnderscoreLinks {
6819 #[doc = "Link to resource"]
6820 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
6821 pub self_: Option<String>,
6822 #[serde(default, skip_serializing_if = "Option::is_none")]
6823 pub related: Option<CommentResponseUnderscoreLinksRelated>,
6824}
6825
6826impl std::fmt::Display for CommentResponseUnderscoreLinks {
6827 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6828 write!(
6829 f,
6830 "{}",
6831 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6832 )
6833 }
6834}
6835
6836impl tabled::Tabled for CommentResponseUnderscoreLinks {
6837 const LENGTH: usize = 2;
6838 fn fields(&self) -> Vec<String> {
6839 vec![
6840 if let Some(self_) = &self.self_ {
6841 format!("{:?}", self_)
6842 } else {
6843 String::new()
6844 },
6845 if let Some(related) = &self.related {
6846 format!("{:?}", related)
6847 } else {
6848 String::new()
6849 },
6850 ]
6851 }
6852
6853 fn headers() -> Vec<String> {
6854 vec!["self_".to_string(), "related".to_string()]
6855 }
6856}
6857
6858#[derive(
6859 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6860)]
6861pub struct CommentResponse {
6862 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
6863 pub underscore_links: Option<CommentResponseUnderscoreLinks>,
6864 #[doc = "Unique identifier of the comment"]
6865 #[serde(default, skip_serializing_if = "Option::is_none")]
6866 pub id: Option<String>,
6867 #[doc = "A teammate is a user in Front."]
6868 #[serde(default, skip_serializing_if = "Option::is_none")]
6869 pub author: Option<TeammateResponse>,
6870 #[doc = "Content of the comment"]
6871 #[serde(default, skip_serializing_if = "Option::is_none")]
6872 pub body: Option<String>,
6873 #[doc = "Date at which the comment was posted"]
6874 #[serde(default, skip_serializing_if = "Option::is_none")]
6875 pub posted_at: Option<i64>,
6876 #[doc = "List of files attached to the comment"]
6877 #[serde(default, skip_serializing_if = "Option::is_none")]
6878 pub attachments: Option<Vec<Attachment>>,
6879}
6880
6881impl std::fmt::Display for CommentResponse {
6882 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6883 write!(
6884 f,
6885 "{}",
6886 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6887 )
6888 }
6889}
6890
6891impl tabled::Tabled for CommentResponse {
6892 const LENGTH: usize = 6;
6893 fn fields(&self) -> Vec<String> {
6894 vec![
6895 if let Some(underscore_links) = &self.underscore_links {
6896 format!("{:?}", underscore_links)
6897 } else {
6898 String::new()
6899 },
6900 if let Some(id) = &self.id {
6901 format!("{:?}", id)
6902 } else {
6903 String::new()
6904 },
6905 if let Some(author) = &self.author {
6906 format!("{:?}", author)
6907 } else {
6908 String::new()
6909 },
6910 if let Some(body) = &self.body {
6911 format!("{:?}", body)
6912 } else {
6913 String::new()
6914 },
6915 if let Some(posted_at) = &self.posted_at {
6916 format!("{:?}", posted_at)
6917 } else {
6918 String::new()
6919 },
6920 if let Some(attachments) = &self.attachments {
6921 format!("{:?}", attachments)
6922 } else {
6923 String::new()
6924 },
6925 ]
6926 }
6927
6928 fn headers() -> Vec<String> {
6929 vec![
6930 "underscore_links".to_string(),
6931 "id".to_string(),
6932 "author".to_string(),
6933 "body".to_string(),
6934 "posted_at".to_string(),
6935 "attachments".to_string(),
6936 ]
6937 }
6938}
6939
6940#[derive(
6941 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
6942)]
6943pub struct ContactResponseUnderscoreLinksRelated {
6944 #[doc = "Link to contact notes"]
6945 #[serde(default, skip_serializing_if = "Option::is_none")]
6946 pub notes: Option<String>,
6947 #[doc = "Link to contact conversations"]
6948 #[serde(default, skip_serializing_if = "Option::is_none")]
6949 pub conversations: Option<String>,
6950 #[doc = "Link to contact owner"]
6951 #[serde(default, skip_serializing_if = "Option::is_none")]
6952 pub owner: Option<String>,
6953}
6954
6955impl std::fmt::Display for ContactResponseUnderscoreLinksRelated {
6956 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6957 write!(
6958 f,
6959 "{}",
6960 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6961 )
6962 }
6963}
6964
6965impl tabled::Tabled for ContactResponseUnderscoreLinksRelated {
6966 const LENGTH: usize = 3;
6967 fn fields(&self) -> Vec<String> {
6968 vec![
6969 if let Some(notes) = &self.notes {
6970 format!("{:?}", notes)
6971 } else {
6972 String::new()
6973 },
6974 if let Some(conversations) = &self.conversations {
6975 format!("{:?}", conversations)
6976 } else {
6977 String::new()
6978 },
6979 if let Some(owner) = &self.owner {
6980 format!("{:?}", owner)
6981 } else {
6982 String::new()
6983 },
6984 ]
6985 }
6986
6987 fn headers() -> Vec<String> {
6988 vec![
6989 "notes".to_string(),
6990 "conversations".to_string(),
6991 "owner".to_string(),
6992 ]
6993 }
6994}
6995
6996#[derive(
6997 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
6998)]
6999pub struct ContactResponseUnderscoreLinks {
7000 #[doc = "Link to resource"]
7001 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
7002 pub self_: Option<String>,
7003 #[serde(default, skip_serializing_if = "Option::is_none")]
7004 pub related: Option<ContactResponseUnderscoreLinksRelated>,
7005}
7006
7007impl std::fmt::Display for ContactResponseUnderscoreLinks {
7008 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7009 write!(
7010 f,
7011 "{}",
7012 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7013 )
7014 }
7015}
7016
7017impl tabled::Tabled for ContactResponseUnderscoreLinks {
7018 const LENGTH: usize = 2;
7019 fn fields(&self) -> Vec<String> {
7020 vec![
7021 if let Some(self_) = &self.self_ {
7022 format!("{:?}", self_)
7023 } else {
7024 String::new()
7025 },
7026 if let Some(related) = &self.related {
7027 format!("{:?}", related)
7028 } else {
7029 String::new()
7030 },
7031 ]
7032 }
7033
7034 fn headers() -> Vec<String> {
7035 vec!["self_".to_string(), "related".to_string()]
7036 }
7037}
7038
7039#[derive(
7040 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
7041)]
7042pub struct ContactResponse {
7043 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
7044 pub underscore_links: Option<ContactResponseUnderscoreLinks>,
7045 #[doc = "Unique identifier of the contact"]
7046 #[serde(default, skip_serializing_if = "Option::is_none")]
7047 pub id: Option<String>,
7048 #[doc = "Contact name"]
7049 #[serde(default, skip_serializing_if = "Option::is_none")]
7050 pub name: Option<String>,
7051 #[doc = "Contact description"]
7052 #[serde(default, skip_serializing_if = "Option::is_none")]
7053 pub description: Option<String>,
7054 #[doc = "URL of the contact's avatar"]
7055 #[serde(default, skip_serializing_if = "Option::is_none")]
7056 pub avatar_url: Option<String>,
7057 #[doc = "Whether or not the contact is marked as a spammer"]
7058 #[serde(default, skip_serializing_if = "Option::is_none")]
7059 pub is_spammer: Option<bool>,
7060 #[doc = "List of all the links of the contact"]
7061 #[serde(default, skip_serializing_if = "Option::is_none")]
7062 pub links: Option<Vec<String>>,
7063 #[doc = "List of the groups the contact belongs to."]
7064 #[serde(default, skip_serializing_if = "Option::is_none")]
7065 pub groups: Option<Vec<ContactGroupResponses>>,
7066 #[doc = "List of the handles and sources with which the contact is reachable."]
7067 #[serde(default, skip_serializing_if = "Option::is_none")]
7068 pub handles: Option<Vec<ContactHandle>>,
7069 #[doc = "Custom field attributes for this contact."]
7070 #[serde(default, skip_serializing_if = "Option::is_none")]
7071 pub custom_fields: Option<std::collections::HashMap<String, String>>,
7072 #[doc = "Whether or not the contact is individual"]
7073 #[serde(default, skip_serializing_if = "Option::is_none")]
7074 pub is_private: Option<bool>,
7075}
7076
7077impl std::fmt::Display for ContactResponse {
7078 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7079 write!(
7080 f,
7081 "{}",
7082 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7083 )
7084 }
7085}
7086
7087impl tabled::Tabled for ContactResponse {
7088 const LENGTH: usize = 11;
7089 fn fields(&self) -> Vec<String> {
7090 vec![
7091 if let Some(underscore_links) = &self.underscore_links {
7092 format!("{:?}", underscore_links)
7093 } else {
7094 String::new()
7095 },
7096 if let Some(id) = &self.id {
7097 format!("{:?}", id)
7098 } else {
7099 String::new()
7100 },
7101 if let Some(name) = &self.name {
7102 format!("{:?}", name)
7103 } else {
7104 String::new()
7105 },
7106 if let Some(description) = &self.description {
7107 format!("{:?}", description)
7108 } else {
7109 String::new()
7110 },
7111 if let Some(avatar_url) = &self.avatar_url {
7112 format!("{:?}", avatar_url)
7113 } else {
7114 String::new()
7115 },
7116 if let Some(is_spammer) = &self.is_spammer {
7117 format!("{:?}", is_spammer)
7118 } else {
7119 String::new()
7120 },
7121 if let Some(links) = &self.links {
7122 format!("{:?}", links)
7123 } else {
7124 String::new()
7125 },
7126 if let Some(groups) = &self.groups {
7127 format!("{:?}", groups)
7128 } else {
7129 String::new()
7130 },
7131 if let Some(handles) = &self.handles {
7132 format!("{:?}", handles)
7133 } else {
7134 String::new()
7135 },
7136 if let Some(custom_fields) = &self.custom_fields {
7137 format!("{:?}", custom_fields)
7138 } else {
7139 String::new()
7140 },
7141 if let Some(is_private) = &self.is_private {
7142 format!("{:?}", is_private)
7143 } else {
7144 String::new()
7145 },
7146 ]
7147 }
7148
7149 fn headers() -> Vec<String> {
7150 vec![
7151 "underscore_links".to_string(),
7152 "id".to_string(),
7153 "name".to_string(),
7154 "description".to_string(),
7155 "avatar_url".to_string(),
7156 "is_spammer".to_string(),
7157 "links".to_string(),
7158 "groups".to_string(),
7159 "handles".to_string(),
7160 "custom_fields".to_string(),
7161 "is_private".to_string(),
7162 ]
7163 }
7164}
7165
7166#[derive(
7167 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
7168)]
7169pub struct ConversationResponseUnderscoreLinksRelated {
7170 #[doc = "Link to conversation events"]
7171 #[serde(default, skip_serializing_if = "Option::is_none")]
7172 pub events: Option<String>,
7173 #[doc = "Link to conversation followers"]
7174 #[serde(default, skip_serializing_if = "Option::is_none")]
7175 pub followers: Option<String>,
7176 #[doc = "Link to conversation messages"]
7177 #[serde(default, skip_serializing_if = "Option::is_none")]
7178 pub messages: Option<String>,
7179 #[doc = "Link to conversation comment"]
7180 #[serde(default, skip_serializing_if = "Option::is_none")]
7181 pub comments: Option<String>,
7182 #[doc = "Link to conversation inboxes"]
7183 #[serde(default, skip_serializing_if = "Option::is_none")]
7184 pub inboxes: Option<String>,
7185 #[doc = "Link to last message of the conversation"]
7186 #[serde(default, skip_serializing_if = "Option::is_none")]
7187 pub last_message: Option<String>,
7188}
7189
7190impl std::fmt::Display for ConversationResponseUnderscoreLinksRelated {
7191 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7192 write!(
7193 f,
7194 "{}",
7195 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7196 )
7197 }
7198}
7199
7200impl tabled::Tabled for ConversationResponseUnderscoreLinksRelated {
7201 const LENGTH: usize = 6;
7202 fn fields(&self) -> Vec<String> {
7203 vec![
7204 if let Some(events) = &self.events {
7205 format!("{:?}", events)
7206 } else {
7207 String::new()
7208 },
7209 if let Some(followers) = &self.followers {
7210 format!("{:?}", followers)
7211 } else {
7212 String::new()
7213 },
7214 if let Some(messages) = &self.messages {
7215 format!("{:?}", messages)
7216 } else {
7217 String::new()
7218 },
7219 if let Some(comments) = &self.comments {
7220 format!("{:?}", comments)
7221 } else {
7222 String::new()
7223 },
7224 if let Some(inboxes) = &self.inboxes {
7225 format!("{:?}", inboxes)
7226 } else {
7227 String::new()
7228 },
7229 if let Some(last_message) = &self.last_message {
7230 format!("{:?}", last_message)
7231 } else {
7232 String::new()
7233 },
7234 ]
7235 }
7236
7237 fn headers() -> Vec<String> {
7238 vec![
7239 "events".to_string(),
7240 "followers".to_string(),
7241 "messages".to_string(),
7242 "comments".to_string(),
7243 "inboxes".to_string(),
7244 "last_message".to_string(),
7245 ]
7246 }
7247}
7248
7249#[derive(
7250 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
7251)]
7252pub struct ConversationResponseUnderscoreLinks {
7253 #[doc = "Link to resource"]
7254 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
7255 pub self_: Option<String>,
7256 #[serde(default, skip_serializing_if = "Option::is_none")]
7257 pub related: Option<ConversationResponseUnderscoreLinksRelated>,
7258}
7259
7260impl std::fmt::Display for ConversationResponseUnderscoreLinks {
7261 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7262 write!(
7263 f,
7264 "{}",
7265 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7266 )
7267 }
7268}
7269
7270impl tabled::Tabled for ConversationResponseUnderscoreLinks {
7271 const LENGTH: usize = 2;
7272 fn fields(&self) -> Vec<String> {
7273 vec![
7274 if let Some(self_) = &self.self_ {
7275 format!("{:?}", self_)
7276 } else {
7277 String::new()
7278 },
7279 if let Some(related) = &self.related {
7280 format!("{:?}", related)
7281 } else {
7282 String::new()
7283 },
7284 ]
7285 }
7286
7287 fn headers() -> Vec<String> {
7288 vec!["self_".to_string(), "related".to_string()]
7289 }
7290}
7291
7292#[doc = "Status of the conversation"]
7293#[derive(
7294 serde :: Serialize,
7295 serde :: Deserialize,
7296 PartialEq,
7297 Eq,
7298 Hash,
7299 Debug,
7300 Clone,
7301 schemars :: JsonSchema,
7302 tabled :: Tabled,
7303 clap :: ValueEnum,
7304 parse_display :: FromStr,
7305 parse_display :: Display,
7306)]
7307pub enum ConversationResponseStatus {
7308 #[serde(rename = "archived")]
7309 #[display("archived")]
7310 Archived,
7311 #[serde(rename = "unassigned")]
7312 #[display("unassigned")]
7313 Unassigned,
7314 #[serde(rename = "deleted")]
7315 #[display("deleted")]
7316 Deleted,
7317 #[serde(rename = "assigned")]
7318 #[display("assigned")]
7319 Assigned,
7320}
7321
7322#[doc = "Optional metadata about the conversation"]
7323#[derive(
7324 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
7325)]
7326pub struct ConversationResponseMetadata {
7327 #[doc = "List of external_ids for partner channel associated with the conversation. Only \
7328 present for partner channel token authenticated requests."]
7329 #[serde(default, skip_serializing_if = "Option::is_none")]
7330 pub external_conversation_ids: Option<Vec<String>>,
7331}
7332
7333impl std::fmt::Display for ConversationResponseMetadata {
7334 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7335 write!(
7336 f,
7337 "{}",
7338 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7339 )
7340 }
7341}
7342
7343impl tabled::Tabled for ConversationResponseMetadata {
7344 const LENGTH: usize = 1;
7345 fn fields(&self) -> Vec<String> {
7346 vec![
7347 if let Some(external_conversation_ids) = &self.external_conversation_ids {
7348 format!("{:?}", external_conversation_ids)
7349 } else {
7350 String::new()
7351 },
7352 ]
7353 }
7354
7355 fn headers() -> Vec<String> {
7356 vec!["external_conversation_ids".to_string()]
7357 }
7358}
7359
7360#[derive(
7361 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
7362)]
7363pub struct ConversationResponse {
7364 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
7365 pub underscore_links: Option<ConversationResponseUnderscoreLinks>,
7366 #[doc = "Unique identifier of the message"]
7367 #[serde(default, skip_serializing_if = "Option::is_none")]
7368 pub id: Option<String>,
7369 #[doc = "Subject of the message for email message"]
7370 #[serde(default, skip_serializing_if = "Option::is_none")]
7371 pub subject: Option<String>,
7372 #[doc = "Status of the conversation"]
7373 #[serde(default, skip_serializing_if = "Option::is_none")]
7374 pub status: Option<ConversationResponseStatus>,
7375 #[doc = "A teammate is a user in Front."]
7376 #[serde(default, skip_serializing_if = "Option::is_none")]
7377 pub assignee: Option<TeammateResponse>,
7378 #[serde(default, skip_serializing_if = "Option::is_none")]
7379 pub recipient: Option<RecipientResponse>,
7380 #[doc = "List of the tags for this conversation"]
7381 #[serde(default, skip_serializing_if = "Option::is_none")]
7382 pub tags: Option<Vec<TagResponse>>,
7383 #[doc = "List of the links for this conversation"]
7384 #[serde(default, skip_serializing_if = "Option::is_none")]
7385 pub links: Option<Vec<LinkResponse>>,
7386 #[doc = "Timestamp at which the conversation have been created."]
7387 #[serde(default, skip_serializing_if = "Option::is_none")]
7388 pub created_at: Option<i64>,
7389 #[doc = "Whether or not the conversation is private"]
7390 #[serde(default, skip_serializing_if = "Option::is_none")]
7391 pub is_private: Option<bool>,
7392 #[doc = "List of scheduled (non-expired and non-canceled) reminders for this conversation"]
7393 #[serde(default, skip_serializing_if = "Option::is_none")]
7394 pub scheduled_reminders: Option<Vec<Reminder>>,
7395 #[doc = "Optional metadata about the conversation"]
7396 #[serde(default, skip_serializing_if = "Option::is_none")]
7397 pub metadata: Option<ConversationResponseMetadata>,
7398}
7399
7400impl std::fmt::Display for ConversationResponse {
7401 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7402 write!(
7403 f,
7404 "{}",
7405 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7406 )
7407 }
7408}
7409
7410impl tabled::Tabled for ConversationResponse {
7411 const LENGTH: usize = 12;
7412 fn fields(&self) -> Vec<String> {
7413 vec![
7414 if let Some(underscore_links) = &self.underscore_links {
7415 format!("{:?}", underscore_links)
7416 } else {
7417 String::new()
7418 },
7419 if let Some(id) = &self.id {
7420 format!("{:?}", id)
7421 } else {
7422 String::new()
7423 },
7424 if let Some(subject) = &self.subject {
7425 format!("{:?}", subject)
7426 } else {
7427 String::new()
7428 },
7429 if let Some(status) = &self.status {
7430 format!("{:?}", status)
7431 } else {
7432 String::new()
7433 },
7434 if let Some(assignee) = &self.assignee {
7435 format!("{:?}", assignee)
7436 } else {
7437 String::new()
7438 },
7439 if let Some(recipient) = &self.recipient {
7440 format!("{:?}", recipient)
7441 } else {
7442 String::new()
7443 },
7444 if let Some(tags) = &self.tags {
7445 format!("{:?}", tags)
7446 } else {
7447 String::new()
7448 },
7449 if let Some(links) = &self.links {
7450 format!("{:?}", links)
7451 } else {
7452 String::new()
7453 },
7454 if let Some(created_at) = &self.created_at {
7455 format!("{:?}", created_at)
7456 } else {
7457 String::new()
7458 },
7459 if let Some(is_private) = &self.is_private {
7460 format!("{:?}", is_private)
7461 } else {
7462 String::new()
7463 },
7464 if let Some(scheduled_reminders) = &self.scheduled_reminders {
7465 format!("{:?}", scheduled_reminders)
7466 } else {
7467 String::new()
7468 },
7469 if let Some(metadata) = &self.metadata {
7470 format!("{:?}", metadata)
7471 } else {
7472 String::new()
7473 },
7474 ]
7475 }
7476
7477 fn headers() -> Vec<String> {
7478 vec![
7479 "underscore_links".to_string(),
7480 "id".to_string(),
7481 "subject".to_string(),
7482 "status".to_string(),
7483 "assignee".to_string(),
7484 "recipient".to_string(),
7485 "tags".to_string(),
7486 "links".to_string(),
7487 "created_at".to_string(),
7488 "is_private".to_string(),
7489 "scheduled_reminders".to_string(),
7490 "metadata".to_string(),
7491 ]
7492 }
7493}
7494
7495#[derive(
7496 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
7497)]
7498pub struct CustomFieldResponseUnderscoreLinks {
7499 #[doc = "Link to resource"]
7500 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
7501 pub self_: Option<String>,
7502}
7503
7504impl std::fmt::Display for CustomFieldResponseUnderscoreLinks {
7505 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7506 write!(
7507 f,
7508 "{}",
7509 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7510 )
7511 }
7512}
7513
7514impl tabled::Tabled for CustomFieldResponseUnderscoreLinks {
7515 const LENGTH: usize = 1;
7516 fn fields(&self) -> Vec<String> {
7517 vec![if let Some(self_) = &self.self_ {
7518 format!("{:?}", self_)
7519 } else {
7520 String::new()
7521 }]
7522 }
7523
7524 fn headers() -> Vec<String> {
7525 vec!["self_".to_string()]
7526 }
7527}
7528
7529#[doc = "Type of the custom field"]
7530#[derive(
7531 serde :: Serialize,
7532 serde :: Deserialize,
7533 PartialEq,
7534 Eq,
7535 Hash,
7536 Debug,
7537 Clone,
7538 schemars :: JsonSchema,
7539 tabled :: Tabled,
7540 clap :: ValueEnum,
7541 parse_display :: FromStr,
7542 parse_display :: Display,
7543)]
7544pub enum CustomFieldResponseType {
7545 #[serde(rename = "string")]
7546 #[display("string")]
7547 String,
7548 #[serde(rename = "boolean")]
7549 #[display("boolean")]
7550 Boolean,
7551 #[serde(rename = "datetime")]
7552 #[display("datetime")]
7553 Datetime,
7554 #[serde(rename = "number")]
7555 #[display("number")]
7556 Number,
7557}
7558
7559#[derive(
7560 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
7561)]
7562pub struct CustomFieldResponse {
7563 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
7564 pub underscore_links: Option<CustomFieldResponseUnderscoreLinks>,
7565 #[doc = "Unique identifier of the custom field"]
7566 #[serde(default, skip_serializing_if = "Option::is_none")]
7567 pub id: Option<String>,
7568 #[doc = "Name of the custom field"]
7569 #[serde(default, skip_serializing_if = "Option::is_none")]
7570 pub name: Option<String>,
7571 #[doc = "Description of the custom field"]
7572 #[serde(default, skip_serializing_if = "Option::is_none")]
7573 pub description: Option<String>,
7574 #[doc = "Type of the custom field"]
7575 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
7576 pub type_: Option<CustomFieldResponseType>,
7577}
7578
7579impl std::fmt::Display for CustomFieldResponse {
7580 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7581 write!(
7582 f,
7583 "{}",
7584 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7585 )
7586 }
7587}
7588
7589impl tabled::Tabled for CustomFieldResponse {
7590 const LENGTH: usize = 5;
7591 fn fields(&self) -> Vec<String> {
7592 vec![
7593 if let Some(underscore_links) = &self.underscore_links {
7594 format!("{:?}", underscore_links)
7595 } else {
7596 String::new()
7597 },
7598 if let Some(id) = &self.id {
7599 format!("{:?}", id)
7600 } else {
7601 String::new()
7602 },
7603 if let Some(name) = &self.name {
7604 format!("{:?}", name)
7605 } else {
7606 String::new()
7607 },
7608 if let Some(description) = &self.description {
7609 format!("{:?}", description)
7610 } else {
7611 String::new()
7612 },
7613 if let Some(type_) = &self.type_ {
7614 format!("{:?}", type_)
7615 } else {
7616 String::new()
7617 },
7618 ]
7619 }
7620
7621 fn headers() -> Vec<String> {
7622 vec![
7623 "underscore_links".to_string(),
7624 "id".to_string(),
7625 "name".to_string(),
7626 "description".to_string(),
7627 "type_".to_string(),
7628 ]
7629 }
7630}
7631
7632#[derive(
7633 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
7634)]
7635pub struct InboxResponseUnderscoreLinksRelated {
7636 #[doc = "Link to inbox teammates"]
7637 #[serde(default, skip_serializing_if = "Option::is_none")]
7638 pub teammates: Option<String>,
7639 #[doc = "Link to inbox conversations"]
7640 #[serde(default, skip_serializing_if = "Option::is_none")]
7641 pub conversations: Option<String>,
7642 #[doc = "Link to inbox channels"]
7643 #[serde(default, skip_serializing_if = "Option::is_none")]
7644 pub channels: Option<String>,
7645 #[doc = "Link to inbox owner"]
7646 #[serde(default, skip_serializing_if = "Option::is_none")]
7647 pub owner: Option<String>,
7648}
7649
7650impl std::fmt::Display for InboxResponseUnderscoreLinksRelated {
7651 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7652 write!(
7653 f,
7654 "{}",
7655 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7656 )
7657 }
7658}
7659
7660impl tabled::Tabled for InboxResponseUnderscoreLinksRelated {
7661 const LENGTH: usize = 4;
7662 fn fields(&self) -> Vec<String> {
7663 vec![
7664 if let Some(teammates) = &self.teammates {
7665 format!("{:?}", teammates)
7666 } else {
7667 String::new()
7668 },
7669 if let Some(conversations) = &self.conversations {
7670 format!("{:?}", conversations)
7671 } else {
7672 String::new()
7673 },
7674 if let Some(channels) = &self.channels {
7675 format!("{:?}", channels)
7676 } else {
7677 String::new()
7678 },
7679 if let Some(owner) = &self.owner {
7680 format!("{:?}", owner)
7681 } else {
7682 String::new()
7683 },
7684 ]
7685 }
7686
7687 fn headers() -> Vec<String> {
7688 vec![
7689 "teammates".to_string(),
7690 "conversations".to_string(),
7691 "channels".to_string(),
7692 "owner".to_string(),
7693 ]
7694 }
7695}
7696
7697#[derive(
7698 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
7699)]
7700pub struct InboxResponseUnderscoreLinks {
7701 #[doc = "Link to resource"]
7702 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
7703 pub self_: Option<String>,
7704 #[serde(default, skip_serializing_if = "Option::is_none")]
7705 pub related: Option<InboxResponseUnderscoreLinksRelated>,
7706}
7707
7708impl std::fmt::Display for InboxResponseUnderscoreLinks {
7709 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7710 write!(
7711 f,
7712 "{}",
7713 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7714 )
7715 }
7716}
7717
7718impl tabled::Tabled for InboxResponseUnderscoreLinks {
7719 const LENGTH: usize = 2;
7720 fn fields(&self) -> Vec<String> {
7721 vec![
7722 if let Some(self_) = &self.self_ {
7723 format!("{:?}", self_)
7724 } else {
7725 String::new()
7726 },
7727 if let Some(related) = &self.related {
7728 format!("{:?}", related)
7729 } else {
7730 String::new()
7731 },
7732 ]
7733 }
7734
7735 fn headers() -> Vec<String> {
7736 vec!["self_".to_string(), "related".to_string()]
7737 }
7738}
7739
7740#[derive(
7741 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
7742)]
7743pub struct InboxResponse {
7744 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
7745 pub underscore_links: Option<InboxResponseUnderscoreLinks>,
7746 #[doc = "Unique identifier for the inbox"]
7747 #[serde(default, skip_serializing_if = "Option::is_none")]
7748 pub id: Option<String>,
7749 #[doc = "Name of the inbox"]
7750 #[serde(default, skip_serializing_if = "Option::is_none")]
7751 pub name: Option<String>,
7752 #[doc = "Whether or not the inbox is individual"]
7753 #[serde(default, skip_serializing_if = "Option::is_none")]
7754 pub is_private: Option<bool>,
7755}
7756
7757impl std::fmt::Display for InboxResponse {
7758 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7759 write!(
7760 f,
7761 "{}",
7762 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7763 )
7764 }
7765}
7766
7767impl tabled::Tabled for InboxResponse {
7768 const LENGTH: usize = 4;
7769 fn fields(&self) -> Vec<String> {
7770 vec![
7771 if let Some(underscore_links) = &self.underscore_links {
7772 format!("{:?}", underscore_links)
7773 } else {
7774 String::new()
7775 },
7776 if let Some(id) = &self.id {
7777 format!("{:?}", id)
7778 } else {
7779 String::new()
7780 },
7781 if let Some(name) = &self.name {
7782 format!("{:?}", name)
7783 } else {
7784 String::new()
7785 },
7786 if let Some(is_private) = &self.is_private {
7787 format!("{:?}", is_private)
7788 } else {
7789 String::new()
7790 },
7791 ]
7792 }
7793
7794 fn headers() -> Vec<String> {
7795 vec![
7796 "underscore_links".to_string(),
7797 "id".to_string(),
7798 "name".to_string(),
7799 "is_private".to_string(),
7800 ]
7801 }
7802}
7803
7804#[derive(
7805 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
7806)]
7807pub struct MessageResponseUnderscoreLinksRelated {
7808 #[doc = "Link to message converation"]
7809 #[serde(default, skip_serializing_if = "Option::is_none")]
7810 pub conversation: Option<String>,
7811 #[doc = "Link to message this message replied to"]
7812 #[serde(default, skip_serializing_if = "Option::is_none")]
7813 pub message_replied_to: Option<String>,
7814 #[doc = "Link to message seen informatiion"]
7815 #[serde(default, skip_serializing_if = "Option::is_none")]
7816 pub message_seen: Option<String>,
7817}
7818
7819impl std::fmt::Display for MessageResponseUnderscoreLinksRelated {
7820 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7821 write!(
7822 f,
7823 "{}",
7824 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7825 )
7826 }
7827}
7828
7829impl tabled::Tabled for MessageResponseUnderscoreLinksRelated {
7830 const LENGTH: usize = 3;
7831 fn fields(&self) -> Vec<String> {
7832 vec![
7833 if let Some(conversation) = &self.conversation {
7834 format!("{:?}", conversation)
7835 } else {
7836 String::new()
7837 },
7838 if let Some(message_replied_to) = &self.message_replied_to {
7839 format!("{:?}", message_replied_to)
7840 } else {
7841 String::new()
7842 },
7843 if let Some(message_seen) = &self.message_seen {
7844 format!("{:?}", message_seen)
7845 } else {
7846 String::new()
7847 },
7848 ]
7849 }
7850
7851 fn headers() -> Vec<String> {
7852 vec![
7853 "conversation".to_string(),
7854 "message_replied_to".to_string(),
7855 "message_seen".to_string(),
7856 ]
7857 }
7858}
7859
7860#[derive(
7861 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
7862)]
7863pub struct MessageResponseUnderscoreLinks {
7864 #[doc = "Link to resource"]
7865 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
7866 pub self_: Option<String>,
7867 #[serde(default, skip_serializing_if = "Option::is_none")]
7868 pub related: Option<MessageResponseUnderscoreLinksRelated>,
7869}
7870
7871impl std::fmt::Display for MessageResponseUnderscoreLinks {
7872 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7873 write!(
7874 f,
7875 "{}",
7876 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7877 )
7878 }
7879}
7880
7881impl tabled::Tabled for MessageResponseUnderscoreLinks {
7882 const LENGTH: usize = 2;
7883 fn fields(&self) -> Vec<String> {
7884 vec![
7885 if let Some(self_) = &self.self_ {
7886 format!("{:?}", self_)
7887 } else {
7888 String::new()
7889 },
7890 if let Some(related) = &self.related {
7891 format!("{:?}", related)
7892 } else {
7893 String::new()
7894 },
7895 ]
7896 }
7897
7898 fn headers() -> Vec<String> {
7899 vec!["self_".to_string(), "related".to_string()]
7900 }
7901}
7902
7903#[doc = "Type of the message"]
7904#[derive(
7905 serde :: Serialize,
7906 serde :: Deserialize,
7907 PartialEq,
7908 Eq,
7909 Hash,
7910 Debug,
7911 Clone,
7912 schemars :: JsonSchema,
7913 tabled :: Tabled,
7914 clap :: ValueEnum,
7915 parse_display :: FromStr,
7916 parse_display :: Display,
7917)]
7918pub enum MessageResponseType {
7919 #[serde(rename = "email")]
7920 #[display("email")]
7921 Email,
7922 #[serde(rename = "tweet")]
7923 #[display("tweet")]
7924 Tweet,
7925 #[serde(rename = "sms")]
7926 #[display("sms")]
7927 Sms,
7928 #[serde(rename = "smooch")]
7929 #[display("smooch")]
7930 Smooch,
7931 #[serde(rename = "facebook")]
7932 #[display("facebook")]
7933 Facebook,
7934 #[serde(rename = "intercom")]
7935 #[display("intercom")]
7936 Intercom,
7937 #[serde(rename = "truly-call")]
7938 #[display("truly-call")]
7939 TrulyCall,
7940 #[serde(rename = "custom")]
7941 #[display("custom")]
7942 Custom,
7943}
7944
7945#[doc = "If the message is a draft, describes the draft mode. Can be 'private' (draft is visible \
7946 to the author only) or 'shared' (draft is visible to all teammates with access to the \
7947 conversation)."]
7948#[derive(
7949 serde :: Serialize,
7950 serde :: Deserialize,
7951 PartialEq,
7952 Eq,
7953 Hash,
7954 Debug,
7955 Clone,
7956 schemars :: JsonSchema,
7957 tabled :: Tabled,
7958 clap :: ValueEnum,
7959 parse_display :: FromStr,
7960 parse_display :: Display,
7961)]
7962pub enum DraftMode {
7963 #[serde(rename = "shared")]
7964 #[display("shared")]
7965 Shared,
7966 #[serde(rename = "private")]
7967 #[display("private")]
7968 Private,
7969}
7970
7971#[doc = "Optional metadata about the message"]
7972#[derive(
7973 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
7974)]
7975pub struct MessageResponseMetadata {
7976 #[doc = "For `intercom` messages only. URL of the Intercom conversation the message is \
7977 comming from."]
7978 #[serde(default, skip_serializing_if = "Option::is_none")]
7979 pub intercom_url: Option<String>,
7980 #[doc = "For `truly-call` messages only. Length of the call in seconds."]
7981 #[serde(default, skip_serializing_if = "Option::is_none")]
7982 pub duration: Option<i64>,
7983 #[doc = "For `truly-call` messages only. Whether or not the call have been answered."]
7984 #[serde(default, skip_serializing_if = "Option::is_none")]
7985 pub have_been_answered: Option<bool>,
7986 #[doc = "For `tweet` or 'custom' (partner channel token authenticated) messages only. Unique \
7987 message identifier in the underlying provider (Twitter or Partner). For custom \
7988 messages, only present for partner channel token authenticated requests."]
7989 #[serde(default, skip_serializing_if = "Option::is_none")]
7990 pub external_id: Option<String>,
7991 #[doc = "For `tweet` messages only. URL of the tweet."]
7992 #[serde(default, skip_serializing_if = "Option::is_none")]
7993 pub twitter_url: Option<String>,
7994 #[doc = "For `tweet` messages only. Whether or not the tweet is a retweet."]
7995 #[serde(default, skip_serializing_if = "Option::is_none")]
7996 pub is_retweet: Option<bool>,
7997 #[doc = "For `tweet` messages only. Whether or not the tweet have been retweeted."]
7998 #[serde(default, skip_serializing_if = "Option::is_none")]
7999 pub have_been_retweeted: Option<bool>,
8000 #[doc = "For `tweet` messages only. Whether or not the tweet have been favorited."]
8001 #[serde(default, skip_serializing_if = "Option::is_none")]
8002 pub have_been_favorited: Option<bool>,
8003 #[doc = "For `custom` messages only. Custom reference which is used to thread messages."]
8004 #[serde(default, skip_serializing_if = "Option::is_none")]
8005 pub thread_ref: Option<String>,
8006 #[doc = "For `custom` messages only. Custom object holding internal information."]
8007 #[serde(default, skip_serializing_if = "Option::is_none")]
8008 pub headers: Option<std::collections::HashMap<String, String>>,
8009}
8010
8011impl std::fmt::Display for MessageResponseMetadata {
8012 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8013 write!(
8014 f,
8015 "{}",
8016 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8017 )
8018 }
8019}
8020
8021impl tabled::Tabled for MessageResponseMetadata {
8022 const LENGTH: usize = 10;
8023 fn fields(&self) -> Vec<String> {
8024 vec![
8025 if let Some(intercom_url) = &self.intercom_url {
8026 format!("{:?}", intercom_url)
8027 } else {
8028 String::new()
8029 },
8030 if let Some(duration) = &self.duration {
8031 format!("{:?}", duration)
8032 } else {
8033 String::new()
8034 },
8035 if let Some(have_been_answered) = &self.have_been_answered {
8036 format!("{:?}", have_been_answered)
8037 } else {
8038 String::new()
8039 },
8040 if let Some(external_id) = &self.external_id {
8041 format!("{:?}", external_id)
8042 } else {
8043 String::new()
8044 },
8045 if let Some(twitter_url) = &self.twitter_url {
8046 format!("{:?}", twitter_url)
8047 } else {
8048 String::new()
8049 },
8050 if let Some(is_retweet) = &self.is_retweet {
8051 format!("{:?}", is_retweet)
8052 } else {
8053 String::new()
8054 },
8055 if let Some(have_been_retweeted) = &self.have_been_retweeted {
8056 format!("{:?}", have_been_retweeted)
8057 } else {
8058 String::new()
8059 },
8060 if let Some(have_been_favorited) = &self.have_been_favorited {
8061 format!("{:?}", have_been_favorited)
8062 } else {
8063 String::new()
8064 },
8065 if let Some(thread_ref) = &self.thread_ref {
8066 format!("{:?}", thread_ref)
8067 } else {
8068 String::new()
8069 },
8070 if let Some(headers) = &self.headers {
8071 format!("{:?}", headers)
8072 } else {
8073 String::new()
8074 },
8075 ]
8076 }
8077
8078 fn headers() -> Vec<String> {
8079 vec![
8080 "intercom_url".to_string(),
8081 "duration".to_string(),
8082 "have_been_answered".to_string(),
8083 "external_id".to_string(),
8084 "twitter_url".to_string(),
8085 "is_retweet".to_string(),
8086 "have_been_retweeted".to_string(),
8087 "have_been_favorited".to_string(),
8088 "thread_ref".to_string(),
8089 "headers".to_string(),
8090 ]
8091 }
8092}
8093
8094#[derive(
8095 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8096)]
8097pub struct MessageResponse {
8098 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
8099 pub underscore_links: Option<MessageResponseUnderscoreLinks>,
8100 #[doc = "Unique identifier of the message"]
8101 #[serde(default, skip_serializing_if = "Option::is_none")]
8102 pub id: Option<String>,
8103 #[doc = "Type of the message"]
8104 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
8105 pub type_: Option<MessageResponseType>,
8106 #[doc = "Whether or not the message has been received or sent"]
8107 #[serde(default, skip_serializing_if = "Option::is_none")]
8108 pub is_inbound: Option<bool>,
8109 #[doc = "If the message is a draft, describes the draft mode. Can be 'private' (draft is \
8110 visible to the author only) or 'shared' (draft is visible to all teammates with \
8111 access to the conversation)."]
8112 #[serde(default, skip_serializing_if = "Option::is_none")]
8113 pub draft_mode: Option<DraftMode>,
8114 #[doc = "Type of the error when the draft failed to be sent"]
8115 #[serde(default, skip_serializing_if = "Option::is_none")]
8116 pub error_type: Option<String>,
8117 #[doc = "The current version of the message in Front"]
8118 #[serde(default, skip_serializing_if = "Option::is_none")]
8119 pub version: Option<String>,
8120 #[doc = "Date at which the message as been sent or received"]
8121 #[serde(default, skip_serializing_if = "Option::is_none")]
8122 pub created_at: Option<i64>,
8123 #[doc = "Subject of the message"]
8124 #[serde(default, skip_serializing_if = "Option::is_none")]
8125 pub subject: Option<String>,
8126 #[doc = "Preview of the message body"]
8127 #[serde(default, skip_serializing_if = "Option::is_none")]
8128 pub blurb: Option<String>,
8129 #[doc = "A teammate is a user in Front."]
8130 #[serde(default, skip_serializing_if = "Option::is_none")]
8131 pub author: Option<TeammateResponse>,
8132 #[serde(default, skip_serializing_if = "Option::is_none")]
8133 pub recipients: Option<Vec<RecipientResponse>>,
8134 #[doc = "Body of the message"]
8135 #[serde(default, skip_serializing_if = "Option::is_none")]
8136 pub body: Option<String>,
8137 #[doc = "Text version of the body for email messages"]
8138 #[serde(default, skip_serializing_if = "Option::is_none")]
8139 pub text: Option<String>,
8140 #[doc = "List of files attached to the message"]
8141 #[serde(default, skip_serializing_if = "Option::is_none")]
8142 pub attachments: Option<Vec<Attachment>>,
8143 #[serde(default, skip_serializing_if = "Option::is_none")]
8144 pub signature: Option<SignatureResponse>,
8145 #[doc = "Optional metadata about the message"]
8146 #[serde(default, skip_serializing_if = "Option::is_none")]
8147 pub metadata: Option<MessageResponseMetadata>,
8148}
8149
8150impl std::fmt::Display for MessageResponse {
8151 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8152 write!(
8153 f,
8154 "{}",
8155 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8156 )
8157 }
8158}
8159
8160impl tabled::Tabled for MessageResponse {
8161 const LENGTH: usize = 17;
8162 fn fields(&self) -> Vec<String> {
8163 vec![
8164 if let Some(underscore_links) = &self.underscore_links {
8165 format!("{:?}", underscore_links)
8166 } else {
8167 String::new()
8168 },
8169 if let Some(id) = &self.id {
8170 format!("{:?}", id)
8171 } else {
8172 String::new()
8173 },
8174 if let Some(type_) = &self.type_ {
8175 format!("{:?}", type_)
8176 } else {
8177 String::new()
8178 },
8179 if let Some(is_inbound) = &self.is_inbound {
8180 format!("{:?}", is_inbound)
8181 } else {
8182 String::new()
8183 },
8184 if let Some(draft_mode) = &self.draft_mode {
8185 format!("{:?}", draft_mode)
8186 } else {
8187 String::new()
8188 },
8189 if let Some(error_type) = &self.error_type {
8190 format!("{:?}", error_type)
8191 } else {
8192 String::new()
8193 },
8194 if let Some(version) = &self.version {
8195 format!("{:?}", version)
8196 } else {
8197 String::new()
8198 },
8199 if let Some(created_at) = &self.created_at {
8200 format!("{:?}", created_at)
8201 } else {
8202 String::new()
8203 },
8204 if let Some(subject) = &self.subject {
8205 format!("{:?}", subject)
8206 } else {
8207 String::new()
8208 },
8209 if let Some(blurb) = &self.blurb {
8210 format!("{:?}", blurb)
8211 } else {
8212 String::new()
8213 },
8214 if let Some(author) = &self.author {
8215 format!("{:?}", author)
8216 } else {
8217 String::new()
8218 },
8219 if let Some(recipients) = &self.recipients {
8220 format!("{:?}", recipients)
8221 } else {
8222 String::new()
8223 },
8224 if let Some(body) = &self.body {
8225 format!("{:?}", body)
8226 } else {
8227 String::new()
8228 },
8229 if let Some(text) = &self.text {
8230 format!("{:?}", text)
8231 } else {
8232 String::new()
8233 },
8234 if let Some(attachments) = &self.attachments {
8235 format!("{:?}", attachments)
8236 } else {
8237 String::new()
8238 },
8239 if let Some(signature) = &self.signature {
8240 format!("{:?}", signature)
8241 } else {
8242 String::new()
8243 },
8244 if let Some(metadata) = &self.metadata {
8245 format!("{:?}", metadata)
8246 } else {
8247 String::new()
8248 },
8249 ]
8250 }
8251
8252 fn headers() -> Vec<String> {
8253 vec![
8254 "underscore_links".to_string(),
8255 "id".to_string(),
8256 "type_".to_string(),
8257 "is_inbound".to_string(),
8258 "draft_mode".to_string(),
8259 "error_type".to_string(),
8260 "version".to_string(),
8261 "created_at".to_string(),
8262 "subject".to_string(),
8263 "blurb".to_string(),
8264 "author".to_string(),
8265 "recipients".to_string(),
8266 "body".to_string(),
8267 "text".to_string(),
8268 "attachments".to_string(),
8269 "signature".to_string(),
8270 "metadata".to_string(),
8271 ]
8272 }
8273}
8274
8275#[derive(
8276 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
8277)]
8278pub struct RecipientResponseUnderscoreLinksRelated {
8279 #[doc = "Link to recipient contact"]
8280 #[serde(default, skip_serializing_if = "Option::is_none")]
8281 pub contact: Option<String>,
8282}
8283
8284impl std::fmt::Display for RecipientResponseUnderscoreLinksRelated {
8285 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8286 write!(
8287 f,
8288 "{}",
8289 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8290 )
8291 }
8292}
8293
8294impl tabled::Tabled for RecipientResponseUnderscoreLinksRelated {
8295 const LENGTH: usize = 1;
8296 fn fields(&self) -> Vec<String> {
8297 vec![if let Some(contact) = &self.contact {
8298 format!("{:?}", contact)
8299 } else {
8300 String::new()
8301 }]
8302 }
8303
8304 fn headers() -> Vec<String> {
8305 vec!["contact".to_string()]
8306 }
8307}
8308
8309#[derive(
8310 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
8311)]
8312pub struct RecipientResponseUnderscoreLinks {
8313 #[serde(default, skip_serializing_if = "Option::is_none")]
8314 pub related: Option<RecipientResponseUnderscoreLinksRelated>,
8315}
8316
8317impl std::fmt::Display for RecipientResponseUnderscoreLinks {
8318 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8319 write!(
8320 f,
8321 "{}",
8322 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8323 )
8324 }
8325}
8326
8327impl tabled::Tabled for RecipientResponseUnderscoreLinks {
8328 const LENGTH: usize = 1;
8329 fn fields(&self) -> Vec<String> {
8330 vec![if let Some(related) = &self.related {
8331 format!("{:?}", related)
8332 } else {
8333 String::new()
8334 }]
8335 }
8336
8337 fn headers() -> Vec<String> {
8338 vec!["related".to_string()]
8339 }
8340}
8341
8342#[doc = "Role of the recipient"]
8343#[derive(
8344 serde :: Serialize,
8345 serde :: Deserialize,
8346 PartialEq,
8347 Eq,
8348 Hash,
8349 Debug,
8350 Clone,
8351 schemars :: JsonSchema,
8352 tabled :: Tabled,
8353 clap :: ValueEnum,
8354 parse_display :: FromStr,
8355 parse_display :: Display,
8356)]
8357pub enum Role {
8358 #[serde(rename = "from")]
8359 #[display("from")]
8360 From,
8361 #[serde(rename = "to")]
8362 #[display("to")]
8363 To,
8364 #[serde(rename = "cc")]
8365 #[display("cc")]
8366 Cc,
8367 #[serde(rename = "bcc")]
8368 #[display("bcc")]
8369 Bcc,
8370}
8371
8372#[derive(
8373 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8374)]
8375pub struct RecipientResponse {
8376 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
8377 pub underscore_links: Option<RecipientResponseUnderscoreLinks>,
8378 #[doc = "Name of the recipient."]
8379 #[serde(default, skip_serializing_if = "Option::is_none")]
8380 pub name: Option<String>,
8381 #[doc = "Handle of the contact. Can be any string used to uniquely identify the contact"]
8382 #[serde(default, skip_serializing_if = "Option::is_none")]
8383 pub handle: Option<String>,
8384 #[doc = "Role of the recipient"]
8385 #[serde(default, skip_serializing_if = "Option::is_none")]
8386 pub role: Option<Role>,
8387}
8388
8389impl std::fmt::Display for RecipientResponse {
8390 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8391 write!(
8392 f,
8393 "{}",
8394 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8395 )
8396 }
8397}
8398
8399impl tabled::Tabled for RecipientResponse {
8400 const LENGTH: usize = 4;
8401 fn fields(&self) -> Vec<String> {
8402 vec![
8403 if let Some(underscore_links) = &self.underscore_links {
8404 format!("{:?}", underscore_links)
8405 } else {
8406 String::new()
8407 },
8408 if let Some(name) = &self.name {
8409 format!("{:?}", name)
8410 } else {
8411 String::new()
8412 },
8413 if let Some(handle) = &self.handle {
8414 format!("{:?}", handle)
8415 } else {
8416 String::new()
8417 },
8418 if let Some(role) = &self.role {
8419 format!("{:?}", role)
8420 } else {
8421 String::new()
8422 },
8423 ]
8424 }
8425
8426 fn headers() -> Vec<String> {
8427 vec![
8428 "underscore_links".to_string(),
8429 "name".to_string(),
8430 "handle".to_string(),
8431 "role".to_string(),
8432 ]
8433 }
8434}
8435
8436#[derive(
8437 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
8438)]
8439pub struct ReminderUnderscoreLinksRelated {
8440 #[doc = "Link to conversation owner"]
8441 #[serde(default, skip_serializing_if = "Option::is_none")]
8442 pub owner: Option<String>,
8443}
8444
8445impl std::fmt::Display for ReminderUnderscoreLinksRelated {
8446 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8447 write!(
8448 f,
8449 "{}",
8450 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8451 )
8452 }
8453}
8454
8455impl tabled::Tabled for ReminderUnderscoreLinksRelated {
8456 const LENGTH: usize = 1;
8457 fn fields(&self) -> Vec<String> {
8458 vec![if let Some(owner) = &self.owner {
8459 format!("{:?}", owner)
8460 } else {
8461 String::new()
8462 }]
8463 }
8464
8465 fn headers() -> Vec<String> {
8466 vec!["owner".to_string()]
8467 }
8468}
8469
8470#[derive(
8471 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
8472)]
8473pub struct ReminderUnderscoreLinks {
8474 #[serde(default, skip_serializing_if = "Option::is_none")]
8475 pub related: Option<ReminderUnderscoreLinksRelated>,
8476}
8477
8478impl std::fmt::Display for ReminderUnderscoreLinks {
8479 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8480 write!(
8481 f,
8482 "{}",
8483 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8484 )
8485 }
8486}
8487
8488impl tabled::Tabled for ReminderUnderscoreLinks {
8489 const LENGTH: usize = 1;
8490 fn fields(&self) -> Vec<String> {
8491 vec![if let Some(related) = &self.related {
8492 format!("{:?}", related)
8493 } else {
8494 String::new()
8495 }]
8496 }
8497
8498 fn headers() -> Vec<String> {
8499 vec!["related".to_string()]
8500 }
8501}
8502
8503#[derive(
8504 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8505)]
8506pub struct Reminder {
8507 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
8508 pub underscore_links: Option<ReminderUnderscoreLinks>,
8509 #[doc = "Timestamp at which the conversation reminder has been created"]
8510 #[serde(default, skip_serializing_if = "Option::is_none")]
8511 pub created_at: Option<i64>,
8512 #[doc = "Timestamp that the conversation reminder has been scheduled for"]
8513 #[serde(default, skip_serializing_if = "Option::is_none")]
8514 pub scheduled_at: Option<i64>,
8515 #[doc = "Timestamp at which the conversation reminder has been updated"]
8516 #[serde(default, skip_serializing_if = "Option::is_none")]
8517 pub updated_at: Option<i64>,
8518}
8519
8520impl std::fmt::Display for Reminder {
8521 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8522 write!(
8523 f,
8524 "{}",
8525 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8526 )
8527 }
8528}
8529
8530impl tabled::Tabled for Reminder {
8531 const LENGTH: usize = 4;
8532 fn fields(&self) -> Vec<String> {
8533 vec![
8534 if let Some(underscore_links) = &self.underscore_links {
8535 format!("{:?}", underscore_links)
8536 } else {
8537 String::new()
8538 },
8539 if let Some(created_at) = &self.created_at {
8540 format!("{:?}", created_at)
8541 } else {
8542 String::new()
8543 },
8544 if let Some(scheduled_at) = &self.scheduled_at {
8545 format!("{:?}", scheduled_at)
8546 } else {
8547 String::new()
8548 },
8549 if let Some(updated_at) = &self.updated_at {
8550 format!("{:?}", updated_at)
8551 } else {
8552 String::new()
8553 },
8554 ]
8555 }
8556
8557 fn headers() -> Vec<String> {
8558 vec![
8559 "underscore_links".to_string(),
8560 "created_at".to_string(),
8561 "scheduled_at".to_string(),
8562 "updated_at".to_string(),
8563 ]
8564 }
8565}
8566
8567#[derive(
8568 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
8569)]
8570pub struct RoleResponseUnderscoreLinksRelated {
8571 #[doc = "Link to role owner"]
8572 #[serde(default, skip_serializing_if = "Option::is_none")]
8573 pub owner: Option<String>,
8574}
8575
8576impl std::fmt::Display for RoleResponseUnderscoreLinksRelated {
8577 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8578 write!(
8579 f,
8580 "{}",
8581 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8582 )
8583 }
8584}
8585
8586impl tabled::Tabled for RoleResponseUnderscoreLinksRelated {
8587 const LENGTH: usize = 1;
8588 fn fields(&self) -> Vec<String> {
8589 vec![if let Some(owner) = &self.owner {
8590 format!("{:?}", owner)
8591 } else {
8592 String::new()
8593 }]
8594 }
8595
8596 fn headers() -> Vec<String> {
8597 vec!["owner".to_string()]
8598 }
8599}
8600
8601#[derive(
8602 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
8603)]
8604pub struct RoleResponseUnderscoreLinks {
8605 #[serde(default, skip_serializing_if = "Option::is_none")]
8606 pub related: Option<RoleResponseUnderscoreLinksRelated>,
8607}
8608
8609impl std::fmt::Display for RoleResponseUnderscoreLinks {
8610 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8611 write!(
8612 f,
8613 "{}",
8614 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8615 )
8616 }
8617}
8618
8619impl tabled::Tabled for RoleResponseUnderscoreLinks {
8620 const LENGTH: usize = 1;
8621 fn fields(&self) -> Vec<String> {
8622 vec![if let Some(related) = &self.related {
8623 format!("{:?}", related)
8624 } else {
8625 String::new()
8626 }]
8627 }
8628
8629 fn headers() -> Vec<String> {
8630 vec!["related".to_string()]
8631 }
8632}
8633
8634#[derive(
8635 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8636)]
8637pub struct RoleResponse {
8638 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
8639 pub underscore_links: Option<RoleResponseUnderscoreLinks>,
8640 #[doc = "Unique identifier of the role"]
8641 #[serde(default, skip_serializing_if = "Option::is_none")]
8642 pub id: Option<String>,
8643 #[doc = "Name of the role"]
8644 #[serde(default, skip_serializing_if = "Option::is_none")]
8645 pub name: Option<String>,
8646}
8647
8648impl std::fmt::Display for RoleResponse {
8649 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8650 write!(
8651 f,
8652 "{}",
8653 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8654 )
8655 }
8656}
8657
8658impl tabled::Tabled for RoleResponse {
8659 const LENGTH: usize = 3;
8660 fn fields(&self) -> Vec<String> {
8661 vec![
8662 if let Some(underscore_links) = &self.underscore_links {
8663 format!("{:?}", underscore_links)
8664 } else {
8665 String::new()
8666 },
8667 if let Some(id) = &self.id {
8668 format!("{:?}", id)
8669 } else {
8670 String::new()
8671 },
8672 if let Some(name) = &self.name {
8673 format!("{:?}", name)
8674 } else {
8675 String::new()
8676 },
8677 ]
8678 }
8679
8680 fn headers() -> Vec<String> {
8681 vec![
8682 "underscore_links".to_string(),
8683 "id".to_string(),
8684 "name".to_string(),
8685 ]
8686 }
8687}
8688
8689#[derive(
8690 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
8691)]
8692pub struct RuleResponseUnderscoreLinksRelated {
8693 #[doc = "Link to rule owner"]
8694 #[serde(default, skip_serializing_if = "Option::is_none")]
8695 pub owner: Option<String>,
8696}
8697
8698impl std::fmt::Display for RuleResponseUnderscoreLinksRelated {
8699 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8700 write!(
8701 f,
8702 "{}",
8703 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8704 )
8705 }
8706}
8707
8708impl tabled::Tabled for RuleResponseUnderscoreLinksRelated {
8709 const LENGTH: usize = 1;
8710 fn fields(&self) -> Vec<String> {
8711 vec![if let Some(owner) = &self.owner {
8712 format!("{:?}", owner)
8713 } else {
8714 String::new()
8715 }]
8716 }
8717
8718 fn headers() -> Vec<String> {
8719 vec!["owner".to_string()]
8720 }
8721}
8722
8723#[derive(
8724 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
8725)]
8726pub struct RuleResponseUnderscoreLinks {
8727 #[doc = "Link to resource"]
8728 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
8729 pub self_: Option<String>,
8730 #[serde(default, skip_serializing_if = "Option::is_none")]
8731 pub related: Option<RuleResponseUnderscoreLinksRelated>,
8732}
8733
8734impl std::fmt::Display for RuleResponseUnderscoreLinks {
8735 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8736 write!(
8737 f,
8738 "{}",
8739 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8740 )
8741 }
8742}
8743
8744impl tabled::Tabled for RuleResponseUnderscoreLinks {
8745 const LENGTH: usize = 2;
8746 fn fields(&self) -> Vec<String> {
8747 vec![
8748 if let Some(self_) = &self.self_ {
8749 format!("{:?}", self_)
8750 } else {
8751 String::new()
8752 },
8753 if let Some(related) = &self.related {
8754 format!("{:?}", related)
8755 } else {
8756 String::new()
8757 },
8758 ]
8759 }
8760
8761 fn headers() -> Vec<String> {
8762 vec!["self_".to_string(), "related".to_string()]
8763 }
8764}
8765
8766#[derive(
8767 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8768)]
8769pub struct RuleResponse {
8770 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
8771 pub underscore_links: Option<RuleResponseUnderscoreLinks>,
8772 #[doc = "Unique identifier of the rule"]
8773 #[serde(default, skip_serializing_if = "Option::is_none")]
8774 pub id: Option<String>,
8775 #[doc = "Name of the rule"]
8776 #[serde(default, skip_serializing_if = "Option::is_none")]
8777 pub name: Option<String>,
8778 #[doc = "List of the rule's actions description"]
8779 #[serde(default, skip_serializing_if = "Option::is_none")]
8780 pub actions: Option<Vec<String>>,
8781 #[doc = "Whether or not the rule is individual"]
8782 #[serde(default, skip_serializing_if = "Option::is_none")]
8783 pub is_private: Option<bool>,
8784}
8785
8786impl std::fmt::Display for RuleResponse {
8787 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8788 write!(
8789 f,
8790 "{}",
8791 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8792 )
8793 }
8794}
8795
8796impl tabled::Tabled for RuleResponse {
8797 const LENGTH: usize = 5;
8798 fn fields(&self) -> Vec<String> {
8799 vec![
8800 if let Some(underscore_links) = &self.underscore_links {
8801 format!("{:?}", underscore_links)
8802 } else {
8803 String::new()
8804 },
8805 if let Some(id) = &self.id {
8806 format!("{:?}", id)
8807 } else {
8808 String::new()
8809 },
8810 if let Some(name) = &self.name {
8811 format!("{:?}", name)
8812 } else {
8813 String::new()
8814 },
8815 if let Some(actions) = &self.actions {
8816 format!("{:?}", actions)
8817 } else {
8818 String::new()
8819 },
8820 if let Some(is_private) = &self.is_private {
8821 format!("{:?}", is_private)
8822 } else {
8823 String::new()
8824 },
8825 ]
8826 }
8827
8828 fn headers() -> Vec<String> {
8829 vec![
8830 "underscore_links".to_string(),
8831 "id".to_string(),
8832 "name".to_string(),
8833 "actions".to_string(),
8834 "is_private".to_string(),
8835 ]
8836 }
8837}
8838
8839#[derive(
8840 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
8841)]
8842pub struct SeenReceiptResponseUnderscoreLinksRelated {
8843 #[doc = "Link to message associated with the seen record"]
8844 #[serde(default, skip_serializing_if = "Option::is_none")]
8845 pub message: Option<String>,
8846}
8847
8848impl std::fmt::Display for SeenReceiptResponseUnderscoreLinksRelated {
8849 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8850 write!(
8851 f,
8852 "{}",
8853 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8854 )
8855 }
8856}
8857
8858impl tabled::Tabled for SeenReceiptResponseUnderscoreLinksRelated {
8859 const LENGTH: usize = 1;
8860 fn fields(&self) -> Vec<String> {
8861 vec![if let Some(message) = &self.message {
8862 format!("{:?}", message)
8863 } else {
8864 String::new()
8865 }]
8866 }
8867
8868 fn headers() -> Vec<String> {
8869 vec!["message".to_string()]
8870 }
8871}
8872
8873#[derive(
8874 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
8875)]
8876pub struct SeenReceiptResponseUnderscoreLinks {
8877 #[doc = "Link to self"]
8878 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
8879 pub self_: Option<String>,
8880 #[serde(default, skip_serializing_if = "Option::is_none")]
8881 pub related: Option<SeenReceiptResponseUnderscoreLinksRelated>,
8882}
8883
8884impl std::fmt::Display for SeenReceiptResponseUnderscoreLinks {
8885 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8886 write!(
8887 f,
8888 "{}",
8889 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8890 )
8891 }
8892}
8893
8894impl tabled::Tabled for SeenReceiptResponseUnderscoreLinks {
8895 const LENGTH: usize = 2;
8896 fn fields(&self) -> Vec<String> {
8897 vec![
8898 if let Some(self_) = &self.self_ {
8899 format!("{:?}", self_)
8900 } else {
8901 String::new()
8902 },
8903 if let Some(related) = &self.related {
8904 format!("{:?}", related)
8905 } else {
8906 String::new()
8907 },
8908 ]
8909 }
8910
8911 fn headers() -> Vec<String> {
8912 vec!["self_".to_string(), "related".to_string()]
8913 }
8914}
8915
8916#[derive(
8917 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8918)]
8919pub struct SeenReceiptResponse {
8920 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
8921 pub underscore_links: Option<SeenReceiptResponseUnderscoreLinks>,
8922 #[doc = "Timestamp when message was seen"]
8923 #[serde(default, skip_serializing_if = "Option::is_none")]
8924 pub first_seen_at: Option<String>,
8925 #[serde(default, skip_serializing_if = "Option::is_none")]
8926 pub seen_by: Option<ContactHandle>,
8927}
8928
8929impl std::fmt::Display for SeenReceiptResponse {
8930 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8931 write!(
8932 f,
8933 "{}",
8934 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8935 )
8936 }
8937}
8938
8939impl tabled::Tabled for SeenReceiptResponse {
8940 const LENGTH: usize = 3;
8941 fn fields(&self) -> Vec<String> {
8942 vec![
8943 if let Some(underscore_links) = &self.underscore_links {
8944 format!("{:?}", underscore_links)
8945 } else {
8946 String::new()
8947 },
8948 if let Some(first_seen_at) = &self.first_seen_at {
8949 format!("{:?}", first_seen_at)
8950 } else {
8951 String::new()
8952 },
8953 if let Some(seen_by) = &self.seen_by {
8954 format!("{:?}", seen_by)
8955 } else {
8956 String::new()
8957 },
8958 ]
8959 }
8960
8961 fn headers() -> Vec<String> {
8962 vec![
8963 "underscore_links".to_string(),
8964 "first_seen_at".to_string(),
8965 "seen_by".to_string(),
8966 ]
8967 }
8968}
8969
8970#[derive(
8971 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
8972)]
8973pub struct ShiftResponseUnderscoreLinksRelated {
8974 #[doc = "Link to shift teammates"]
8975 #[serde(default, skip_serializing_if = "Option::is_none")]
8976 pub teammates: Option<String>,
8977 #[doc = "Link to shift owner"]
8978 #[serde(default, skip_serializing_if = "Option::is_none")]
8979 pub owner: Option<String>,
8980}
8981
8982impl std::fmt::Display for ShiftResponseUnderscoreLinksRelated {
8983 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8984 write!(
8985 f,
8986 "{}",
8987 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8988 )
8989 }
8990}
8991
8992impl tabled::Tabled for ShiftResponseUnderscoreLinksRelated {
8993 const LENGTH: usize = 2;
8994 fn fields(&self) -> Vec<String> {
8995 vec![
8996 if let Some(teammates) = &self.teammates {
8997 format!("{:?}", teammates)
8998 } else {
8999 String::new()
9000 },
9001 if let Some(owner) = &self.owner {
9002 format!("{:?}", owner)
9003 } else {
9004 String::new()
9005 },
9006 ]
9007 }
9008
9009 fn headers() -> Vec<String> {
9010 vec!["teammates".to_string(), "owner".to_string()]
9011 }
9012}
9013
9014#[derive(
9015 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
9016)]
9017pub struct ShiftResponseUnderscoreLinks {
9018 #[doc = "Link to resource"]
9019 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
9020 pub self_: Option<String>,
9021 #[serde(default, skip_serializing_if = "Option::is_none")]
9022 pub related: Option<ShiftResponseUnderscoreLinksRelated>,
9023}
9024
9025impl std::fmt::Display for ShiftResponseUnderscoreLinks {
9026 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9027 write!(
9028 f,
9029 "{}",
9030 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9031 )
9032 }
9033}
9034
9035impl tabled::Tabled for ShiftResponseUnderscoreLinks {
9036 const LENGTH: usize = 2;
9037 fn fields(&self) -> Vec<String> {
9038 vec![
9039 if let Some(self_) = &self.self_ {
9040 format!("{:?}", self_)
9041 } else {
9042 String::new()
9043 },
9044 if let Some(related) = &self.related {
9045 format!("{:?}", related)
9046 } else {
9047 String::new()
9048 },
9049 ]
9050 }
9051
9052 fn headers() -> Vec<String> {
9053 vec!["self_".to_string(), "related".to_string()]
9054 }
9055}
9056
9057#[doc = "Color of the shift"]
9058#[derive(
9059 serde :: Serialize,
9060 serde :: Deserialize,
9061 PartialEq,
9062 Eq,
9063 Hash,
9064 Debug,
9065 Clone,
9066 schemars :: JsonSchema,
9067 tabled :: Tabled,
9068 clap :: ValueEnum,
9069 parse_display :: FromStr,
9070 parse_display :: Display,
9071)]
9072pub enum ShiftResponseColor {
9073 #[serde(rename = "black")]
9074 #[display("black")]
9075 Black,
9076}
9077
9078impl std::default::Default for ShiftResponseColor {
9079 fn default() -> Self {
9080 ShiftResponseColor::Black
9081 }
9082}
9083
9084#[derive(
9085 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
9086)]
9087pub struct ShiftResponse {
9088 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
9089 pub underscore_links: Option<ShiftResponseUnderscoreLinks>,
9090 #[doc = "Unique identifier of the shift"]
9091 #[serde(default, skip_serializing_if = "Option::is_none")]
9092 pub id: Option<String>,
9093 #[doc = "Name of the shift"]
9094 #[serde(default, skip_serializing_if = "Option::is_none")]
9095 pub name: Option<String>,
9096 #[doc = "Color of the shift"]
9097 #[serde(default, skip_serializing_if = "Option::is_none")]
9098 pub color: Option<ShiftResponseColor>,
9099 #[doc = "A timezone name as defined in the IANA tz database"]
9100 #[serde(default, skip_serializing_if = "Option::is_none")]
9101 pub timezone: Option<String>,
9102 #[serde(default, skip_serializing_if = "Option::is_none")]
9103 pub times: Option<ShiftIntervals>,
9104 #[serde(default, skip_serializing_if = "Option::is_none")]
9105 pub created_at: Option<i64>,
9106 #[serde(default, skip_serializing_if = "Option::is_none")]
9107 pub updated_at: Option<i64>,
9108}
9109
9110impl std::fmt::Display for ShiftResponse {
9111 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9112 write!(
9113 f,
9114 "{}",
9115 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9116 )
9117 }
9118}
9119
9120impl tabled::Tabled for ShiftResponse {
9121 const LENGTH: usize = 8;
9122 fn fields(&self) -> Vec<String> {
9123 vec![
9124 if let Some(underscore_links) = &self.underscore_links {
9125 format!("{:?}", underscore_links)
9126 } else {
9127 String::new()
9128 },
9129 if let Some(id) = &self.id {
9130 format!("{:?}", id)
9131 } else {
9132 String::new()
9133 },
9134 if let Some(name) = &self.name {
9135 format!("{:?}", name)
9136 } else {
9137 String::new()
9138 },
9139 if let Some(color) = &self.color {
9140 format!("{:?}", color)
9141 } else {
9142 String::new()
9143 },
9144 if let Some(timezone) = &self.timezone {
9145 format!("{:?}", timezone)
9146 } else {
9147 String::new()
9148 },
9149 if let Some(times) = &self.times {
9150 format!("{:?}", times)
9151 } else {
9152 String::new()
9153 },
9154 if let Some(created_at) = &self.created_at {
9155 format!("{:?}", created_at)
9156 } else {
9157 String::new()
9158 },
9159 if let Some(updated_at) = &self.updated_at {
9160 format!("{:?}", updated_at)
9161 } else {
9162 String::new()
9163 },
9164 ]
9165 }
9166
9167 fn headers() -> Vec<String> {
9168 vec![
9169 "underscore_links".to_string(),
9170 "id".to_string(),
9171 "name".to_string(),
9172 "color".to_string(),
9173 "timezone".to_string(),
9174 "times".to_string(),
9175 "created_at".to_string(),
9176 "updated_at".to_string(),
9177 ]
9178 }
9179}
9180
9181#[derive(
9182 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
9183)]
9184pub struct SignatureResponseUnderscoreLinksRelated {
9185 #[doc = "Link to signature's owner (either a team or teammate)"]
9186 #[serde(default, skip_serializing_if = "Option::is_none")]
9187 pub owner: Option<String>,
9188}
9189
9190impl std::fmt::Display for SignatureResponseUnderscoreLinksRelated {
9191 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9192 write!(
9193 f,
9194 "{}",
9195 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9196 )
9197 }
9198}
9199
9200impl tabled::Tabled for SignatureResponseUnderscoreLinksRelated {
9201 const LENGTH: usize = 1;
9202 fn fields(&self) -> Vec<String> {
9203 vec![if let Some(owner) = &self.owner {
9204 format!("{:?}", owner)
9205 } else {
9206 String::new()
9207 }]
9208 }
9209
9210 fn headers() -> Vec<String> {
9211 vec!["owner".to_string()]
9212 }
9213}
9214
9215#[derive(
9216 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
9217)]
9218pub struct SignatureResponseUnderscoreLinks {
9219 #[doc = "Link to resource"]
9220 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
9221 pub self_: Option<String>,
9222 #[serde(default, skip_serializing_if = "Option::is_none")]
9223 pub related: Option<SignatureResponseUnderscoreLinksRelated>,
9224}
9225
9226impl std::fmt::Display for SignatureResponseUnderscoreLinks {
9227 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9228 write!(
9229 f,
9230 "{}",
9231 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9232 )
9233 }
9234}
9235
9236impl tabled::Tabled for SignatureResponseUnderscoreLinks {
9237 const LENGTH: usize = 2;
9238 fn fields(&self) -> Vec<String> {
9239 vec![
9240 if let Some(self_) = &self.self_ {
9241 format!("{:?}", self_)
9242 } else {
9243 String::new()
9244 },
9245 if let Some(related) = &self.related {
9246 format!("{:?}", related)
9247 } else {
9248 String::new()
9249 },
9250 ]
9251 }
9252
9253 fn headers() -> Vec<String> {
9254 vec!["self_".to_string(), "related".to_string()]
9255 }
9256}
9257
9258#[derive(
9259 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
9260)]
9261pub struct SignatureResponse {
9262 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
9263 pub underscore_links: Option<SignatureResponseUnderscoreLinks>,
9264 #[doc = "Unique identifier of the signature"]
9265 #[serde(default, skip_serializing_if = "Option::is_none")]
9266 pub id: Option<String>,
9267 #[doc = "Name of the signature"]
9268 #[serde(default, skip_serializing_if = "Option::is_none")]
9269 pub name: Option<String>,
9270 #[doc = "Body of the signature"]
9271 #[serde(default, skip_serializing_if = "Option::is_none")]
9272 pub body: Option<String>,
9273 #[doc = "Sender info of the signature"]
9274 #[serde(default, skip_serializing_if = "Option::is_none")]
9275 pub sender_info: Option<String>,
9276 #[doc = "Whether or not the signature is available in teammate channels."]
9277 #[serde(default, skip_serializing_if = "Option::is_none")]
9278 pub is_visible_for_all_teammate_channels: Option<bool>,
9279 #[doc = "Whether the signature is the default signature for the team or teammate."]
9280 #[serde(default, skip_serializing_if = "Option::is_none")]
9281 pub is_default: Option<bool>,
9282 #[serde(default, skip_serializing_if = "Option::is_none")]
9283 pub channel_ids: Option<Vec<String>>,
9284}
9285
9286impl std::fmt::Display for SignatureResponse {
9287 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9288 write!(
9289 f,
9290 "{}",
9291 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9292 )
9293 }
9294}
9295
9296impl tabled::Tabled for SignatureResponse {
9297 const LENGTH: usize = 8;
9298 fn fields(&self) -> Vec<String> {
9299 vec![
9300 if let Some(underscore_links) = &self.underscore_links {
9301 format!("{:?}", underscore_links)
9302 } else {
9303 String::new()
9304 },
9305 if let Some(id) = &self.id {
9306 format!("{:?}", id)
9307 } else {
9308 String::new()
9309 },
9310 if let Some(name) = &self.name {
9311 format!("{:?}", name)
9312 } else {
9313 String::new()
9314 },
9315 if let Some(body) = &self.body {
9316 format!("{:?}", body)
9317 } else {
9318 String::new()
9319 },
9320 if let Some(sender_info) = &self.sender_info {
9321 format!("{:?}", sender_info)
9322 } else {
9323 String::new()
9324 },
9325 if let Some(is_visible_for_all_teammate_channels) =
9326 &self.is_visible_for_all_teammate_channels
9327 {
9328 format!("{:?}", is_visible_for_all_teammate_channels)
9329 } else {
9330 String::new()
9331 },
9332 if let Some(is_default) = &self.is_default {
9333 format!("{:?}", is_default)
9334 } else {
9335 String::new()
9336 },
9337 if let Some(channel_ids) = &self.channel_ids {
9338 format!("{:?}", channel_ids)
9339 } else {
9340 String::new()
9341 },
9342 ]
9343 }
9344
9345 fn headers() -> Vec<String> {
9346 vec![
9347 "underscore_links".to_string(),
9348 "id".to_string(),
9349 "name".to_string(),
9350 "body".to_string(),
9351 "sender_info".to_string(),
9352 "is_visible_for_all_teammate_channels".to_string(),
9353 "is_default".to_string(),
9354 "channel_ids".to_string(),
9355 ]
9356 }
9357}
9358
9359#[derive(
9360 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
9361)]
9362pub struct TagResponseUnderscoreLinksRelated {
9363 #[doc = "Link to tag conversations"]
9364 #[serde(default, skip_serializing_if = "Option::is_none")]
9365 pub conversations: Option<String>,
9366 #[doc = "Link to tag owner"]
9367 #[serde(default, skip_serializing_if = "Option::is_none")]
9368 pub owner: Option<String>,
9369 #[doc = "Link to tag children"]
9370 #[serde(default, skip_serializing_if = "Option::is_none")]
9371 pub children: Option<String>,
9372}
9373
9374impl std::fmt::Display for TagResponseUnderscoreLinksRelated {
9375 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9376 write!(
9377 f,
9378 "{}",
9379 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9380 )
9381 }
9382}
9383
9384impl tabled::Tabled for TagResponseUnderscoreLinksRelated {
9385 const LENGTH: usize = 3;
9386 fn fields(&self) -> Vec<String> {
9387 vec![
9388 if let Some(conversations) = &self.conversations {
9389 format!("{:?}", conversations)
9390 } else {
9391 String::new()
9392 },
9393 if let Some(owner) = &self.owner {
9394 format!("{:?}", owner)
9395 } else {
9396 String::new()
9397 },
9398 if let Some(children) = &self.children {
9399 format!("{:?}", children)
9400 } else {
9401 String::new()
9402 },
9403 ]
9404 }
9405
9406 fn headers() -> Vec<String> {
9407 vec![
9408 "conversations".to_string(),
9409 "owner".to_string(),
9410 "children".to_string(),
9411 ]
9412 }
9413}
9414
9415#[derive(
9416 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
9417)]
9418pub struct TagResponseUnderscoreLinks {
9419 #[doc = "Link to resource"]
9420 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
9421 pub self_: Option<String>,
9422 #[serde(default, skip_serializing_if = "Option::is_none")]
9423 pub related: Option<TagResponseUnderscoreLinksRelated>,
9424}
9425
9426impl std::fmt::Display for TagResponseUnderscoreLinks {
9427 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9428 write!(
9429 f,
9430 "{}",
9431 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9432 )
9433 }
9434}
9435
9436impl tabled::Tabled for TagResponseUnderscoreLinks {
9437 const LENGTH: usize = 2;
9438 fn fields(&self) -> Vec<String> {
9439 vec![
9440 if let Some(self_) = &self.self_ {
9441 format!("{:?}", self_)
9442 } else {
9443 String::new()
9444 },
9445 if let Some(related) = &self.related {
9446 format!("{:?}", related)
9447 } else {
9448 String::new()
9449 },
9450 ]
9451 }
9452
9453 fn headers() -> Vec<String> {
9454 vec!["self_".to_string(), "related".to_string()]
9455 }
9456}
9457
9458#[doc = "A tag is a label that can be used to classify conversations."]
9459#[derive(
9460 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
9461)]
9462pub struct TagResponse {
9463 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
9464 pub underscore_links: Option<TagResponseUnderscoreLinks>,
9465 #[doc = "Unique identifier of the tag"]
9466 #[serde(default, skip_serializing_if = "Option::is_none")]
9467 pub id: Option<String>,
9468 #[doc = "Name of the tag"]
9469 #[serde(default, skip_serializing_if = "Option::is_none")]
9470 pub name: Option<String>,
9471 #[doc = "Highlight color of the tag."]
9472 #[serde(default, skip_serializing_if = "Option::is_none")]
9473 pub highlight: Option<Highlight>,
9474 #[doc = "Whether or not the tag is individual"]
9475 #[serde(default, skip_serializing_if = "Option::is_none")]
9476 pub is_private: Option<bool>,
9477 #[doc = "Whether the tag is visible in conversation lists."]
9478 #[serde(default, skip_serializing_if = "Option::is_none")]
9479 pub is_visible_in_conversation_lists: Option<bool>,
9480 #[doc = "Timestamp of tag create creation"]
9481 #[serde(default, skip_serializing_if = "Option::is_none")]
9482 pub created_at: Option<i64>,
9483 #[doc = "Timestamp of the last tag update"]
9484 #[serde(default, skip_serializing_if = "Option::is_none")]
9485 pub updated_at: Option<i64>,
9486}
9487
9488impl std::fmt::Display for TagResponse {
9489 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9490 write!(
9491 f,
9492 "{}",
9493 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9494 )
9495 }
9496}
9497
9498impl tabled::Tabled for TagResponse {
9499 const LENGTH: usize = 8;
9500 fn fields(&self) -> Vec<String> {
9501 vec![
9502 if let Some(underscore_links) = &self.underscore_links {
9503 format!("{:?}", underscore_links)
9504 } else {
9505 String::new()
9506 },
9507 if let Some(id) = &self.id {
9508 format!("{:?}", id)
9509 } else {
9510 String::new()
9511 },
9512 if let Some(name) = &self.name {
9513 format!("{:?}", name)
9514 } else {
9515 String::new()
9516 },
9517 if let Some(highlight) = &self.highlight {
9518 format!("{:?}", highlight)
9519 } else {
9520 String::new()
9521 },
9522 if let Some(is_private) = &self.is_private {
9523 format!("{:?}", is_private)
9524 } else {
9525 String::new()
9526 },
9527 if let Some(is_visible_in_conversation_lists) = &self.is_visible_in_conversation_lists {
9528 format!("{:?}", is_visible_in_conversation_lists)
9529 } else {
9530 String::new()
9531 },
9532 if let Some(created_at) = &self.created_at {
9533 format!("{:?}", created_at)
9534 } else {
9535 String::new()
9536 },
9537 if let Some(updated_at) = &self.updated_at {
9538 format!("{:?}", updated_at)
9539 } else {
9540 String::new()
9541 },
9542 ]
9543 }
9544
9545 fn headers() -> Vec<String> {
9546 vec![
9547 "underscore_links".to_string(),
9548 "id".to_string(),
9549 "name".to_string(),
9550 "highlight".to_string(),
9551 "is_private".to_string(),
9552 "is_visible_in_conversation_lists".to_string(),
9553 "created_at".to_string(),
9554 "updated_at".to_string(),
9555 ]
9556 }
9557}
9558
9559#[derive(
9560 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
9561)]
9562pub struct TeamResponseUnderscoreLinks {
9563 #[doc = "Link to resource"]
9564 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
9565 pub self_: Option<String>,
9566}
9567
9568impl std::fmt::Display for TeamResponseUnderscoreLinks {
9569 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9570 write!(
9571 f,
9572 "{}",
9573 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9574 )
9575 }
9576}
9577
9578impl tabled::Tabled for TeamResponseUnderscoreLinks {
9579 const LENGTH: usize = 1;
9580 fn fields(&self) -> Vec<String> {
9581 vec![if let Some(self_) = &self.self_ {
9582 format!("{:?}", self_)
9583 } else {
9584 String::new()
9585 }]
9586 }
9587
9588 fn headers() -> Vec<String> {
9589 vec!["self_".to_string()]
9590 }
9591}
9592
9593#[derive(
9594 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
9595)]
9596pub struct TeamResponse {
9597 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
9598 pub underscore_links: Option<TeamResponseUnderscoreLinks>,
9599 #[doc = "Unique identifier of the team"]
9600 #[serde(default, skip_serializing_if = "Option::is_none")]
9601 pub id: Option<String>,
9602 #[doc = "Name of the team"]
9603 #[serde(default, skip_serializing_if = "Option::is_none")]
9604 pub name: Option<String>,
9605 #[doc = "List of the inboxes in the team"]
9606 #[serde(default, skip_serializing_if = "Option::is_none")]
9607 pub inboxes: Option<Vec<InboxResponse>>,
9608 #[doc = "List of the teammates that have access to the team"]
9609 #[serde(default, skip_serializing_if = "Option::is_none")]
9610 pub members: Option<Vec<TeammateResponse>>,
9611}
9612
9613impl std::fmt::Display for TeamResponse {
9614 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9615 write!(
9616 f,
9617 "{}",
9618 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9619 )
9620 }
9621}
9622
9623impl tabled::Tabled for TeamResponse {
9624 const LENGTH: usize = 5;
9625 fn fields(&self) -> Vec<String> {
9626 vec![
9627 if let Some(underscore_links) = &self.underscore_links {
9628 format!("{:?}", underscore_links)
9629 } else {
9630 String::new()
9631 },
9632 if let Some(id) = &self.id {
9633 format!("{:?}", id)
9634 } else {
9635 String::new()
9636 },
9637 if let Some(name) = &self.name {
9638 format!("{:?}", name)
9639 } else {
9640 String::new()
9641 },
9642 if let Some(inboxes) = &self.inboxes {
9643 format!("{:?}", inboxes)
9644 } else {
9645 String::new()
9646 },
9647 if let Some(members) = &self.members {
9648 format!("{:?}", members)
9649 } else {
9650 String::new()
9651 },
9652 ]
9653 }
9654
9655 fn headers() -> Vec<String> {
9656 vec![
9657 "underscore_links".to_string(),
9658 "id".to_string(),
9659 "name".to_string(),
9660 "inboxes".to_string(),
9661 "members".to_string(),
9662 ]
9663 }
9664}
9665
9666#[derive(
9667 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
9668)]
9669pub struct TeammateResponseUnderscoreLinksRelated {
9670 #[doc = "Link to teammate's inboxes"]
9671 #[serde(default, skip_serializing_if = "Option::is_none")]
9672 pub inboxes: Option<String>,
9673 #[doc = "Link to teammate's conversations"]
9674 #[serde(default, skip_serializing_if = "Option::is_none")]
9675 pub conversations: Option<String>,
9676}
9677
9678impl std::fmt::Display for TeammateResponseUnderscoreLinksRelated {
9679 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9680 write!(
9681 f,
9682 "{}",
9683 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9684 )
9685 }
9686}
9687
9688impl tabled::Tabled for TeammateResponseUnderscoreLinksRelated {
9689 const LENGTH: usize = 2;
9690 fn fields(&self) -> Vec<String> {
9691 vec![
9692 if let Some(inboxes) = &self.inboxes {
9693 format!("{:?}", inboxes)
9694 } else {
9695 String::new()
9696 },
9697 if let Some(conversations) = &self.conversations {
9698 format!("{:?}", conversations)
9699 } else {
9700 String::new()
9701 },
9702 ]
9703 }
9704
9705 fn headers() -> Vec<String> {
9706 vec!["inboxes".to_string(), "conversations".to_string()]
9707 }
9708}
9709
9710#[derive(
9711 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
9712)]
9713pub struct TeammateResponseUnderscoreLinks {
9714 #[doc = "Link to resource"]
9715 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
9716 pub self_: Option<String>,
9717 #[serde(default, skip_serializing_if = "Option::is_none")]
9718 pub related: Option<TeammateResponseUnderscoreLinksRelated>,
9719}
9720
9721impl std::fmt::Display for TeammateResponseUnderscoreLinks {
9722 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9723 write!(
9724 f,
9725 "{}",
9726 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9727 )
9728 }
9729}
9730
9731impl tabled::Tabled for TeammateResponseUnderscoreLinks {
9732 const LENGTH: usize = 2;
9733 fn fields(&self) -> Vec<String> {
9734 vec![
9735 if let Some(self_) = &self.self_ {
9736 format!("{:?}", self_)
9737 } else {
9738 String::new()
9739 },
9740 if let Some(related) = &self.related {
9741 format!("{:?}", related)
9742 } else {
9743 String::new()
9744 },
9745 ]
9746 }
9747
9748 fn headers() -> Vec<String> {
9749 vec!["self_".to_string(), "related".to_string()]
9750 }
9751}
9752
9753#[doc = "A teammate is a user in Front."]
9754#[derive(
9755 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
9756)]
9757pub struct TeammateResponse {
9758 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
9759 pub underscore_links: Option<TeammateResponseUnderscoreLinks>,
9760 #[doc = "Unique identifier of the teammate"]
9761 #[serde(default, skip_serializing_if = "Option::is_none")]
9762 pub id: Option<String>,
9763 #[doc = "Email address of the teammate"]
9764 #[serde(default, skip_serializing_if = "Option::is_none")]
9765 pub email: Option<String>,
9766 #[doc = "Username of the teammate (used for \"@\" mentions)"]
9767 #[serde(default, skip_serializing_if = "Option::is_none")]
9768 pub username: Option<String>,
9769 #[doc = "First name of the teammate"]
9770 #[serde(default, skip_serializing_if = "Option::is_none")]
9771 pub first_name: Option<String>,
9772 #[doc = "Last name of the teammate"]
9773 #[serde(default, skip_serializing_if = "Option::is_none")]
9774 pub last_name: Option<String>,
9775 #[doc = "Whether or not the teammate is an admin in your company"]
9776 #[serde(default, skip_serializing_if = "Option::is_none")]
9777 pub is_admin: Option<bool>,
9778 #[doc = "Whether or not the teammate is available"]
9779 #[serde(default, skip_serializing_if = "Option::is_none")]
9780 pub is_available: Option<bool>,
9781 #[doc = "Whether or not the teammate account has been blocked"]
9782 #[serde(default, skip_serializing_if = "Option::is_none")]
9783 pub is_blocked: Option<bool>,
9784}
9785
9786impl std::fmt::Display for TeammateResponse {
9787 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9788 write!(
9789 f,
9790 "{}",
9791 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9792 )
9793 }
9794}
9795
9796impl tabled::Tabled for TeammateResponse {
9797 const LENGTH: usize = 9;
9798 fn fields(&self) -> Vec<String> {
9799 vec![
9800 if let Some(underscore_links) = &self.underscore_links {
9801 format!("{:?}", underscore_links)
9802 } else {
9803 String::new()
9804 },
9805 if let Some(id) = &self.id {
9806 format!("{:?}", id)
9807 } else {
9808 String::new()
9809 },
9810 if let Some(email) = &self.email {
9811 format!("{:?}", email)
9812 } else {
9813 String::new()
9814 },
9815 if let Some(username) = &self.username {
9816 format!("{:?}", username)
9817 } else {
9818 String::new()
9819 },
9820 if let Some(first_name) = &self.first_name {
9821 format!("{:?}", first_name)
9822 } else {
9823 String::new()
9824 },
9825 if let Some(last_name) = &self.last_name {
9826 format!("{:?}", last_name)
9827 } else {
9828 String::new()
9829 },
9830 if let Some(is_admin) = &self.is_admin {
9831 format!("{:?}", is_admin)
9832 } else {
9833 String::new()
9834 },
9835 if let Some(is_available) = &self.is_available {
9836 format!("{:?}", is_available)
9837 } else {
9838 String::new()
9839 },
9840 if let Some(is_blocked) = &self.is_blocked {
9841 format!("{:?}", is_blocked)
9842 } else {
9843 String::new()
9844 },
9845 ]
9846 }
9847
9848 fn headers() -> Vec<String> {
9849 vec![
9850 "underscore_links".to_string(),
9851 "id".to_string(),
9852 "email".to_string(),
9853 "username".to_string(),
9854 "first_name".to_string(),
9855 "last_name".to_string(),
9856 "is_admin".to_string(),
9857 "is_available".to_string(),
9858 "is_blocked".to_string(),
9859 ]
9860 }
9861}
9862
9863#[derive(
9864 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
9865)]
9866pub struct LinkResponseUnderscoreLinks {
9867 #[doc = "Link to resource"]
9868 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
9869 pub self_: Option<String>,
9870}
9871
9872impl std::fmt::Display for LinkResponseUnderscoreLinks {
9873 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9874 write!(
9875 f,
9876 "{}",
9877 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9878 )
9879 }
9880}
9881
9882impl tabled::Tabled for LinkResponseUnderscoreLinks {
9883 const LENGTH: usize = 1;
9884 fn fields(&self) -> Vec<String> {
9885 vec![if let Some(self_) = &self.self_ {
9886 format!("{:?}", self_)
9887 } else {
9888 String::new()
9889 }]
9890 }
9891
9892 fn headers() -> Vec<String> {
9893 vec!["self_".to_string()]
9894 }
9895}
9896
9897#[doc = "A link used to connect a Front conversation to an external resource."]
9898#[derive(
9899 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
9900)]
9901pub struct LinkResponse {
9902 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
9903 pub underscore_links: Option<LinkResponseUnderscoreLinks>,
9904 #[doc = "Unique identifier of the link"]
9905 #[serde(default, skip_serializing_if = "Option::is_none")]
9906 pub id: Option<String>,
9907 #[doc = "Display name of the link"]
9908 #[serde(default, skip_serializing_if = "Option::is_none")]
9909 pub name: Option<String>,
9910 #[doc = "Type of the link. Typically associated with the underlying link provider (if known)"]
9911 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
9912 pub type_: Option<String>,
9913 #[doc = "Underlying identifying external URL of the link"]
9914 #[serde(default, skip_serializing_if = "Option::is_none")]
9915 pub external_url: Option<String>,
9916}
9917
9918impl std::fmt::Display for LinkResponse {
9919 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
9920 write!(
9921 f,
9922 "{}",
9923 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
9924 )
9925 }
9926}
9927
9928impl tabled::Tabled for LinkResponse {
9929 const LENGTH: usize = 5;
9930 fn fields(&self) -> Vec<String> {
9931 vec![
9932 if let Some(underscore_links) = &self.underscore_links {
9933 format!("{:?}", underscore_links)
9934 } else {
9935 String::new()
9936 },
9937 if let Some(id) = &self.id {
9938 format!("{:?}", id)
9939 } else {
9940 String::new()
9941 },
9942 if let Some(name) = &self.name {
9943 format!("{:?}", name)
9944 } else {
9945 String::new()
9946 },
9947 if let Some(type_) = &self.type_ {
9948 format!("{:?}", type_)
9949 } else {
9950 String::new()
9951 },
9952 if let Some(external_url) = &self.external_url {
9953 format!("{:?}", external_url)
9954 } else {
9955 String::new()
9956 },
9957 ]
9958 }
9959
9960 fn headers() -> Vec<String> {
9961 vec![
9962 "underscore_links".to_string(),
9963 "id".to_string(),
9964 "name".to_string(),
9965 "type_".to_string(),
9966 "external_url".to_string(),
9967 ]
9968 }
9969}
9970
9971#[derive(
9972 serde :: Serialize,
9973 serde :: Deserialize,
9974 PartialEq,
9975 Eq,
9976 Hash,
9977 Debug,
9978 Clone,
9979 schemars :: JsonSchema,
9980 tabled :: Tabled,
9981 clap :: ValueEnum,
9982 parse_display :: FromStr,
9983 parse_display :: Display,
9984)]
9985pub enum SortOrder {
9986 #[serde(rename = "asc")]
9987 #[display("asc")]
9988 Asc,
9989 #[serde(rename = "desc")]
9990 #[display("desc")]
9991 Desc,
9992}
9993
9994#[derive(
9995 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
9996)]
9997pub struct Pagination {
9998 #[doc = "Link to next page of results"]
9999 #[serde(default, skip_serializing_if = "Option::is_none")]
10000 pub next: Option<String>,
10001}
10002
10003impl std::fmt::Display for Pagination {
10004 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10005 write!(
10006 f,
10007 "{}",
10008 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10009 )
10010 }
10011}
10012
10013impl tabled::Tabled for Pagination {
10014 const LENGTH: usize = 1;
10015 fn fields(&self) -> Vec<String> {
10016 vec![if let Some(next) = &self.next {
10017 format!("{:?}", next)
10018 } else {
10019 String::new()
10020 }]
10021 }
10022
10023 fn headers() -> Vec<String> {
10024 vec!["next".to_string()]
10025 }
10026}
10027
10028#[derive(
10029 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
10030)]
10031pub struct ListOfCannedAnswersApplicationJsonUnderscoreLinks {
10032 #[doc = "Link to resource"]
10033 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
10034 pub self_: Option<String>,
10035}
10036
10037impl std::fmt::Display for ListOfCannedAnswersApplicationJsonUnderscoreLinks {
10038 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10039 write!(
10040 f,
10041 "{}",
10042 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10043 )
10044 }
10045}
10046
10047impl tabled::Tabled for ListOfCannedAnswersApplicationJsonUnderscoreLinks {
10048 const LENGTH: usize = 1;
10049 fn fields(&self) -> Vec<String> {
10050 vec![if let Some(self_) = &self.self_ {
10051 format!("{:?}", self_)
10052 } else {
10053 String::new()
10054 }]
10055 }
10056
10057 fn headers() -> Vec<String> {
10058 vec!["self_".to_string()]
10059 }
10060}
10061
10062#[derive(
10063 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10064)]
10065pub struct ListOfCannedAnswersApplicationJson {
10066 #[serde(
10067 rename = "_pagination",
10068 default,
10069 skip_serializing_if = "Option::is_none"
10070 )]
10071 pub pagination: Option<Pagination>,
10072 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
10073 pub underscore_links: Option<ListOfCannedAnswersApplicationJsonUnderscoreLinks>,
10074 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
10075 pub results: Option<Vec<MessageTemplateResponse>>,
10076}
10077
10078impl std::fmt::Display for ListOfCannedAnswersApplicationJson {
10079 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10080 write!(
10081 f,
10082 "{}",
10083 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10084 )
10085 }
10086}
10087
10088impl tabled::Tabled for ListOfCannedAnswersApplicationJson {
10089 const LENGTH: usize = 3;
10090 fn fields(&self) -> Vec<String> {
10091 vec![
10092 if let Some(pagination) = &self.pagination {
10093 format!("{:?}", pagination)
10094 } else {
10095 String::new()
10096 },
10097 if let Some(underscore_links) = &self.underscore_links {
10098 format!("{:?}", underscore_links)
10099 } else {
10100 String::new()
10101 },
10102 if let Some(results) = &self.results {
10103 format!("{:?}", results)
10104 } else {
10105 String::new()
10106 },
10107 ]
10108 }
10109
10110 fn headers() -> Vec<String> {
10111 vec![
10112 "pagination".to_string(),
10113 "underscore_links".to_string(),
10114 "results".to_string(),
10115 ]
10116 }
10117}
10118
10119#[derive(
10120 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
10121)]
10122pub struct ListOfCannedAnswerFoldersApplicationJsonUnderscoreLinks {
10123 #[doc = "Link to resource"]
10124 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
10125 pub self_: Option<String>,
10126}
10127
10128impl std::fmt::Display for ListOfCannedAnswerFoldersApplicationJsonUnderscoreLinks {
10129 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10130 write!(
10131 f,
10132 "{}",
10133 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10134 )
10135 }
10136}
10137
10138impl tabled::Tabled for ListOfCannedAnswerFoldersApplicationJsonUnderscoreLinks {
10139 const LENGTH: usize = 1;
10140 fn fields(&self) -> Vec<String> {
10141 vec![if let Some(self_) = &self.self_ {
10142 format!("{:?}", self_)
10143 } else {
10144 String::new()
10145 }]
10146 }
10147
10148 fn headers() -> Vec<String> {
10149 vec!["self_".to_string()]
10150 }
10151}
10152
10153#[derive(
10154 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10155)]
10156pub struct ListOfCannedAnswerFoldersApplicationJson {
10157 #[serde(
10158 rename = "_pagination",
10159 default,
10160 skip_serializing_if = "Option::is_none"
10161 )]
10162 pub pagination: Option<Pagination>,
10163 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
10164 pub underscore_links: Option<ListOfCannedAnswerFoldersApplicationJsonUnderscoreLinks>,
10165 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
10166 pub results: Option<Vec<MessageTemplateResponse>>,
10167}
10168
10169impl std::fmt::Display for ListOfCannedAnswerFoldersApplicationJson {
10170 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10171 write!(
10172 f,
10173 "{}",
10174 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10175 )
10176 }
10177}
10178
10179impl tabled::Tabled for ListOfCannedAnswerFoldersApplicationJson {
10180 const LENGTH: usize = 3;
10181 fn fields(&self) -> Vec<String> {
10182 vec![
10183 if let Some(pagination) = &self.pagination {
10184 format!("{:?}", pagination)
10185 } else {
10186 String::new()
10187 },
10188 if let Some(underscore_links) = &self.underscore_links {
10189 format!("{:?}", underscore_links)
10190 } else {
10191 String::new()
10192 },
10193 if let Some(results) = &self.results {
10194 format!("{:?}", results)
10195 } else {
10196 String::new()
10197 },
10198 ]
10199 }
10200
10201 fn headers() -> Vec<String> {
10202 vec![
10203 "pagination".to_string(),
10204 "underscore_links".to_string(),
10205 "results".to_string(),
10206 ]
10207 }
10208}
10209
10210#[derive(
10211 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
10212)]
10213pub struct ListOfSignaturesApplicationJsonUnderscoreLinks {
10214 #[doc = "Link to resource"]
10215 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
10216 pub self_: Option<String>,
10217}
10218
10219impl std::fmt::Display for ListOfSignaturesApplicationJsonUnderscoreLinks {
10220 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10221 write!(
10222 f,
10223 "{}",
10224 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10225 )
10226 }
10227}
10228
10229impl tabled::Tabled for ListOfSignaturesApplicationJsonUnderscoreLinks {
10230 const LENGTH: usize = 1;
10231 fn fields(&self) -> Vec<String> {
10232 vec![if let Some(self_) = &self.self_ {
10233 format!("{:?}", self_)
10234 } else {
10235 String::new()
10236 }]
10237 }
10238
10239 fn headers() -> Vec<String> {
10240 vec!["self_".to_string()]
10241 }
10242}
10243
10244#[derive(
10245 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10246)]
10247pub struct ListOfSignaturesApplicationJson {
10248 #[serde(
10249 rename = "_pagination",
10250 default,
10251 skip_serializing_if = "Option::is_none"
10252 )]
10253 pub pagination: Option<Pagination>,
10254 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
10255 pub underscore_links: Option<ListOfSignaturesApplicationJsonUnderscoreLinks>,
10256 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
10257 pub results: Option<Vec<SignatureResponse>>,
10258}
10259
10260impl std::fmt::Display for ListOfSignaturesApplicationJson {
10261 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10262 write!(
10263 f,
10264 "{}",
10265 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10266 )
10267 }
10268}
10269
10270impl tabled::Tabled for ListOfSignaturesApplicationJson {
10271 const LENGTH: usize = 3;
10272 fn fields(&self) -> Vec<String> {
10273 vec![
10274 if let Some(pagination) = &self.pagination {
10275 format!("{:?}", pagination)
10276 } else {
10277 String::new()
10278 },
10279 if let Some(underscore_links) = &self.underscore_links {
10280 format!("{:?}", underscore_links)
10281 } else {
10282 String::new()
10283 },
10284 if let Some(results) = &self.results {
10285 format!("{:?}", results)
10286 } else {
10287 String::new()
10288 },
10289 ]
10290 }
10291
10292 fn headers() -> Vec<String> {
10293 vec![
10294 "pagination".to_string(),
10295 "underscore_links".to_string(),
10296 "results".to_string(),
10297 ]
10298 }
10299}
10300
10301#[derive(
10302 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
10303)]
10304pub struct ListOfInboxesApplicationJsonUnderscoreLinks {
10305 #[doc = "Link to resource"]
10306 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
10307 pub self_: Option<String>,
10308}
10309
10310impl std::fmt::Display for ListOfInboxesApplicationJsonUnderscoreLinks {
10311 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10312 write!(
10313 f,
10314 "{}",
10315 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10316 )
10317 }
10318}
10319
10320impl tabled::Tabled for ListOfInboxesApplicationJsonUnderscoreLinks {
10321 const LENGTH: usize = 1;
10322 fn fields(&self) -> Vec<String> {
10323 vec![if let Some(self_) = &self.self_ {
10324 format!("{:?}", self_)
10325 } else {
10326 String::new()
10327 }]
10328 }
10329
10330 fn headers() -> Vec<String> {
10331 vec!["self_".to_string()]
10332 }
10333}
10334
10335#[derive(
10336 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10337)]
10338pub struct ListOfInboxesApplicationJson {
10339 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
10340 pub underscore_links: Option<ListOfInboxesApplicationJsonUnderscoreLinks>,
10341 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
10342 pub results: Option<Vec<InboxResponse>>,
10343}
10344
10345impl std::fmt::Display for ListOfInboxesApplicationJson {
10346 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10347 write!(
10348 f,
10349 "{}",
10350 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10351 )
10352 }
10353}
10354
10355impl tabled::Tabled for ListOfInboxesApplicationJson {
10356 const LENGTH: usize = 2;
10357 fn fields(&self) -> Vec<String> {
10358 vec![
10359 if let Some(underscore_links) = &self.underscore_links {
10360 format!("{:?}", underscore_links)
10361 } else {
10362 String::new()
10363 },
10364 if let Some(results) = &self.results {
10365 format!("{:?}", results)
10366 } else {
10367 String::new()
10368 },
10369 ]
10370 }
10371
10372 fn headers() -> Vec<String> {
10373 vec!["underscore_links".to_string(), "results".to_string()]
10374 }
10375}
10376
10377#[derive(
10378 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
10379)]
10380pub struct ListOfCommentsApplicationJsonUnderscoreLinks {
10381 #[doc = "Link to resource"]
10382 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
10383 pub self_: Option<String>,
10384}
10385
10386impl std::fmt::Display for ListOfCommentsApplicationJsonUnderscoreLinks {
10387 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10388 write!(
10389 f,
10390 "{}",
10391 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10392 )
10393 }
10394}
10395
10396impl tabled::Tabled for ListOfCommentsApplicationJsonUnderscoreLinks {
10397 const LENGTH: usize = 1;
10398 fn fields(&self) -> Vec<String> {
10399 vec![if let Some(self_) = &self.self_ {
10400 format!("{:?}", self_)
10401 } else {
10402 String::new()
10403 }]
10404 }
10405
10406 fn headers() -> Vec<String> {
10407 vec!["self_".to_string()]
10408 }
10409}
10410
10411#[derive(
10412 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10413)]
10414pub struct ListOfCommentsApplicationJson {
10415 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
10416 pub underscore_links: Option<ListOfCommentsApplicationJsonUnderscoreLinks>,
10417 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
10418 pub results: Option<Vec<CommentResponse>>,
10419}
10420
10421impl std::fmt::Display for ListOfCommentsApplicationJson {
10422 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10423 write!(
10424 f,
10425 "{}",
10426 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10427 )
10428 }
10429}
10430
10431impl tabled::Tabled for ListOfCommentsApplicationJson {
10432 const LENGTH: usize = 2;
10433 fn fields(&self) -> Vec<String> {
10434 vec![
10435 if let Some(underscore_links) = &self.underscore_links {
10436 format!("{:?}", underscore_links)
10437 } else {
10438 String::new()
10439 },
10440 if let Some(results) = &self.results {
10441 format!("{:?}", results)
10442 } else {
10443 String::new()
10444 },
10445 ]
10446 }
10447
10448 fn headers() -> Vec<String> {
10449 vec!["underscore_links".to_string(), "results".to_string()]
10450 }
10451}
10452
10453#[derive(
10454 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
10455)]
10456pub struct ListOfTeamsApplicationJsonUnderscoreLinks {
10457 #[doc = "Link to resource"]
10458 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
10459 pub self_: Option<String>,
10460}
10461
10462impl std::fmt::Display for ListOfTeamsApplicationJsonUnderscoreLinks {
10463 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10464 write!(
10465 f,
10466 "{}",
10467 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10468 )
10469 }
10470}
10471
10472impl tabled::Tabled for ListOfTeamsApplicationJsonUnderscoreLinks {
10473 const LENGTH: usize = 1;
10474 fn fields(&self) -> Vec<String> {
10475 vec![if let Some(self_) = &self.self_ {
10476 format!("{:?}", self_)
10477 } else {
10478 String::new()
10479 }]
10480 }
10481
10482 fn headers() -> Vec<String> {
10483 vec!["self_".to_string()]
10484 }
10485}
10486
10487#[derive(
10488 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10489)]
10490pub struct ListOfTeamsApplicationJson {
10491 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
10492 pub underscore_links: Option<ListOfTeamsApplicationJsonUnderscoreLinks>,
10493 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
10494 pub results: Option<Vec<TeamResponse>>,
10495}
10496
10497impl std::fmt::Display for ListOfTeamsApplicationJson {
10498 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10499 write!(
10500 f,
10501 "{}",
10502 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10503 )
10504 }
10505}
10506
10507impl tabled::Tabled for ListOfTeamsApplicationJson {
10508 const LENGTH: usize = 2;
10509 fn fields(&self) -> Vec<String> {
10510 vec![
10511 if let Some(underscore_links) = &self.underscore_links {
10512 format!("{:?}", underscore_links)
10513 } else {
10514 String::new()
10515 },
10516 if let Some(results) = &self.results {
10517 format!("{:?}", results)
10518 } else {
10519 String::new()
10520 },
10521 ]
10522 }
10523
10524 fn headers() -> Vec<String> {
10525 vec!["underscore_links".to_string(), "results".to_string()]
10526 }
10527}
10528
10529#[derive(
10530 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
10531)]
10532pub struct ListOfTeammatesApplicationJsonUnderscoreLinks {
10533 #[doc = "Link to resource"]
10534 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
10535 pub self_: Option<String>,
10536}
10537
10538impl std::fmt::Display for ListOfTeammatesApplicationJsonUnderscoreLinks {
10539 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10540 write!(
10541 f,
10542 "{}",
10543 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10544 )
10545 }
10546}
10547
10548impl tabled::Tabled for ListOfTeammatesApplicationJsonUnderscoreLinks {
10549 const LENGTH: usize = 1;
10550 fn fields(&self) -> Vec<String> {
10551 vec![if let Some(self_) = &self.self_ {
10552 format!("{:?}", self_)
10553 } else {
10554 String::new()
10555 }]
10556 }
10557
10558 fn headers() -> Vec<String> {
10559 vec!["self_".to_string()]
10560 }
10561}
10562
10563#[derive(
10564 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10565)]
10566pub struct ListOfTeammatesApplicationJson {
10567 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
10568 pub underscore_links: Option<ListOfTeammatesApplicationJsonUnderscoreLinks>,
10569 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
10570 pub results: Option<Vec<TeammateResponse>>,
10571}
10572
10573impl std::fmt::Display for ListOfTeammatesApplicationJson {
10574 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10575 write!(
10576 f,
10577 "{}",
10578 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10579 )
10580 }
10581}
10582
10583impl tabled::Tabled for ListOfTeammatesApplicationJson {
10584 const LENGTH: usize = 2;
10585 fn fields(&self) -> Vec<String> {
10586 vec![
10587 if let Some(underscore_links) = &self.underscore_links {
10588 format!("{:?}", underscore_links)
10589 } else {
10590 String::new()
10591 },
10592 if let Some(results) = &self.results {
10593 format!("{:?}", results)
10594 } else {
10595 String::new()
10596 },
10597 ]
10598 }
10599
10600 fn headers() -> Vec<String> {
10601 vec!["underscore_links".to_string(), "results".to_string()]
10602 }
10603}
10604
10605#[derive(
10606 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
10607)]
10608pub struct ListOfShiftsApplicationJsonUnderscoreLinks {
10609 #[doc = "Link to resource"]
10610 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
10611 pub self_: Option<String>,
10612}
10613
10614impl std::fmt::Display for ListOfShiftsApplicationJsonUnderscoreLinks {
10615 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10616 write!(
10617 f,
10618 "{}",
10619 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10620 )
10621 }
10622}
10623
10624impl tabled::Tabled for ListOfShiftsApplicationJsonUnderscoreLinks {
10625 const LENGTH: usize = 1;
10626 fn fields(&self) -> Vec<String> {
10627 vec![if let Some(self_) = &self.self_ {
10628 format!("{:?}", self_)
10629 } else {
10630 String::new()
10631 }]
10632 }
10633
10634 fn headers() -> Vec<String> {
10635 vec!["self_".to_string()]
10636 }
10637}
10638
10639#[derive(
10640 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10641)]
10642pub struct ListOfShiftsApplicationJson {
10643 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
10644 pub underscore_links: Option<ListOfShiftsApplicationJsonUnderscoreLinks>,
10645 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
10646 pub results: Option<Vec<ShiftResponse>>,
10647}
10648
10649impl std::fmt::Display for ListOfShiftsApplicationJson {
10650 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10651 write!(
10652 f,
10653 "{}",
10654 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10655 )
10656 }
10657}
10658
10659impl tabled::Tabled for ListOfShiftsApplicationJson {
10660 const LENGTH: usize = 2;
10661 fn fields(&self) -> Vec<String> {
10662 vec![
10663 if let Some(underscore_links) = &self.underscore_links {
10664 format!("{:?}", underscore_links)
10665 } else {
10666 String::new()
10667 },
10668 if let Some(results) = &self.results {
10669 format!("{:?}", results)
10670 } else {
10671 String::new()
10672 },
10673 ]
10674 }
10675
10676 fn headers() -> Vec<String> {
10677 vec!["underscore_links".to_string(), "results".to_string()]
10678 }
10679}
10680
10681#[derive(
10682 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
10683)]
10684pub struct ListOfContactsApplicationJsonUnderscoreLinks {
10685 #[doc = "Link to resource"]
10686 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
10687 pub self_: Option<String>,
10688}
10689
10690impl std::fmt::Display for ListOfContactsApplicationJsonUnderscoreLinks {
10691 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10692 write!(
10693 f,
10694 "{}",
10695 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10696 )
10697 }
10698}
10699
10700impl tabled::Tabled for ListOfContactsApplicationJsonUnderscoreLinks {
10701 const LENGTH: usize = 1;
10702 fn fields(&self) -> Vec<String> {
10703 vec![if let Some(self_) = &self.self_ {
10704 format!("{:?}", self_)
10705 } else {
10706 String::new()
10707 }]
10708 }
10709
10710 fn headers() -> Vec<String> {
10711 vec!["self_".to_string()]
10712 }
10713}
10714
10715#[derive(
10716 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10717)]
10718pub struct ListOfContactsApplicationJson {
10719 #[serde(
10720 rename = "_pagination",
10721 default,
10722 skip_serializing_if = "Option::is_none"
10723 )]
10724 pub pagination: Option<Pagination>,
10725 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
10726 pub underscore_links: Option<ListOfContactsApplicationJsonUnderscoreLinks>,
10727 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
10728 pub results: Option<Vec<ContactResponse>>,
10729}
10730
10731impl std::fmt::Display for ListOfContactsApplicationJson {
10732 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10733 write!(
10734 f,
10735 "{}",
10736 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10737 )
10738 }
10739}
10740
10741impl tabled::Tabled for ListOfContactsApplicationJson {
10742 const LENGTH: usize = 3;
10743 fn fields(&self) -> Vec<String> {
10744 vec![
10745 if let Some(pagination) = &self.pagination {
10746 format!("{:?}", pagination)
10747 } else {
10748 String::new()
10749 },
10750 if let Some(underscore_links) = &self.underscore_links {
10751 format!("{:?}", underscore_links)
10752 } else {
10753 String::new()
10754 },
10755 if let Some(results) = &self.results {
10756 format!("{:?}", results)
10757 } else {
10758 String::new()
10759 },
10760 ]
10761 }
10762
10763 fn headers() -> Vec<String> {
10764 vec![
10765 "pagination".to_string(),
10766 "underscore_links".to_string(),
10767 "results".to_string(),
10768 ]
10769 }
10770}
10771
10772#[derive(
10773 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
10774)]
10775pub struct ListOfAccountsApplicationJsonUnderscoreLinks {
10776 #[doc = "Link to resource"]
10777 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
10778 pub self_: Option<String>,
10779}
10780
10781impl std::fmt::Display for ListOfAccountsApplicationJsonUnderscoreLinks {
10782 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10783 write!(
10784 f,
10785 "{}",
10786 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10787 )
10788 }
10789}
10790
10791impl tabled::Tabled for ListOfAccountsApplicationJsonUnderscoreLinks {
10792 const LENGTH: usize = 1;
10793 fn fields(&self) -> Vec<String> {
10794 vec![if let Some(self_) = &self.self_ {
10795 format!("{:?}", self_)
10796 } else {
10797 String::new()
10798 }]
10799 }
10800
10801 fn headers() -> Vec<String> {
10802 vec!["self_".to_string()]
10803 }
10804}
10805
10806#[derive(
10807 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10808)]
10809pub struct ListOfAccountsApplicationJson {
10810 #[serde(
10811 rename = "_pagination",
10812 default,
10813 skip_serializing_if = "Option::is_none"
10814 )]
10815 pub pagination: Option<Pagination>,
10816 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
10817 pub underscore_links: Option<ListOfAccountsApplicationJsonUnderscoreLinks>,
10818 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
10819 pub results: Option<Vec<AccountResponse>>,
10820}
10821
10822impl std::fmt::Display for ListOfAccountsApplicationJson {
10823 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10824 write!(
10825 f,
10826 "{}",
10827 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10828 )
10829 }
10830}
10831
10832impl tabled::Tabled for ListOfAccountsApplicationJson {
10833 const LENGTH: usize = 3;
10834 fn fields(&self) -> Vec<String> {
10835 vec![
10836 if let Some(pagination) = &self.pagination {
10837 format!("{:?}", pagination)
10838 } else {
10839 String::new()
10840 },
10841 if let Some(underscore_links) = &self.underscore_links {
10842 format!("{:?}", underscore_links)
10843 } else {
10844 String::new()
10845 },
10846 if let Some(results) = &self.results {
10847 format!("{:?}", results)
10848 } else {
10849 String::new()
10850 },
10851 ]
10852 }
10853
10854 fn headers() -> Vec<String> {
10855 vec![
10856 "pagination".to_string(),
10857 "underscore_links".to_string(),
10858 "results".to_string(),
10859 ]
10860 }
10861}
10862
10863#[derive(
10864 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
10865)]
10866pub struct ListOfContactGroupsApplicationJsonUnderscoreLinks {
10867 #[doc = "Link to resource"]
10868 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
10869 pub self_: Option<String>,
10870}
10871
10872impl std::fmt::Display for ListOfContactGroupsApplicationJsonUnderscoreLinks {
10873 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10874 write!(
10875 f,
10876 "{}",
10877 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10878 )
10879 }
10880}
10881
10882impl tabled::Tabled for ListOfContactGroupsApplicationJsonUnderscoreLinks {
10883 const LENGTH: usize = 1;
10884 fn fields(&self) -> Vec<String> {
10885 vec![if let Some(self_) = &self.self_ {
10886 format!("{:?}", self_)
10887 } else {
10888 String::new()
10889 }]
10890 }
10891
10892 fn headers() -> Vec<String> {
10893 vec!["self_".to_string()]
10894 }
10895}
10896
10897#[derive(
10898 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10899)]
10900pub struct ListOfContactGroupsApplicationJson {
10901 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
10902 pub underscore_links: Option<ListOfContactGroupsApplicationJsonUnderscoreLinks>,
10903 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
10904 pub results: Option<Vec<ContactGroupResponses>>,
10905}
10906
10907impl std::fmt::Display for ListOfContactGroupsApplicationJson {
10908 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10909 write!(
10910 f,
10911 "{}",
10912 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10913 )
10914 }
10915}
10916
10917impl tabled::Tabled for ListOfContactGroupsApplicationJson {
10918 const LENGTH: usize = 2;
10919 fn fields(&self) -> Vec<String> {
10920 vec![
10921 if let Some(underscore_links) = &self.underscore_links {
10922 format!("{:?}", underscore_links)
10923 } else {
10924 String::new()
10925 },
10926 if let Some(results) = &self.results {
10927 format!("{:?}", results)
10928 } else {
10929 String::new()
10930 },
10931 ]
10932 }
10933
10934 fn headers() -> Vec<String> {
10935 vec!["underscore_links".to_string(), "results".to_string()]
10936 }
10937}
10938
10939#[derive(
10940 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
10941)]
10942pub struct ListOfContactNotesApplicationJsonUnderscoreLinks {
10943 #[doc = "Link to resource"]
10944 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
10945 pub self_: Option<String>,
10946}
10947
10948impl std::fmt::Display for ListOfContactNotesApplicationJsonUnderscoreLinks {
10949 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10950 write!(
10951 f,
10952 "{}",
10953 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10954 )
10955 }
10956}
10957
10958impl tabled::Tabled for ListOfContactNotesApplicationJsonUnderscoreLinks {
10959 const LENGTH: usize = 1;
10960 fn fields(&self) -> Vec<String> {
10961 vec![if let Some(self_) = &self.self_ {
10962 format!("{:?}", self_)
10963 } else {
10964 String::new()
10965 }]
10966 }
10967
10968 fn headers() -> Vec<String> {
10969 vec!["self_".to_string()]
10970 }
10971}
10972
10973#[derive(
10974 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10975)]
10976pub struct ListOfContactNotesApplicationJson {
10977 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
10978 pub underscore_links: Option<ListOfContactNotesApplicationJsonUnderscoreLinks>,
10979 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
10980 pub results: Option<Vec<ContactNoteResponses>>,
10981}
10982
10983impl std::fmt::Display for ListOfContactNotesApplicationJson {
10984 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10985 write!(
10986 f,
10987 "{}",
10988 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10989 )
10990 }
10991}
10992
10993impl tabled::Tabled for ListOfContactNotesApplicationJson {
10994 const LENGTH: usize = 2;
10995 fn fields(&self) -> Vec<String> {
10996 vec![
10997 if let Some(underscore_links) = &self.underscore_links {
10998 format!("{:?}", underscore_links)
10999 } else {
11000 String::new()
11001 },
11002 if let Some(results) = &self.results {
11003 format!("{:?}", results)
11004 } else {
11005 String::new()
11006 },
11007 ]
11008 }
11009
11010 fn headers() -> Vec<String> {
11011 vec!["underscore_links".to_string(), "results".to_string()]
11012 }
11013}
11014
11015#[derive(
11016 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
11017)]
11018pub struct ListOfMessagesApplicationJsonUnderscoreLinks {
11019 #[doc = "Link to resource"]
11020 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
11021 pub self_: Option<String>,
11022}
11023
11024impl std::fmt::Display for ListOfMessagesApplicationJsonUnderscoreLinks {
11025 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11026 write!(
11027 f,
11028 "{}",
11029 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11030 )
11031 }
11032}
11033
11034impl tabled::Tabled for ListOfMessagesApplicationJsonUnderscoreLinks {
11035 const LENGTH: usize = 1;
11036 fn fields(&self) -> Vec<String> {
11037 vec![if let Some(self_) = &self.self_ {
11038 format!("{:?}", self_)
11039 } else {
11040 String::new()
11041 }]
11042 }
11043
11044 fn headers() -> Vec<String> {
11045 vec!["self_".to_string()]
11046 }
11047}
11048
11049#[derive(
11050 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11051)]
11052pub struct ListOfMessagesApplicationJson {
11053 #[serde(
11054 rename = "_pagination",
11055 default,
11056 skip_serializing_if = "Option::is_none"
11057 )]
11058 pub pagination: Option<Pagination>,
11059 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
11060 pub underscore_links: Option<ListOfMessagesApplicationJsonUnderscoreLinks>,
11061 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
11062 pub results: Option<Vec<MessageResponse>>,
11063}
11064
11065impl std::fmt::Display for ListOfMessagesApplicationJson {
11066 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11067 write!(
11068 f,
11069 "{}",
11070 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11071 )
11072 }
11073}
11074
11075impl tabled::Tabled for ListOfMessagesApplicationJson {
11076 const LENGTH: usize = 3;
11077 fn fields(&self) -> Vec<String> {
11078 vec![
11079 if let Some(pagination) = &self.pagination {
11080 format!("{:?}", pagination)
11081 } else {
11082 String::new()
11083 },
11084 if let Some(underscore_links) = &self.underscore_links {
11085 format!("{:?}", underscore_links)
11086 } else {
11087 String::new()
11088 },
11089 if let Some(results) = &self.results {
11090 format!("{:?}", results)
11091 } else {
11092 String::new()
11093 },
11094 ]
11095 }
11096
11097 fn headers() -> Vec<String> {
11098 vec![
11099 "pagination".to_string(),
11100 "underscore_links".to_string(),
11101 "results".to_string(),
11102 ]
11103 }
11104}
11105
11106#[derive(
11107 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
11108)]
11109pub struct ListOfSeenReceiptsApplicationJsonUnderscoreLinks {
11110 #[doc = "Link to resource"]
11111 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
11112 pub self_: Option<String>,
11113}
11114
11115impl std::fmt::Display for ListOfSeenReceiptsApplicationJsonUnderscoreLinks {
11116 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11117 write!(
11118 f,
11119 "{}",
11120 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11121 )
11122 }
11123}
11124
11125impl tabled::Tabled for ListOfSeenReceiptsApplicationJsonUnderscoreLinks {
11126 const LENGTH: usize = 1;
11127 fn fields(&self) -> Vec<String> {
11128 vec![if let Some(self_) = &self.self_ {
11129 format!("{:?}", self_)
11130 } else {
11131 String::new()
11132 }]
11133 }
11134
11135 fn headers() -> Vec<String> {
11136 vec!["self_".to_string()]
11137 }
11138}
11139
11140#[derive(
11141 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11142)]
11143pub struct ListOfSeenReceiptsApplicationJson {
11144 #[serde(
11145 rename = "_pagination",
11146 default,
11147 skip_serializing_if = "Option::is_none"
11148 )]
11149 pub pagination: Option<Pagination>,
11150 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
11151 pub underscore_links: Option<ListOfSeenReceiptsApplicationJsonUnderscoreLinks>,
11152 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
11153 pub results: Option<Vec<SeenReceiptResponse>>,
11154}
11155
11156impl std::fmt::Display for ListOfSeenReceiptsApplicationJson {
11157 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11158 write!(
11159 f,
11160 "{}",
11161 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11162 )
11163 }
11164}
11165
11166impl tabled::Tabled for ListOfSeenReceiptsApplicationJson {
11167 const LENGTH: usize = 3;
11168 fn fields(&self) -> Vec<String> {
11169 vec![
11170 if let Some(pagination) = &self.pagination {
11171 format!("{:?}", pagination)
11172 } else {
11173 String::new()
11174 },
11175 if let Some(underscore_links) = &self.underscore_links {
11176 format!("{:?}", underscore_links)
11177 } else {
11178 String::new()
11179 },
11180 if let Some(results) = &self.results {
11181 format!("{:?}", results)
11182 } else {
11183 String::new()
11184 },
11185 ]
11186 }
11187
11188 fn headers() -> Vec<String> {
11189 vec![
11190 "pagination".to_string(),
11191 "underscore_links".to_string(),
11192 "results".to_string(),
11193 ]
11194 }
11195}
11196
11197#[derive(
11198 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
11199)]
11200pub struct ListOfConversationsApplicationJsonUnderscoreLinks {
11201 #[doc = "Link to resource"]
11202 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
11203 pub self_: Option<String>,
11204}
11205
11206impl std::fmt::Display for ListOfConversationsApplicationJsonUnderscoreLinks {
11207 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11208 write!(
11209 f,
11210 "{}",
11211 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11212 )
11213 }
11214}
11215
11216impl tabled::Tabled for ListOfConversationsApplicationJsonUnderscoreLinks {
11217 const LENGTH: usize = 1;
11218 fn fields(&self) -> Vec<String> {
11219 vec![if let Some(self_) = &self.self_ {
11220 format!("{:?}", self_)
11221 } else {
11222 String::new()
11223 }]
11224 }
11225
11226 fn headers() -> Vec<String> {
11227 vec!["self_".to_string()]
11228 }
11229}
11230
11231#[derive(
11232 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11233)]
11234pub struct ListOfConversationsApplicationJson {
11235 #[serde(
11236 rename = "_pagination",
11237 default,
11238 skip_serializing_if = "Option::is_none"
11239 )]
11240 pub pagination: Option<Pagination>,
11241 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
11242 pub underscore_links: Option<ListOfConversationsApplicationJsonUnderscoreLinks>,
11243 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
11244 pub results: Option<Vec<ConversationResponse>>,
11245}
11246
11247impl std::fmt::Display for ListOfConversationsApplicationJson {
11248 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11249 write!(
11250 f,
11251 "{}",
11252 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11253 )
11254 }
11255}
11256
11257impl tabled::Tabled for ListOfConversationsApplicationJson {
11258 const LENGTH: usize = 3;
11259 fn fields(&self) -> Vec<String> {
11260 vec![
11261 if let Some(pagination) = &self.pagination {
11262 format!("{:?}", pagination)
11263 } else {
11264 String::new()
11265 },
11266 if let Some(underscore_links) = &self.underscore_links {
11267 format!("{:?}", underscore_links)
11268 } else {
11269 String::new()
11270 },
11271 if let Some(results) = &self.results {
11272 format!("{:?}", results)
11273 } else {
11274 String::new()
11275 },
11276 ]
11277 }
11278
11279 fn headers() -> Vec<String> {
11280 vec![
11281 "pagination".to_string(),
11282 "underscore_links".to_string(),
11283 "results".to_string(),
11284 ]
11285 }
11286}
11287
11288#[derive(
11289 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11290)]
11291pub struct ListOfConversationSearchResultsApplicationJson {
11292 #[serde(
11293 rename = "_pagination",
11294 default,
11295 skip_serializing_if = "Option::is_none"
11296 )]
11297 pub pagination: Option<Pagination>,
11298 #[doc = "Total number of matching conversations"]
11299 #[serde(rename = "_total", default, skip_serializing_if = "Option::is_none")]
11300 pub total: Option<i64>,
11301 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
11302 pub results: Option<Vec<ConversationResponse>>,
11303}
11304
11305impl std::fmt::Display for ListOfConversationSearchResultsApplicationJson {
11306 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11307 write!(
11308 f,
11309 "{}",
11310 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11311 )
11312 }
11313}
11314
11315impl tabled::Tabled for ListOfConversationSearchResultsApplicationJson {
11316 const LENGTH: usize = 3;
11317 fn fields(&self) -> Vec<String> {
11318 vec![
11319 if let Some(pagination) = &self.pagination {
11320 format!("{:?}", pagination)
11321 } else {
11322 String::new()
11323 },
11324 if let Some(total) = &self.total {
11325 format!("{:?}", total)
11326 } else {
11327 String::new()
11328 },
11329 if let Some(results) = &self.results {
11330 format!("{:?}", results)
11331 } else {
11332 String::new()
11333 },
11334 ]
11335 }
11336
11337 fn headers() -> Vec<String> {
11338 vec![
11339 "pagination".to_string(),
11340 "total".to_string(),
11341 "results".to_string(),
11342 ]
11343 }
11344}
11345
11346#[derive(
11347 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
11348)]
11349pub struct ListOfEventsApplicationJsonUnderscoreLinks {
11350 #[doc = "Link to resource"]
11351 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
11352 pub self_: Option<String>,
11353}
11354
11355impl std::fmt::Display for ListOfEventsApplicationJsonUnderscoreLinks {
11356 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11357 write!(
11358 f,
11359 "{}",
11360 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11361 )
11362 }
11363}
11364
11365impl tabled::Tabled for ListOfEventsApplicationJsonUnderscoreLinks {
11366 const LENGTH: usize = 1;
11367 fn fields(&self) -> Vec<String> {
11368 vec![if let Some(self_) = &self.self_ {
11369 format!("{:?}", self_)
11370 } else {
11371 String::new()
11372 }]
11373 }
11374
11375 fn headers() -> Vec<String> {
11376 vec!["self_".to_string()]
11377 }
11378}
11379
11380#[derive(
11381 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11382)]
11383pub struct ListOfEventsApplicationJson {
11384 #[serde(
11385 rename = "_pagination",
11386 default,
11387 skip_serializing_if = "Option::is_none"
11388 )]
11389 pub pagination: Option<Pagination>,
11390 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
11391 pub underscore_links: Option<ListOfEventsApplicationJsonUnderscoreLinks>,
11392 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
11393 pub results: Option<Vec<EventResponse>>,
11394}
11395
11396impl std::fmt::Display for ListOfEventsApplicationJson {
11397 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11398 write!(
11399 f,
11400 "{}",
11401 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11402 )
11403 }
11404}
11405
11406impl tabled::Tabled for ListOfEventsApplicationJson {
11407 const LENGTH: usize = 3;
11408 fn fields(&self) -> Vec<String> {
11409 vec![
11410 if let Some(pagination) = &self.pagination {
11411 format!("{:?}", pagination)
11412 } else {
11413 String::new()
11414 },
11415 if let Some(underscore_links) = &self.underscore_links {
11416 format!("{:?}", underscore_links)
11417 } else {
11418 String::new()
11419 },
11420 if let Some(results) = &self.results {
11421 format!("{:?}", results)
11422 } else {
11423 String::new()
11424 },
11425 ]
11426 }
11427
11428 fn headers() -> Vec<String> {
11429 vec![
11430 "pagination".to_string(),
11431 "underscore_links".to_string(),
11432 "results".to_string(),
11433 ]
11434 }
11435}
11436
11437#[derive(
11438 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
11439)]
11440pub struct ListOfRolesApplicationJsonUnderscoreLinks {
11441 #[doc = "Link to resource"]
11442 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
11443 pub self_: Option<String>,
11444}
11445
11446impl std::fmt::Display for ListOfRolesApplicationJsonUnderscoreLinks {
11447 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11448 write!(
11449 f,
11450 "{}",
11451 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11452 )
11453 }
11454}
11455
11456impl tabled::Tabled for ListOfRolesApplicationJsonUnderscoreLinks {
11457 const LENGTH: usize = 1;
11458 fn fields(&self) -> Vec<String> {
11459 vec![if let Some(self_) = &self.self_ {
11460 format!("{:?}", self_)
11461 } else {
11462 String::new()
11463 }]
11464 }
11465
11466 fn headers() -> Vec<String> {
11467 vec!["self_".to_string()]
11468 }
11469}
11470
11471#[derive(
11472 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11473)]
11474pub struct ListOfRolesApplicationJson {
11475 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
11476 pub underscore_links: Option<ListOfRolesApplicationJsonUnderscoreLinks>,
11477 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
11478 pub results: Option<Vec<RoleResponse>>,
11479}
11480
11481impl std::fmt::Display for ListOfRolesApplicationJson {
11482 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11483 write!(
11484 f,
11485 "{}",
11486 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11487 )
11488 }
11489}
11490
11491impl tabled::Tabled for ListOfRolesApplicationJson {
11492 const LENGTH: usize = 2;
11493 fn fields(&self) -> Vec<String> {
11494 vec![
11495 if let Some(underscore_links) = &self.underscore_links {
11496 format!("{:?}", underscore_links)
11497 } else {
11498 String::new()
11499 },
11500 if let Some(results) = &self.results {
11501 format!("{:?}", results)
11502 } else {
11503 String::new()
11504 },
11505 ]
11506 }
11507
11508 fn headers() -> Vec<String> {
11509 vec!["underscore_links".to_string(), "results".to_string()]
11510 }
11511}
11512
11513#[derive(
11514 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
11515)]
11516pub struct ListOfRulesApplicationJsonUnderscoreLinks {
11517 #[doc = "Link to resource"]
11518 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
11519 pub self_: Option<String>,
11520}
11521
11522impl std::fmt::Display for ListOfRulesApplicationJsonUnderscoreLinks {
11523 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11524 write!(
11525 f,
11526 "{}",
11527 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11528 )
11529 }
11530}
11531
11532impl tabled::Tabled for ListOfRulesApplicationJsonUnderscoreLinks {
11533 const LENGTH: usize = 1;
11534 fn fields(&self) -> Vec<String> {
11535 vec![if let Some(self_) = &self.self_ {
11536 format!("{:?}", self_)
11537 } else {
11538 String::new()
11539 }]
11540 }
11541
11542 fn headers() -> Vec<String> {
11543 vec!["self_".to_string()]
11544 }
11545}
11546
11547#[derive(
11548 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11549)]
11550pub struct ListOfRulesApplicationJson {
11551 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
11552 pub underscore_links: Option<ListOfRulesApplicationJsonUnderscoreLinks>,
11553 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
11554 pub results: Option<Vec<RuleResponse>>,
11555}
11556
11557impl std::fmt::Display for ListOfRulesApplicationJson {
11558 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11559 write!(
11560 f,
11561 "{}",
11562 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11563 )
11564 }
11565}
11566
11567impl tabled::Tabled for ListOfRulesApplicationJson {
11568 const LENGTH: usize = 2;
11569 fn fields(&self) -> Vec<String> {
11570 vec![
11571 if let Some(underscore_links) = &self.underscore_links {
11572 format!("{:?}", underscore_links)
11573 } else {
11574 String::new()
11575 },
11576 if let Some(results) = &self.results {
11577 format!("{:?}", results)
11578 } else {
11579 String::new()
11580 },
11581 ]
11582 }
11583
11584 fn headers() -> Vec<String> {
11585 vec!["underscore_links".to_string(), "results".to_string()]
11586 }
11587}
11588
11589#[derive(
11590 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
11591)]
11592pub struct ListOfTagsApplicationJsonUnderscoreLinks {
11593 #[doc = "Link to resource"]
11594 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
11595 pub self_: Option<String>,
11596}
11597
11598impl std::fmt::Display for ListOfTagsApplicationJsonUnderscoreLinks {
11599 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11600 write!(
11601 f,
11602 "{}",
11603 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11604 )
11605 }
11606}
11607
11608impl tabled::Tabled for ListOfTagsApplicationJsonUnderscoreLinks {
11609 const LENGTH: usize = 1;
11610 fn fields(&self) -> Vec<String> {
11611 vec![if let Some(self_) = &self.self_ {
11612 format!("{:?}", self_)
11613 } else {
11614 String::new()
11615 }]
11616 }
11617
11618 fn headers() -> Vec<String> {
11619 vec!["self_".to_string()]
11620 }
11621}
11622
11623#[derive(
11624 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11625)]
11626pub struct ListOfTagsApplicationJson {
11627 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
11628 pub underscore_links: Option<ListOfTagsApplicationJsonUnderscoreLinks>,
11629 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
11630 pub results: Option<Vec<TagResponse>>,
11631}
11632
11633impl std::fmt::Display for ListOfTagsApplicationJson {
11634 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11635 write!(
11636 f,
11637 "{}",
11638 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11639 )
11640 }
11641}
11642
11643impl tabled::Tabled for ListOfTagsApplicationJson {
11644 const LENGTH: usize = 2;
11645 fn fields(&self) -> Vec<String> {
11646 vec![
11647 if let Some(underscore_links) = &self.underscore_links {
11648 format!("{:?}", underscore_links)
11649 } else {
11650 String::new()
11651 },
11652 if let Some(results) = &self.results {
11653 format!("{:?}", results)
11654 } else {
11655 String::new()
11656 },
11657 ]
11658 }
11659
11660 fn headers() -> Vec<String> {
11661 vec!["underscore_links".to_string(), "results".to_string()]
11662 }
11663}
11664
11665#[derive(
11666 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
11667)]
11668pub struct ListOfLinksApplicationJsonUnderscoreLinks {
11669 #[doc = "Link to resource"]
11670 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
11671 pub self_: Option<String>,
11672}
11673
11674impl std::fmt::Display for ListOfLinksApplicationJsonUnderscoreLinks {
11675 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11676 write!(
11677 f,
11678 "{}",
11679 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11680 )
11681 }
11682}
11683
11684impl tabled::Tabled for ListOfLinksApplicationJsonUnderscoreLinks {
11685 const LENGTH: usize = 1;
11686 fn fields(&self) -> Vec<String> {
11687 vec![if let Some(self_) = &self.self_ {
11688 format!("{:?}", self_)
11689 } else {
11690 String::new()
11691 }]
11692 }
11693
11694 fn headers() -> Vec<String> {
11695 vec!["self_".to_string()]
11696 }
11697}
11698
11699#[derive(
11700 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11701)]
11702pub struct ListOfLinksApplicationJson {
11703 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
11704 pub underscore_links: Option<ListOfLinksApplicationJsonUnderscoreLinks>,
11705 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
11706 pub results: Option<Vec<LinkResponse>>,
11707}
11708
11709impl std::fmt::Display for ListOfLinksApplicationJson {
11710 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11711 write!(
11712 f,
11713 "{}",
11714 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11715 )
11716 }
11717}
11718
11719impl tabled::Tabled for ListOfLinksApplicationJson {
11720 const LENGTH: usize = 2;
11721 fn fields(&self) -> Vec<String> {
11722 vec![
11723 if let Some(underscore_links) = &self.underscore_links {
11724 format!("{:?}", underscore_links)
11725 } else {
11726 String::new()
11727 },
11728 if let Some(results) = &self.results {
11729 format!("{:?}", results)
11730 } else {
11731 String::new()
11732 },
11733 ]
11734 }
11735
11736 fn headers() -> Vec<String> {
11737 vec!["underscore_links".to_string(), "results".to_string()]
11738 }
11739}
11740
11741#[derive(
11742 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
11743)]
11744pub struct ListOfChannelsApplicationJsonUnderscoreLinks {
11745 #[doc = "Link to resource"]
11746 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
11747 pub self_: Option<String>,
11748}
11749
11750impl std::fmt::Display for ListOfChannelsApplicationJsonUnderscoreLinks {
11751 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11752 write!(
11753 f,
11754 "{}",
11755 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11756 )
11757 }
11758}
11759
11760impl tabled::Tabled for ListOfChannelsApplicationJsonUnderscoreLinks {
11761 const LENGTH: usize = 1;
11762 fn fields(&self) -> Vec<String> {
11763 vec![if let Some(self_) = &self.self_ {
11764 format!("{:?}", self_)
11765 } else {
11766 String::new()
11767 }]
11768 }
11769
11770 fn headers() -> Vec<String> {
11771 vec!["self_".to_string()]
11772 }
11773}
11774
11775#[derive(
11776 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11777)]
11778pub struct ListOfChannelsApplicationJson {
11779 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
11780 pub underscore_links: Option<ListOfChannelsApplicationJsonUnderscoreLinks>,
11781 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
11782 pub results: Option<Vec<ChannelResponse>>,
11783}
11784
11785impl std::fmt::Display for ListOfChannelsApplicationJson {
11786 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11787 write!(
11788 f,
11789 "{}",
11790 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11791 )
11792 }
11793}
11794
11795impl tabled::Tabled for ListOfChannelsApplicationJson {
11796 const LENGTH: usize = 2;
11797 fn fields(&self) -> Vec<String> {
11798 vec![
11799 if let Some(underscore_links) = &self.underscore_links {
11800 format!("{:?}", underscore_links)
11801 } else {
11802 String::new()
11803 },
11804 if let Some(results) = &self.results {
11805 format!("{:?}", results)
11806 } else {
11807 String::new()
11808 },
11809 ]
11810 }
11811
11812 fn headers() -> Vec<String> {
11813 vec!["underscore_links".to_string(), "results".to_string()]
11814 }
11815}
11816
11817#[derive(
11818 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
11819)]
11820pub struct ListOfCustomFieldsApplicationJsonUnderscoreLinks {
11821 #[doc = "Link to resource"]
11822 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
11823 pub self_: Option<String>,
11824}
11825
11826impl std::fmt::Display for ListOfCustomFieldsApplicationJsonUnderscoreLinks {
11827 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11828 write!(
11829 f,
11830 "{}",
11831 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11832 )
11833 }
11834}
11835
11836impl tabled::Tabled for ListOfCustomFieldsApplicationJsonUnderscoreLinks {
11837 const LENGTH: usize = 1;
11838 fn fields(&self) -> Vec<String> {
11839 vec![if let Some(self_) = &self.self_ {
11840 format!("{:?}", self_)
11841 } else {
11842 String::new()
11843 }]
11844 }
11845
11846 fn headers() -> Vec<String> {
11847 vec!["self_".to_string()]
11848 }
11849}
11850
11851#[derive(
11852 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11853)]
11854pub struct ListOfCustomFieldsApplicationJson {
11855 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
11856 pub underscore_links: Option<ListOfCustomFieldsApplicationJsonUnderscoreLinks>,
11857 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
11858 pub results: Option<Vec<CustomFieldResponse>>,
11859}
11860
11861impl std::fmt::Display for ListOfCustomFieldsApplicationJson {
11862 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11863 write!(
11864 f,
11865 "{}",
11866 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11867 )
11868 }
11869}
11870
11871impl tabled::Tabled for ListOfCustomFieldsApplicationJson {
11872 const LENGTH: usize = 2;
11873 fn fields(&self) -> Vec<String> {
11874 vec![
11875 if let Some(underscore_links) = &self.underscore_links {
11876 format!("{:?}", underscore_links)
11877 } else {
11878 String::new()
11879 },
11880 if let Some(results) = &self.results {
11881 format!("{:?}", results)
11882 } else {
11883 String::new()
11884 },
11885 ]
11886 }
11887
11888 fn headers() -> Vec<String> {
11889 vec!["underscore_links".to_string(), "results".to_string()]
11890 }
11891}
11892
11893#[derive(
11894 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
11895)]
11896pub struct AcceptedMessageApplicationJson {
11897 #[serde(default, skip_serializing_if = "Option::is_none")]
11898 pub status: Option<String>,
11899 #[doc = "Message unique identifier"]
11900 #[serde(default, skip_serializing_if = "Option::is_none")]
11901 pub message_uid: Option<String>,
11902}
11903
11904impl std::fmt::Display for AcceptedMessageApplicationJson {
11905 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11906 write!(
11907 f,
11908 "{}",
11909 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11910 )
11911 }
11912}
11913
11914impl tabled::Tabled for AcceptedMessageApplicationJson {
11915 const LENGTH: usize = 2;
11916 fn fields(&self) -> Vec<String> {
11917 vec![
11918 if let Some(status) = &self.status {
11919 format!("{:?}", status)
11920 } else {
11921 String::new()
11922 },
11923 if let Some(message_uid) = &self.message_uid {
11924 format!("{:?}", message_uid)
11925 } else {
11926 String::new()
11927 },
11928 ]
11929 }
11930
11931 fn headers() -> Vec<String> {
11932 vec!["status".to_string(), "message_uid".to_string()]
11933 }
11934}
11935
11936#[derive(
11937 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
11938)]
11939pub struct AcceptedCannedAnswerFolderDeletionApplicationJson {
11940 #[serde(default, skip_serializing_if = "Option::is_none")]
11941 pub status: Option<String>,
11942 #[doc = "id of the message template to be deleted"]
11943 #[serde(default, skip_serializing_if = "Option::is_none")]
11944 pub message_template_folder_id: Option<String>,
11945}
11946
11947impl std::fmt::Display for AcceptedCannedAnswerFolderDeletionApplicationJson {
11948 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11949 write!(
11950 f,
11951 "{}",
11952 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11953 )
11954 }
11955}
11956
11957impl tabled::Tabled for AcceptedCannedAnswerFolderDeletionApplicationJson {
11958 const LENGTH: usize = 2;
11959 fn fields(&self) -> Vec<String> {
11960 vec![
11961 if let Some(status) = &self.status {
11962 format!("{:?}", status)
11963 } else {
11964 String::new()
11965 },
11966 if let Some(message_template_folder_id) = &self.message_template_folder_id {
11967 format!("{:?}", message_template_folder_id)
11968 } else {
11969 String::new()
11970 },
11971 ]
11972 }
11973
11974 fn headers() -> Vec<String> {
11975 vec![
11976 "status".to_string(),
11977 "message_template_folder_id".to_string(),
11978 ]
11979 }
11980}
11981
11982#[derive(
11983 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
11984)]
11985pub struct AcceptedApplicationJson {
11986 #[serde(default, skip_serializing_if = "Option::is_none")]
11987 pub status: Option<String>,
11988}
11989
11990impl std::fmt::Display for AcceptedApplicationJson {
11991 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11992 write!(
11993 f,
11994 "{}",
11995 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11996 )
11997 }
11998}
11999
12000impl tabled::Tabled for AcceptedApplicationJson {
12001 const LENGTH: usize = 1;
12002 fn fields(&self) -> Vec<String> {
12003 vec![if let Some(status) = &self.status {
12004 format!("{:?}", status)
12005 } else {
12006 String::new()
12007 }]
12008 }
12009
12010 fn headers() -> Vec<String> {
12011 vec!["status".to_string()]
12012 }
12013}
12014
12015#[derive(
12016 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
12017)]
12018pub struct ListAccountsResponseUnderscoreLinks {
12019 #[doc = "Link to resource"]
12020 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
12021 pub self_: Option<String>,
12022}
12023
12024impl std::fmt::Display for ListAccountsResponseUnderscoreLinks {
12025 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12026 write!(
12027 f,
12028 "{}",
12029 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12030 )
12031 }
12032}
12033
12034impl tabled::Tabled for ListAccountsResponseUnderscoreLinks {
12035 const LENGTH: usize = 1;
12036 fn fields(&self) -> Vec<String> {
12037 vec![if let Some(self_) = &self.self_ {
12038 format!("{:?}", self_)
12039 } else {
12040 String::new()
12041 }]
12042 }
12043
12044 fn headers() -> Vec<String> {
12045 vec!["self_".to_string()]
12046 }
12047}
12048
12049#[derive(
12050 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12051)]
12052pub struct ListAccountsResponse {
12053 #[serde(
12054 rename = "_pagination",
12055 default,
12056 skip_serializing_if = "Option::is_none"
12057 )]
12058 pub pagination: Option<Pagination>,
12059 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
12060 pub underscore_links: Option<ListAccountsResponseUnderscoreLinks>,
12061 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
12062 pub results: Option<Vec<AccountResponse>>,
12063}
12064
12065impl std::fmt::Display for ListAccountsResponse {
12066 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12067 write!(
12068 f,
12069 "{}",
12070 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12071 )
12072 }
12073}
12074
12075impl tabled::Tabled for ListAccountsResponse {
12076 const LENGTH: usize = 3;
12077 fn fields(&self) -> Vec<String> {
12078 vec![
12079 if let Some(pagination) = &self.pagination {
12080 format!("{:?}", pagination)
12081 } else {
12082 String::new()
12083 },
12084 if let Some(underscore_links) = &self.underscore_links {
12085 format!("{:?}", underscore_links)
12086 } else {
12087 String::new()
12088 },
12089 if let Some(results) = &self.results {
12090 format!("{:?}", results)
12091 } else {
12092 String::new()
12093 },
12094 ]
12095 }
12096
12097 fn headers() -> Vec<String> {
12098 vec![
12099 "pagination".to_string(),
12100 "underscore_links".to_string(),
12101 "results".to_string(),
12102 ]
12103 }
12104}
12105
12106#[derive(
12107 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
12108)]
12109pub struct ListAccountContactsResponseUnderscoreLinks {
12110 #[doc = "Link to resource"]
12111 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
12112 pub self_: Option<String>,
12113}
12114
12115impl std::fmt::Display for ListAccountContactsResponseUnderscoreLinks {
12116 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12117 write!(
12118 f,
12119 "{}",
12120 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12121 )
12122 }
12123}
12124
12125impl tabled::Tabled for ListAccountContactsResponseUnderscoreLinks {
12126 const LENGTH: usize = 1;
12127 fn fields(&self) -> Vec<String> {
12128 vec![if let Some(self_) = &self.self_ {
12129 format!("{:?}", self_)
12130 } else {
12131 String::new()
12132 }]
12133 }
12134
12135 fn headers() -> Vec<String> {
12136 vec!["self_".to_string()]
12137 }
12138}
12139
12140#[derive(
12141 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12142)]
12143pub struct ListAccountContactsResponse {
12144 #[serde(
12145 rename = "_pagination",
12146 default,
12147 skip_serializing_if = "Option::is_none"
12148 )]
12149 pub pagination: Option<Pagination>,
12150 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
12151 pub underscore_links: Option<ListAccountContactsResponseUnderscoreLinks>,
12152 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
12153 pub results: Option<Vec<ContactResponse>>,
12154}
12155
12156impl std::fmt::Display for ListAccountContactsResponse {
12157 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12158 write!(
12159 f,
12160 "{}",
12161 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12162 )
12163 }
12164}
12165
12166impl tabled::Tabled for ListAccountContactsResponse {
12167 const LENGTH: usize = 3;
12168 fn fields(&self) -> Vec<String> {
12169 vec![
12170 if let Some(pagination) = &self.pagination {
12171 format!("{:?}", pagination)
12172 } else {
12173 String::new()
12174 },
12175 if let Some(underscore_links) = &self.underscore_links {
12176 format!("{:?}", underscore_links)
12177 } else {
12178 String::new()
12179 },
12180 if let Some(results) = &self.results {
12181 format!("{:?}", results)
12182 } else {
12183 String::new()
12184 },
12185 ]
12186 }
12187
12188 fn headers() -> Vec<String> {
12189 vec![
12190 "pagination".to_string(),
12191 "underscore_links".to_string(),
12192 "results".to_string(),
12193 ]
12194 }
12195}
12196
12197#[derive(
12198 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
12199)]
12200pub struct ListEventsResponseUnderscoreLinks {
12201 #[doc = "Link to resource"]
12202 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
12203 pub self_: Option<String>,
12204}
12205
12206impl std::fmt::Display for ListEventsResponseUnderscoreLinks {
12207 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12208 write!(
12209 f,
12210 "{}",
12211 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12212 )
12213 }
12214}
12215
12216impl tabled::Tabled for ListEventsResponseUnderscoreLinks {
12217 const LENGTH: usize = 1;
12218 fn fields(&self) -> Vec<String> {
12219 vec![if let Some(self_) = &self.self_ {
12220 format!("{:?}", self_)
12221 } else {
12222 String::new()
12223 }]
12224 }
12225
12226 fn headers() -> Vec<String> {
12227 vec!["self_".to_string()]
12228 }
12229}
12230
12231#[derive(
12232 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12233)]
12234pub struct ListEventsResponse {
12235 #[serde(
12236 rename = "_pagination",
12237 default,
12238 skip_serializing_if = "Option::is_none"
12239 )]
12240 pub pagination: Option<Pagination>,
12241 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
12242 pub underscore_links: Option<ListEventsResponseUnderscoreLinks>,
12243 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
12244 pub results: Option<Vec<EventResponse>>,
12245}
12246
12247impl std::fmt::Display for ListEventsResponse {
12248 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12249 write!(
12250 f,
12251 "{}",
12252 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12253 )
12254 }
12255}
12256
12257impl tabled::Tabled for ListEventsResponse {
12258 const LENGTH: usize = 3;
12259 fn fields(&self) -> Vec<String> {
12260 vec![
12261 if let Some(pagination) = &self.pagination {
12262 format!("{:?}", pagination)
12263 } else {
12264 String::new()
12265 },
12266 if let Some(underscore_links) = &self.underscore_links {
12267 format!("{:?}", underscore_links)
12268 } else {
12269 String::new()
12270 },
12271 if let Some(results) = &self.results {
12272 format!("{:?}", results)
12273 } else {
12274 String::new()
12275 },
12276 ]
12277 }
12278
12279 fn headers() -> Vec<String> {
12280 vec![
12281 "pagination".to_string(),
12282 "underscore_links".to_string(),
12283 "results".to_string(),
12284 ]
12285 }
12286}
12287
12288#[derive(
12289 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
12290)]
12291pub struct ListFoldersResponseUnderscoreLinks {
12292 #[doc = "Link to resource"]
12293 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
12294 pub self_: Option<String>,
12295}
12296
12297impl std::fmt::Display for ListFoldersResponseUnderscoreLinks {
12298 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12299 write!(
12300 f,
12301 "{}",
12302 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12303 )
12304 }
12305}
12306
12307impl tabled::Tabled for ListFoldersResponseUnderscoreLinks {
12308 const LENGTH: usize = 1;
12309 fn fields(&self) -> Vec<String> {
12310 vec![if let Some(self_) = &self.self_ {
12311 format!("{:?}", self_)
12312 } else {
12313 String::new()
12314 }]
12315 }
12316
12317 fn headers() -> Vec<String> {
12318 vec!["self_".to_string()]
12319 }
12320}
12321
12322#[derive(
12323 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12324)]
12325pub struct ListFoldersResponse {
12326 #[serde(
12327 rename = "_pagination",
12328 default,
12329 skip_serializing_if = "Option::is_none"
12330 )]
12331 pub pagination: Option<Pagination>,
12332 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
12333 pub underscore_links: Option<ListFoldersResponseUnderscoreLinks>,
12334 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
12335 pub results: Option<Vec<MessageTemplateResponse>>,
12336}
12337
12338impl std::fmt::Display for ListFoldersResponse {
12339 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12340 write!(
12341 f,
12342 "{}",
12343 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12344 )
12345 }
12346}
12347
12348impl tabled::Tabled for ListFoldersResponse {
12349 const LENGTH: usize = 3;
12350 fn fields(&self) -> Vec<String> {
12351 vec![
12352 if let Some(pagination) = &self.pagination {
12353 format!("{:?}", pagination)
12354 } else {
12355 String::new()
12356 },
12357 if let Some(underscore_links) = &self.underscore_links {
12358 format!("{:?}", underscore_links)
12359 } else {
12360 String::new()
12361 },
12362 if let Some(results) = &self.results {
12363 format!("{:?}", results)
12364 } else {
12365 String::new()
12366 },
12367 ]
12368 }
12369
12370 fn headers() -> Vec<String> {
12371 vec![
12372 "pagination".to_string(),
12373 "underscore_links".to_string(),
12374 "results".to_string(),
12375 ]
12376 }
12377}
12378
12379#[derive(
12380 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
12381)]
12382pub struct ListTeamFoldersResponseUnderscoreLinks {
12383 #[doc = "Link to resource"]
12384 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
12385 pub self_: Option<String>,
12386}
12387
12388impl std::fmt::Display for ListTeamFoldersResponseUnderscoreLinks {
12389 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12390 write!(
12391 f,
12392 "{}",
12393 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12394 )
12395 }
12396}
12397
12398impl tabled::Tabled for ListTeamFoldersResponseUnderscoreLinks {
12399 const LENGTH: usize = 1;
12400 fn fields(&self) -> Vec<String> {
12401 vec![if let Some(self_) = &self.self_ {
12402 format!("{:?}", self_)
12403 } else {
12404 String::new()
12405 }]
12406 }
12407
12408 fn headers() -> Vec<String> {
12409 vec!["self_".to_string()]
12410 }
12411}
12412
12413#[derive(
12414 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12415)]
12416pub struct ListTeamFoldersResponse {
12417 #[serde(
12418 rename = "_pagination",
12419 default,
12420 skip_serializing_if = "Option::is_none"
12421 )]
12422 pub pagination: Option<Pagination>,
12423 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
12424 pub underscore_links: Option<ListTeamFoldersResponseUnderscoreLinks>,
12425 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
12426 pub results: Option<Vec<MessageTemplateResponse>>,
12427}
12428
12429impl std::fmt::Display for ListTeamFoldersResponse {
12430 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12431 write!(
12432 f,
12433 "{}",
12434 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12435 )
12436 }
12437}
12438
12439impl tabled::Tabled for ListTeamFoldersResponse {
12440 const LENGTH: usize = 3;
12441 fn fields(&self) -> Vec<String> {
12442 vec![
12443 if let Some(pagination) = &self.pagination {
12444 format!("{:?}", pagination)
12445 } else {
12446 String::new()
12447 },
12448 if let Some(underscore_links) = &self.underscore_links {
12449 format!("{:?}", underscore_links)
12450 } else {
12451 String::new()
12452 },
12453 if let Some(results) = &self.results {
12454 format!("{:?}", results)
12455 } else {
12456 String::new()
12457 },
12458 ]
12459 }
12460
12461 fn headers() -> Vec<String> {
12462 vec![
12463 "pagination".to_string(),
12464 "underscore_links".to_string(),
12465 "results".to_string(),
12466 ]
12467 }
12468}
12469
12470#[derive(
12471 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
12472)]
12473pub struct ListTeammateFoldersResponseUnderscoreLinks {
12474 #[doc = "Link to resource"]
12475 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
12476 pub self_: Option<String>,
12477}
12478
12479impl std::fmt::Display for ListTeammateFoldersResponseUnderscoreLinks {
12480 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12481 write!(
12482 f,
12483 "{}",
12484 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12485 )
12486 }
12487}
12488
12489impl tabled::Tabled for ListTeammateFoldersResponseUnderscoreLinks {
12490 const LENGTH: usize = 1;
12491 fn fields(&self) -> Vec<String> {
12492 vec![if let Some(self_) = &self.self_ {
12493 format!("{:?}", self_)
12494 } else {
12495 String::new()
12496 }]
12497 }
12498
12499 fn headers() -> Vec<String> {
12500 vec!["self_".to_string()]
12501 }
12502}
12503
12504#[derive(
12505 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12506)]
12507pub struct ListTeammateFoldersResponse {
12508 #[serde(
12509 rename = "_pagination",
12510 default,
12511 skip_serializing_if = "Option::is_none"
12512 )]
12513 pub pagination: Option<Pagination>,
12514 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
12515 pub underscore_links: Option<ListTeammateFoldersResponseUnderscoreLinks>,
12516 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
12517 pub results: Option<Vec<MessageTemplateResponse>>,
12518}
12519
12520impl std::fmt::Display for ListTeammateFoldersResponse {
12521 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12522 write!(
12523 f,
12524 "{}",
12525 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12526 )
12527 }
12528}
12529
12530impl tabled::Tabled for ListTeammateFoldersResponse {
12531 const LENGTH: usize = 3;
12532 fn fields(&self) -> Vec<String> {
12533 vec![
12534 if let Some(pagination) = &self.pagination {
12535 format!("{:?}", pagination)
12536 } else {
12537 String::new()
12538 },
12539 if let Some(underscore_links) = &self.underscore_links {
12540 format!("{:?}", underscore_links)
12541 } else {
12542 String::new()
12543 },
12544 if let Some(results) = &self.results {
12545 format!("{:?}", results)
12546 } else {
12547 String::new()
12548 },
12549 ]
12550 }
12551
12552 fn headers() -> Vec<String> {
12553 vec![
12554 "pagination".to_string(),
12555 "underscore_links".to_string(),
12556 "results".to_string(),
12557 ]
12558 }
12559}
12560
12561#[derive(
12562 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
12563)]
12564pub struct GetChildFoldersResponseUnderscoreLinks {
12565 #[doc = "Link to resource"]
12566 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
12567 pub self_: Option<String>,
12568}
12569
12570impl std::fmt::Display for GetChildFoldersResponseUnderscoreLinks {
12571 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12572 write!(
12573 f,
12574 "{}",
12575 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12576 )
12577 }
12578}
12579
12580impl tabled::Tabled for GetChildFoldersResponseUnderscoreLinks {
12581 const LENGTH: usize = 1;
12582 fn fields(&self) -> Vec<String> {
12583 vec![if let Some(self_) = &self.self_ {
12584 format!("{:?}", self_)
12585 } else {
12586 String::new()
12587 }]
12588 }
12589
12590 fn headers() -> Vec<String> {
12591 vec!["self_".to_string()]
12592 }
12593}
12594
12595#[derive(
12596 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12597)]
12598pub struct GetChildFoldersResponse {
12599 #[serde(
12600 rename = "_pagination",
12601 default,
12602 skip_serializing_if = "Option::is_none"
12603 )]
12604 pub pagination: Option<Pagination>,
12605 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
12606 pub underscore_links: Option<GetChildFoldersResponseUnderscoreLinks>,
12607 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
12608 pub results: Option<Vec<MessageTemplateResponse>>,
12609}
12610
12611impl std::fmt::Display for GetChildFoldersResponse {
12612 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12613 write!(
12614 f,
12615 "{}",
12616 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12617 )
12618 }
12619}
12620
12621impl tabled::Tabled for GetChildFoldersResponse {
12622 const LENGTH: usize = 3;
12623 fn fields(&self) -> Vec<String> {
12624 vec![
12625 if let Some(pagination) = &self.pagination {
12626 format!("{:?}", pagination)
12627 } else {
12628 String::new()
12629 },
12630 if let Some(underscore_links) = &self.underscore_links {
12631 format!("{:?}", underscore_links)
12632 } else {
12633 String::new()
12634 },
12635 if let Some(results) = &self.results {
12636 format!("{:?}", results)
12637 } else {
12638 String::new()
12639 },
12640 ]
12641 }
12642
12643 fn headers() -> Vec<String> {
12644 vec![
12645 "pagination".to_string(),
12646 "underscore_links".to_string(),
12647 "results".to_string(),
12648 ]
12649 }
12650}
12651
12652#[derive(
12653 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
12654)]
12655pub struct GetChildTemplatesResponseUnderscoreLinks {
12656 #[doc = "Link to resource"]
12657 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
12658 pub self_: Option<String>,
12659}
12660
12661impl std::fmt::Display for GetChildTemplatesResponseUnderscoreLinks {
12662 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12663 write!(
12664 f,
12665 "{}",
12666 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12667 )
12668 }
12669}
12670
12671impl tabled::Tabled for GetChildTemplatesResponseUnderscoreLinks {
12672 const LENGTH: usize = 1;
12673 fn fields(&self) -> Vec<String> {
12674 vec![if let Some(self_) = &self.self_ {
12675 format!("{:?}", self_)
12676 } else {
12677 String::new()
12678 }]
12679 }
12680
12681 fn headers() -> Vec<String> {
12682 vec!["self_".to_string()]
12683 }
12684}
12685
12686#[derive(
12687 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12688)]
12689pub struct GetChildTemplatesResponse {
12690 #[serde(
12691 rename = "_pagination",
12692 default,
12693 skip_serializing_if = "Option::is_none"
12694 )]
12695 pub pagination: Option<Pagination>,
12696 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
12697 pub underscore_links: Option<GetChildTemplatesResponseUnderscoreLinks>,
12698 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
12699 pub results: Option<Vec<MessageTemplateResponse>>,
12700}
12701
12702impl std::fmt::Display for GetChildTemplatesResponse {
12703 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12704 write!(
12705 f,
12706 "{}",
12707 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12708 )
12709 }
12710}
12711
12712impl tabled::Tabled for GetChildTemplatesResponse {
12713 const LENGTH: usize = 3;
12714 fn fields(&self) -> Vec<String> {
12715 vec![
12716 if let Some(pagination) = &self.pagination {
12717 format!("{:?}", pagination)
12718 } else {
12719 String::new()
12720 },
12721 if let Some(underscore_links) = &self.underscore_links {
12722 format!("{:?}", underscore_links)
12723 } else {
12724 String::new()
12725 },
12726 if let Some(results) = &self.results {
12727 format!("{:?}", results)
12728 } else {
12729 String::new()
12730 },
12731 ]
12732 }
12733
12734 fn headers() -> Vec<String> {
12735 vec![
12736 "pagination".to_string(),
12737 "underscore_links".to_string(),
12738 "results".to_string(),
12739 ]
12740 }
12741}
12742
12743#[derive(
12744 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
12745)]
12746pub struct DeleteFolderResponse {
12747 #[serde(default, skip_serializing_if = "Option::is_none")]
12748 pub status: Option<String>,
12749 #[doc = "id of the message template to be deleted"]
12750 #[serde(default, skip_serializing_if = "Option::is_none")]
12751 pub message_template_folder_id: Option<String>,
12752}
12753
12754impl std::fmt::Display for DeleteFolderResponse {
12755 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12756 write!(
12757 f,
12758 "{}",
12759 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12760 )
12761 }
12762}
12763
12764impl tabled::Tabled for DeleteFolderResponse {
12765 const LENGTH: usize = 2;
12766 fn fields(&self) -> Vec<String> {
12767 vec![
12768 if let Some(status) = &self.status {
12769 format!("{:?}", status)
12770 } else {
12771 String::new()
12772 },
12773 if let Some(message_template_folder_id) = &self.message_template_folder_id {
12774 format!("{:?}", message_template_folder_id)
12775 } else {
12776 String::new()
12777 },
12778 ]
12779 }
12780
12781 fn headers() -> Vec<String> {
12782 vec![
12783 "status".to_string(),
12784 "message_template_folder_id".to_string(),
12785 ]
12786 }
12787}
12788
12789#[derive(
12790 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
12791)]
12792pub struct ListMessageTemplatesResponseUnderscoreLinks {
12793 #[doc = "Link to resource"]
12794 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
12795 pub self_: Option<String>,
12796}
12797
12798impl std::fmt::Display for ListMessageTemplatesResponseUnderscoreLinks {
12799 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12800 write!(
12801 f,
12802 "{}",
12803 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12804 )
12805 }
12806}
12807
12808impl tabled::Tabled for ListMessageTemplatesResponseUnderscoreLinks {
12809 const LENGTH: usize = 1;
12810 fn fields(&self) -> Vec<String> {
12811 vec![if let Some(self_) = &self.self_ {
12812 format!("{:?}", self_)
12813 } else {
12814 String::new()
12815 }]
12816 }
12817
12818 fn headers() -> Vec<String> {
12819 vec!["self_".to_string()]
12820 }
12821}
12822
12823#[derive(
12824 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12825)]
12826pub struct ListMessageTemplatesResponse {
12827 #[serde(
12828 rename = "_pagination",
12829 default,
12830 skip_serializing_if = "Option::is_none"
12831 )]
12832 pub pagination: Option<Pagination>,
12833 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
12834 pub underscore_links: Option<ListMessageTemplatesResponseUnderscoreLinks>,
12835 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
12836 pub results: Option<Vec<MessageTemplateResponse>>,
12837}
12838
12839impl std::fmt::Display for ListMessageTemplatesResponse {
12840 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12841 write!(
12842 f,
12843 "{}",
12844 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12845 )
12846 }
12847}
12848
12849impl tabled::Tabled for ListMessageTemplatesResponse {
12850 const LENGTH: usize = 3;
12851 fn fields(&self) -> Vec<String> {
12852 vec![
12853 if let Some(pagination) = &self.pagination {
12854 format!("{:?}", pagination)
12855 } else {
12856 String::new()
12857 },
12858 if let Some(underscore_links) = &self.underscore_links {
12859 format!("{:?}", underscore_links)
12860 } else {
12861 String::new()
12862 },
12863 if let Some(results) = &self.results {
12864 format!("{:?}", results)
12865 } else {
12866 String::new()
12867 },
12868 ]
12869 }
12870
12871 fn headers() -> Vec<String> {
12872 vec![
12873 "pagination".to_string(),
12874 "underscore_links".to_string(),
12875 "results".to_string(),
12876 ]
12877 }
12878}
12879
12880#[derive(
12881 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
12882)]
12883pub struct ListTeamMessageTemplatesResponseUnderscoreLinks {
12884 #[doc = "Link to resource"]
12885 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
12886 pub self_: Option<String>,
12887}
12888
12889impl std::fmt::Display for ListTeamMessageTemplatesResponseUnderscoreLinks {
12890 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12891 write!(
12892 f,
12893 "{}",
12894 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12895 )
12896 }
12897}
12898
12899impl tabled::Tabled for ListTeamMessageTemplatesResponseUnderscoreLinks {
12900 const LENGTH: usize = 1;
12901 fn fields(&self) -> Vec<String> {
12902 vec![if let Some(self_) = &self.self_ {
12903 format!("{:?}", self_)
12904 } else {
12905 String::new()
12906 }]
12907 }
12908
12909 fn headers() -> Vec<String> {
12910 vec!["self_".to_string()]
12911 }
12912}
12913
12914#[derive(
12915 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12916)]
12917pub struct ListTeamMessageTemplatesResponse {
12918 #[serde(
12919 rename = "_pagination",
12920 default,
12921 skip_serializing_if = "Option::is_none"
12922 )]
12923 pub pagination: Option<Pagination>,
12924 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
12925 pub underscore_links: Option<ListTeamMessageTemplatesResponseUnderscoreLinks>,
12926 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
12927 pub results: Option<Vec<MessageTemplateResponse>>,
12928}
12929
12930impl std::fmt::Display for ListTeamMessageTemplatesResponse {
12931 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12932 write!(
12933 f,
12934 "{}",
12935 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12936 )
12937 }
12938}
12939
12940impl tabled::Tabled for ListTeamMessageTemplatesResponse {
12941 const LENGTH: usize = 3;
12942 fn fields(&self) -> Vec<String> {
12943 vec![
12944 if let Some(pagination) = &self.pagination {
12945 format!("{:?}", pagination)
12946 } else {
12947 String::new()
12948 },
12949 if let Some(underscore_links) = &self.underscore_links {
12950 format!("{:?}", underscore_links)
12951 } else {
12952 String::new()
12953 },
12954 if let Some(results) = &self.results {
12955 format!("{:?}", results)
12956 } else {
12957 String::new()
12958 },
12959 ]
12960 }
12961
12962 fn headers() -> Vec<String> {
12963 vec![
12964 "pagination".to_string(),
12965 "underscore_links".to_string(),
12966 "results".to_string(),
12967 ]
12968 }
12969}
12970
12971#[derive(
12972 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
12973)]
12974pub struct ListTeammateMessageTemplatesResponseUnderscoreLinks {
12975 #[doc = "Link to resource"]
12976 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
12977 pub self_: Option<String>,
12978}
12979
12980impl std::fmt::Display for ListTeammateMessageTemplatesResponseUnderscoreLinks {
12981 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12982 write!(
12983 f,
12984 "{}",
12985 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12986 )
12987 }
12988}
12989
12990impl tabled::Tabled for ListTeammateMessageTemplatesResponseUnderscoreLinks {
12991 const LENGTH: usize = 1;
12992 fn fields(&self) -> Vec<String> {
12993 vec![if let Some(self_) = &self.self_ {
12994 format!("{:?}", self_)
12995 } else {
12996 String::new()
12997 }]
12998 }
12999
13000 fn headers() -> Vec<String> {
13001 vec!["self_".to_string()]
13002 }
13003}
13004
13005#[derive(
13006 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13007)]
13008pub struct ListTeammateMessageTemplatesResponse {
13009 #[serde(
13010 rename = "_pagination",
13011 default,
13012 skip_serializing_if = "Option::is_none"
13013 )]
13014 pub pagination: Option<Pagination>,
13015 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
13016 pub underscore_links: Option<ListTeammateMessageTemplatesResponseUnderscoreLinks>,
13017 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
13018 pub results: Option<Vec<MessageTemplateResponse>>,
13019}
13020
13021impl std::fmt::Display for ListTeammateMessageTemplatesResponse {
13022 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13023 write!(
13024 f,
13025 "{}",
13026 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13027 )
13028 }
13029}
13030
13031impl tabled::Tabled for ListTeammateMessageTemplatesResponse {
13032 const LENGTH: usize = 3;
13033 fn fields(&self) -> Vec<String> {
13034 vec![
13035 if let Some(pagination) = &self.pagination {
13036 format!("{:?}", pagination)
13037 } else {
13038 String::new()
13039 },
13040 if let Some(underscore_links) = &self.underscore_links {
13041 format!("{:?}", underscore_links)
13042 } else {
13043 String::new()
13044 },
13045 if let Some(results) = &self.results {
13046 format!("{:?}", results)
13047 } else {
13048 String::new()
13049 },
13050 ]
13051 }
13052
13053 fn headers() -> Vec<String> {
13054 vec![
13055 "pagination".to_string(),
13056 "underscore_links".to_string(),
13057 "results".to_string(),
13058 ]
13059 }
13060}
13061
13062#[derive(
13063 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
13064)]
13065pub struct ListGroupsResponseUnderscoreLinks {
13066 #[doc = "Link to resource"]
13067 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
13068 pub self_: Option<String>,
13069}
13070
13071impl std::fmt::Display for ListGroupsResponseUnderscoreLinks {
13072 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13073 write!(
13074 f,
13075 "{}",
13076 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13077 )
13078 }
13079}
13080
13081impl tabled::Tabled for ListGroupsResponseUnderscoreLinks {
13082 const LENGTH: usize = 1;
13083 fn fields(&self) -> Vec<String> {
13084 vec![if let Some(self_) = &self.self_ {
13085 format!("{:?}", self_)
13086 } else {
13087 String::new()
13088 }]
13089 }
13090
13091 fn headers() -> Vec<String> {
13092 vec!["self_".to_string()]
13093 }
13094}
13095
13096#[derive(
13097 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13098)]
13099pub struct ListGroupsResponse {
13100 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
13101 pub underscore_links: Option<ListGroupsResponseUnderscoreLinks>,
13102 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
13103 pub results: Option<Vec<ContactGroupResponses>>,
13104}
13105
13106impl std::fmt::Display for ListGroupsResponse {
13107 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13108 write!(
13109 f,
13110 "{}",
13111 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13112 )
13113 }
13114}
13115
13116impl tabled::Tabled for ListGroupsResponse {
13117 const LENGTH: usize = 2;
13118 fn fields(&self) -> Vec<String> {
13119 vec![
13120 if let Some(underscore_links) = &self.underscore_links {
13121 format!("{:?}", underscore_links)
13122 } else {
13123 String::new()
13124 },
13125 if let Some(results) = &self.results {
13126 format!("{:?}", results)
13127 } else {
13128 String::new()
13129 },
13130 ]
13131 }
13132
13133 fn headers() -> Vec<String> {
13134 vec!["underscore_links".to_string(), "results".to_string()]
13135 }
13136}
13137
13138#[derive(
13139 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
13140)]
13141pub struct ListTeamGroupsResponseUnderscoreLinks {
13142 #[doc = "Link to resource"]
13143 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
13144 pub self_: Option<String>,
13145}
13146
13147impl std::fmt::Display for ListTeamGroupsResponseUnderscoreLinks {
13148 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13149 write!(
13150 f,
13151 "{}",
13152 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13153 )
13154 }
13155}
13156
13157impl tabled::Tabled for ListTeamGroupsResponseUnderscoreLinks {
13158 const LENGTH: usize = 1;
13159 fn fields(&self) -> Vec<String> {
13160 vec![if let Some(self_) = &self.self_ {
13161 format!("{:?}", self_)
13162 } else {
13163 String::new()
13164 }]
13165 }
13166
13167 fn headers() -> Vec<String> {
13168 vec!["self_".to_string()]
13169 }
13170}
13171
13172#[derive(
13173 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13174)]
13175pub struct ListTeamGroupsResponse {
13176 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
13177 pub underscore_links: Option<ListTeamGroupsResponseUnderscoreLinks>,
13178 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
13179 pub results: Option<Vec<ContactGroupResponses>>,
13180}
13181
13182impl std::fmt::Display for ListTeamGroupsResponse {
13183 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13184 write!(
13185 f,
13186 "{}",
13187 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13188 )
13189 }
13190}
13191
13192impl tabled::Tabled for ListTeamGroupsResponse {
13193 const LENGTH: usize = 2;
13194 fn fields(&self) -> Vec<String> {
13195 vec![
13196 if let Some(underscore_links) = &self.underscore_links {
13197 format!("{:?}", underscore_links)
13198 } else {
13199 String::new()
13200 },
13201 if let Some(results) = &self.results {
13202 format!("{:?}", results)
13203 } else {
13204 String::new()
13205 },
13206 ]
13207 }
13208
13209 fn headers() -> Vec<String> {
13210 vec!["underscore_links".to_string(), "results".to_string()]
13211 }
13212}
13213
13214#[derive(
13215 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
13216)]
13217pub struct ListTeammateGroupsResponseUnderscoreLinks {
13218 #[doc = "Link to resource"]
13219 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
13220 pub self_: Option<String>,
13221}
13222
13223impl std::fmt::Display for ListTeammateGroupsResponseUnderscoreLinks {
13224 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13225 write!(
13226 f,
13227 "{}",
13228 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13229 )
13230 }
13231}
13232
13233impl tabled::Tabled for ListTeammateGroupsResponseUnderscoreLinks {
13234 const LENGTH: usize = 1;
13235 fn fields(&self) -> Vec<String> {
13236 vec![if let Some(self_) = &self.self_ {
13237 format!("{:?}", self_)
13238 } else {
13239 String::new()
13240 }]
13241 }
13242
13243 fn headers() -> Vec<String> {
13244 vec!["self_".to_string()]
13245 }
13246}
13247
13248#[derive(
13249 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13250)]
13251pub struct ListTeammateGroupsResponse {
13252 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
13253 pub underscore_links: Option<ListTeammateGroupsResponseUnderscoreLinks>,
13254 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
13255 pub results: Option<Vec<ContactGroupResponses>>,
13256}
13257
13258impl std::fmt::Display for ListTeammateGroupsResponse {
13259 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13260 write!(
13261 f,
13262 "{}",
13263 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13264 )
13265 }
13266}
13267
13268impl tabled::Tabled for ListTeammateGroupsResponse {
13269 const LENGTH: usize = 2;
13270 fn fields(&self) -> Vec<String> {
13271 vec![
13272 if let Some(underscore_links) = &self.underscore_links {
13273 format!("{:?}", underscore_links)
13274 } else {
13275 String::new()
13276 },
13277 if let Some(results) = &self.results {
13278 format!("{:?}", results)
13279 } else {
13280 String::new()
13281 },
13282 ]
13283 }
13284
13285 fn headers() -> Vec<String> {
13286 vec!["underscore_links".to_string(), "results".to_string()]
13287 }
13288}
13289
13290#[derive(
13291 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
13292)]
13293pub struct ListGroupContactsResponseUnderscoreLinks {
13294 #[doc = "Link to resource"]
13295 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
13296 pub self_: Option<String>,
13297}
13298
13299impl std::fmt::Display for ListGroupContactsResponseUnderscoreLinks {
13300 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13301 write!(
13302 f,
13303 "{}",
13304 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13305 )
13306 }
13307}
13308
13309impl tabled::Tabled for ListGroupContactsResponseUnderscoreLinks {
13310 const LENGTH: usize = 1;
13311 fn fields(&self) -> Vec<String> {
13312 vec![if let Some(self_) = &self.self_ {
13313 format!("{:?}", self_)
13314 } else {
13315 String::new()
13316 }]
13317 }
13318
13319 fn headers() -> Vec<String> {
13320 vec!["self_".to_string()]
13321 }
13322}
13323
13324#[derive(
13325 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13326)]
13327pub struct ListGroupContactsResponse {
13328 #[serde(
13329 rename = "_pagination",
13330 default,
13331 skip_serializing_if = "Option::is_none"
13332 )]
13333 pub pagination: Option<Pagination>,
13334 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
13335 pub underscore_links: Option<ListGroupContactsResponseUnderscoreLinks>,
13336 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
13337 pub results: Option<Vec<ContactResponse>>,
13338}
13339
13340impl std::fmt::Display for ListGroupContactsResponse {
13341 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13342 write!(
13343 f,
13344 "{}",
13345 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13346 )
13347 }
13348}
13349
13350impl tabled::Tabled for ListGroupContactsResponse {
13351 const LENGTH: usize = 3;
13352 fn fields(&self) -> Vec<String> {
13353 vec![
13354 if let Some(pagination) = &self.pagination {
13355 format!("{:?}", pagination)
13356 } else {
13357 String::new()
13358 },
13359 if let Some(underscore_links) = &self.underscore_links {
13360 format!("{:?}", underscore_links)
13361 } else {
13362 String::new()
13363 },
13364 if let Some(results) = &self.results {
13365 format!("{:?}", results)
13366 } else {
13367 String::new()
13368 },
13369 ]
13370 }
13371
13372 fn headers() -> Vec<String> {
13373 vec![
13374 "pagination".to_string(),
13375 "underscore_links".to_string(),
13376 "results".to_string(),
13377 ]
13378 }
13379}
13380
13381#[derive(
13382 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
13383)]
13384pub struct ListContactsResponseUnderscoreLinks {
13385 #[doc = "Link to resource"]
13386 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
13387 pub self_: Option<String>,
13388}
13389
13390impl std::fmt::Display for ListContactsResponseUnderscoreLinks {
13391 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13392 write!(
13393 f,
13394 "{}",
13395 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13396 )
13397 }
13398}
13399
13400impl tabled::Tabled for ListContactsResponseUnderscoreLinks {
13401 const LENGTH: usize = 1;
13402 fn fields(&self) -> Vec<String> {
13403 vec![if let Some(self_) = &self.self_ {
13404 format!("{:?}", self_)
13405 } else {
13406 String::new()
13407 }]
13408 }
13409
13410 fn headers() -> Vec<String> {
13411 vec!["self_".to_string()]
13412 }
13413}
13414
13415#[derive(
13416 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13417)]
13418pub struct ListContactsResponse {
13419 #[serde(
13420 rename = "_pagination",
13421 default,
13422 skip_serializing_if = "Option::is_none"
13423 )]
13424 pub pagination: Option<Pagination>,
13425 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
13426 pub underscore_links: Option<ListContactsResponseUnderscoreLinks>,
13427 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
13428 pub results: Option<Vec<ContactResponse>>,
13429}
13430
13431impl std::fmt::Display for ListContactsResponse {
13432 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13433 write!(
13434 f,
13435 "{}",
13436 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13437 )
13438 }
13439}
13440
13441impl tabled::Tabled for ListContactsResponse {
13442 const LENGTH: usize = 3;
13443 fn fields(&self) -> Vec<String> {
13444 vec![
13445 if let Some(pagination) = &self.pagination {
13446 format!("{:?}", pagination)
13447 } else {
13448 String::new()
13449 },
13450 if let Some(underscore_links) = &self.underscore_links {
13451 format!("{:?}", underscore_links)
13452 } else {
13453 String::new()
13454 },
13455 if let Some(results) = &self.results {
13456 format!("{:?}", results)
13457 } else {
13458 String::new()
13459 },
13460 ]
13461 }
13462
13463 fn headers() -> Vec<String> {
13464 vec![
13465 "pagination".to_string(),
13466 "underscore_links".to_string(),
13467 "results".to_string(),
13468 ]
13469 }
13470}
13471
13472#[derive(
13473 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
13474)]
13475pub struct ListTeamContactsResponseUnderscoreLinks {
13476 #[doc = "Link to resource"]
13477 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
13478 pub self_: Option<String>,
13479}
13480
13481impl std::fmt::Display for ListTeamContactsResponseUnderscoreLinks {
13482 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13483 write!(
13484 f,
13485 "{}",
13486 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13487 )
13488 }
13489}
13490
13491impl tabled::Tabled for ListTeamContactsResponseUnderscoreLinks {
13492 const LENGTH: usize = 1;
13493 fn fields(&self) -> Vec<String> {
13494 vec![if let Some(self_) = &self.self_ {
13495 format!("{:?}", self_)
13496 } else {
13497 String::new()
13498 }]
13499 }
13500
13501 fn headers() -> Vec<String> {
13502 vec!["self_".to_string()]
13503 }
13504}
13505
13506#[derive(
13507 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13508)]
13509pub struct ListTeamContactsResponse {
13510 #[serde(
13511 rename = "_pagination",
13512 default,
13513 skip_serializing_if = "Option::is_none"
13514 )]
13515 pub pagination: Option<Pagination>,
13516 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
13517 pub underscore_links: Option<ListTeamContactsResponseUnderscoreLinks>,
13518 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
13519 pub results: Option<Vec<ContactResponse>>,
13520}
13521
13522impl std::fmt::Display for ListTeamContactsResponse {
13523 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13524 write!(
13525 f,
13526 "{}",
13527 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13528 )
13529 }
13530}
13531
13532impl tabled::Tabled for ListTeamContactsResponse {
13533 const LENGTH: usize = 3;
13534 fn fields(&self) -> Vec<String> {
13535 vec![
13536 if let Some(pagination) = &self.pagination {
13537 format!("{:?}", pagination)
13538 } else {
13539 String::new()
13540 },
13541 if let Some(underscore_links) = &self.underscore_links {
13542 format!("{:?}", underscore_links)
13543 } else {
13544 String::new()
13545 },
13546 if let Some(results) = &self.results {
13547 format!("{:?}", results)
13548 } else {
13549 String::new()
13550 },
13551 ]
13552 }
13553
13554 fn headers() -> Vec<String> {
13555 vec![
13556 "pagination".to_string(),
13557 "underscore_links".to_string(),
13558 "results".to_string(),
13559 ]
13560 }
13561}
13562
13563#[derive(
13564 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
13565)]
13566pub struct ListTeammateContactsResponseUnderscoreLinks {
13567 #[doc = "Link to resource"]
13568 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
13569 pub self_: Option<String>,
13570}
13571
13572impl std::fmt::Display for ListTeammateContactsResponseUnderscoreLinks {
13573 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13574 write!(
13575 f,
13576 "{}",
13577 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13578 )
13579 }
13580}
13581
13582impl tabled::Tabled for ListTeammateContactsResponseUnderscoreLinks {
13583 const LENGTH: usize = 1;
13584 fn fields(&self) -> Vec<String> {
13585 vec![if let Some(self_) = &self.self_ {
13586 format!("{:?}", self_)
13587 } else {
13588 String::new()
13589 }]
13590 }
13591
13592 fn headers() -> Vec<String> {
13593 vec!["self_".to_string()]
13594 }
13595}
13596
13597#[derive(
13598 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13599)]
13600pub struct ListTeammateContactsResponse {
13601 #[serde(
13602 rename = "_pagination",
13603 default,
13604 skip_serializing_if = "Option::is_none"
13605 )]
13606 pub pagination: Option<Pagination>,
13607 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
13608 pub underscore_links: Option<ListTeammateContactsResponseUnderscoreLinks>,
13609 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
13610 pub results: Option<Vec<ContactResponse>>,
13611}
13612
13613impl std::fmt::Display for ListTeammateContactsResponse {
13614 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13615 write!(
13616 f,
13617 "{}",
13618 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13619 )
13620 }
13621}
13622
13623impl tabled::Tabled for ListTeammateContactsResponse {
13624 const LENGTH: usize = 3;
13625 fn fields(&self) -> Vec<String> {
13626 vec![
13627 if let Some(pagination) = &self.pagination {
13628 format!("{:?}", pagination)
13629 } else {
13630 String::new()
13631 },
13632 if let Some(underscore_links) = &self.underscore_links {
13633 format!("{:?}", underscore_links)
13634 } else {
13635 String::new()
13636 },
13637 if let Some(results) = &self.results {
13638 format!("{:?}", results)
13639 } else {
13640 String::new()
13641 },
13642 ]
13643 }
13644
13645 fn headers() -> Vec<String> {
13646 vec![
13647 "pagination".to_string(),
13648 "underscore_links".to_string(),
13649 "results".to_string(),
13650 ]
13651 }
13652}
13653
13654#[derive(
13655 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
13656)]
13657pub struct ListContactConversationsResponseUnderscoreLinks {
13658 #[doc = "Link to resource"]
13659 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
13660 pub self_: Option<String>,
13661}
13662
13663impl std::fmt::Display for ListContactConversationsResponseUnderscoreLinks {
13664 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13665 write!(
13666 f,
13667 "{}",
13668 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13669 )
13670 }
13671}
13672
13673impl tabled::Tabled for ListContactConversationsResponseUnderscoreLinks {
13674 const LENGTH: usize = 1;
13675 fn fields(&self) -> Vec<String> {
13676 vec![if let Some(self_) = &self.self_ {
13677 format!("{:?}", self_)
13678 } else {
13679 String::new()
13680 }]
13681 }
13682
13683 fn headers() -> Vec<String> {
13684 vec!["self_".to_string()]
13685 }
13686}
13687
13688#[derive(
13689 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13690)]
13691pub struct ListContactConversationsResponse {
13692 #[serde(
13693 rename = "_pagination",
13694 default,
13695 skip_serializing_if = "Option::is_none"
13696 )]
13697 pub pagination: Option<Pagination>,
13698 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
13699 pub underscore_links: Option<ListContactConversationsResponseUnderscoreLinks>,
13700 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
13701 pub results: Option<Vec<ConversationResponse>>,
13702}
13703
13704impl std::fmt::Display for ListContactConversationsResponse {
13705 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13706 write!(
13707 f,
13708 "{}",
13709 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13710 )
13711 }
13712}
13713
13714impl tabled::Tabled for ListContactConversationsResponse {
13715 const LENGTH: usize = 3;
13716 fn fields(&self) -> Vec<String> {
13717 vec![
13718 if let Some(pagination) = &self.pagination {
13719 format!("{:?}", pagination)
13720 } else {
13721 String::new()
13722 },
13723 if let Some(underscore_links) = &self.underscore_links {
13724 format!("{:?}", underscore_links)
13725 } else {
13726 String::new()
13727 },
13728 if let Some(results) = &self.results {
13729 format!("{:?}", results)
13730 } else {
13731 String::new()
13732 },
13733 ]
13734 }
13735
13736 fn headers() -> Vec<String> {
13737 vec![
13738 "pagination".to_string(),
13739 "underscore_links".to_string(),
13740 "results".to_string(),
13741 ]
13742 }
13743}
13744
13745#[derive(
13746 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
13747)]
13748pub struct ListNotesResponseUnderscoreLinks {
13749 #[doc = "Link to resource"]
13750 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
13751 pub self_: Option<String>,
13752}
13753
13754impl std::fmt::Display for ListNotesResponseUnderscoreLinks {
13755 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13756 write!(
13757 f,
13758 "{}",
13759 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13760 )
13761 }
13762}
13763
13764impl tabled::Tabled for ListNotesResponseUnderscoreLinks {
13765 const LENGTH: usize = 1;
13766 fn fields(&self) -> Vec<String> {
13767 vec![if let Some(self_) = &self.self_ {
13768 format!("{:?}", self_)
13769 } else {
13770 String::new()
13771 }]
13772 }
13773
13774 fn headers() -> Vec<String> {
13775 vec!["self_".to_string()]
13776 }
13777}
13778
13779#[derive(
13780 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13781)]
13782pub struct ListNotesResponse {
13783 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
13784 pub underscore_links: Option<ListNotesResponseUnderscoreLinks>,
13785 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
13786 pub results: Option<Vec<ContactNoteResponses>>,
13787}
13788
13789impl std::fmt::Display for ListNotesResponse {
13790 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13791 write!(
13792 f,
13793 "{}",
13794 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13795 )
13796 }
13797}
13798
13799impl tabled::Tabled for ListNotesResponse {
13800 const LENGTH: usize = 2;
13801 fn fields(&self) -> Vec<String> {
13802 vec![
13803 if let Some(underscore_links) = &self.underscore_links {
13804 format!("{:?}", underscore_links)
13805 } else {
13806 String::new()
13807 },
13808 if let Some(results) = &self.results {
13809 format!("{:?}", results)
13810 } else {
13811 String::new()
13812 },
13813 ]
13814 }
13815
13816 fn headers() -> Vec<String> {
13817 vec!["underscore_links".to_string(), "results".to_string()]
13818 }
13819}
13820
13821#[derive(
13822 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
13823)]
13824pub struct ListChannelsResponseUnderscoreLinks {
13825 #[doc = "Link to resource"]
13826 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
13827 pub self_: Option<String>,
13828}
13829
13830impl std::fmt::Display for ListChannelsResponseUnderscoreLinks {
13831 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13832 write!(
13833 f,
13834 "{}",
13835 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13836 )
13837 }
13838}
13839
13840impl tabled::Tabled for ListChannelsResponseUnderscoreLinks {
13841 const LENGTH: usize = 1;
13842 fn fields(&self) -> Vec<String> {
13843 vec![if let Some(self_) = &self.self_ {
13844 format!("{:?}", self_)
13845 } else {
13846 String::new()
13847 }]
13848 }
13849
13850 fn headers() -> Vec<String> {
13851 vec!["self_".to_string()]
13852 }
13853}
13854
13855#[derive(
13856 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13857)]
13858pub struct ListChannelsResponse {
13859 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
13860 pub underscore_links: Option<ListChannelsResponseUnderscoreLinks>,
13861 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
13862 pub results: Option<Vec<ChannelResponse>>,
13863}
13864
13865impl std::fmt::Display for ListChannelsResponse {
13866 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13867 write!(
13868 f,
13869 "{}",
13870 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13871 )
13872 }
13873}
13874
13875impl tabled::Tabled for ListChannelsResponse {
13876 const LENGTH: usize = 2;
13877 fn fields(&self) -> Vec<String> {
13878 vec![
13879 if let Some(underscore_links) = &self.underscore_links {
13880 format!("{:?}", underscore_links)
13881 } else {
13882 String::new()
13883 },
13884 if let Some(results) = &self.results {
13885 format!("{:?}", results)
13886 } else {
13887 String::new()
13888 },
13889 ]
13890 }
13891
13892 fn headers() -> Vec<String> {
13893 vec!["underscore_links".to_string(), "results".to_string()]
13894 }
13895}
13896
13897#[derive(
13898 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
13899)]
13900pub struct ListTeamChannelsResponseUnderscoreLinks {
13901 #[doc = "Link to resource"]
13902 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
13903 pub self_: Option<String>,
13904}
13905
13906impl std::fmt::Display for ListTeamChannelsResponseUnderscoreLinks {
13907 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13908 write!(
13909 f,
13910 "{}",
13911 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13912 )
13913 }
13914}
13915
13916impl tabled::Tabled for ListTeamChannelsResponseUnderscoreLinks {
13917 const LENGTH: usize = 1;
13918 fn fields(&self) -> Vec<String> {
13919 vec![if let Some(self_) = &self.self_ {
13920 format!("{:?}", self_)
13921 } else {
13922 String::new()
13923 }]
13924 }
13925
13926 fn headers() -> Vec<String> {
13927 vec!["self_".to_string()]
13928 }
13929}
13930
13931#[derive(
13932 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13933)]
13934pub struct ListTeamChannelsResponse {
13935 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
13936 pub underscore_links: Option<ListTeamChannelsResponseUnderscoreLinks>,
13937 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
13938 pub results: Option<Vec<ChannelResponse>>,
13939}
13940
13941impl std::fmt::Display for ListTeamChannelsResponse {
13942 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13943 write!(
13944 f,
13945 "{}",
13946 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13947 )
13948 }
13949}
13950
13951impl tabled::Tabled for ListTeamChannelsResponse {
13952 const LENGTH: usize = 2;
13953 fn fields(&self) -> Vec<String> {
13954 vec![
13955 if let Some(underscore_links) = &self.underscore_links {
13956 format!("{:?}", underscore_links)
13957 } else {
13958 String::new()
13959 },
13960 if let Some(results) = &self.results {
13961 format!("{:?}", results)
13962 } else {
13963 String::new()
13964 },
13965 ]
13966 }
13967
13968 fn headers() -> Vec<String> {
13969 vec!["underscore_links".to_string(), "results".to_string()]
13970 }
13971}
13972
13973#[derive(
13974 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
13975)]
13976pub struct ListTeammateChannelsResponseUnderscoreLinks {
13977 #[doc = "Link to resource"]
13978 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
13979 pub self_: Option<String>,
13980}
13981
13982impl std::fmt::Display for ListTeammateChannelsResponseUnderscoreLinks {
13983 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13984 write!(
13985 f,
13986 "{}",
13987 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13988 )
13989 }
13990}
13991
13992impl tabled::Tabled for ListTeammateChannelsResponseUnderscoreLinks {
13993 const LENGTH: usize = 1;
13994 fn fields(&self) -> Vec<String> {
13995 vec![if let Some(self_) = &self.self_ {
13996 format!("{:?}", self_)
13997 } else {
13998 String::new()
13999 }]
14000 }
14001
14002 fn headers() -> Vec<String> {
14003 vec!["self_".to_string()]
14004 }
14005}
14006
14007#[derive(
14008 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14009)]
14010pub struct ListTeammateChannelsResponse {
14011 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
14012 pub underscore_links: Option<ListTeammateChannelsResponseUnderscoreLinks>,
14013 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
14014 pub results: Option<Vec<ChannelResponse>>,
14015}
14016
14017impl std::fmt::Display for ListTeammateChannelsResponse {
14018 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14019 write!(
14020 f,
14021 "{}",
14022 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14023 )
14024 }
14025}
14026
14027impl tabled::Tabled for ListTeammateChannelsResponse {
14028 const LENGTH: usize = 2;
14029 fn fields(&self) -> Vec<String> {
14030 vec![
14031 if let Some(underscore_links) = &self.underscore_links {
14032 format!("{:?}", underscore_links)
14033 } else {
14034 String::new()
14035 },
14036 if let Some(results) = &self.results {
14037 format!("{:?}", results)
14038 } else {
14039 String::new()
14040 },
14041 ]
14042 }
14043
14044 fn headers() -> Vec<String> {
14045 vec!["underscore_links".to_string(), "results".to_string()]
14046 }
14047}
14048
14049#[derive(
14050 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14051)]
14052pub struct ValidateChannelResponse {
14053 #[serde(default, skip_serializing_if = "Option::is_none")]
14054 pub status: Option<String>,
14055}
14056
14057impl std::fmt::Display for ValidateChannelResponse {
14058 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14059 write!(
14060 f,
14061 "{}",
14062 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14063 )
14064 }
14065}
14066
14067impl tabled::Tabled for ValidateChannelResponse {
14068 const LENGTH: usize = 1;
14069 fn fields(&self) -> Vec<String> {
14070 vec![if let Some(status) = &self.status {
14071 format!("{:?}", status)
14072 } else {
14073 String::new()
14074 }]
14075 }
14076
14077 fn headers() -> Vec<String> {
14078 vec!["status".to_string()]
14079 }
14080}
14081
14082#[derive(
14083 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14084)]
14085pub struct ListInboxChannelsResponseUnderscoreLinks {
14086 #[doc = "Link to resource"]
14087 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
14088 pub self_: Option<String>,
14089}
14090
14091impl std::fmt::Display for ListInboxChannelsResponseUnderscoreLinks {
14092 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14093 write!(
14094 f,
14095 "{}",
14096 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14097 )
14098 }
14099}
14100
14101impl tabled::Tabled for ListInboxChannelsResponseUnderscoreLinks {
14102 const LENGTH: usize = 1;
14103 fn fields(&self) -> Vec<String> {
14104 vec![if let Some(self_) = &self.self_ {
14105 format!("{:?}", self_)
14106 } else {
14107 String::new()
14108 }]
14109 }
14110
14111 fn headers() -> Vec<String> {
14112 vec!["self_".to_string()]
14113 }
14114}
14115
14116#[derive(
14117 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14118)]
14119pub struct ListInboxChannelsResponse {
14120 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
14121 pub underscore_links: Option<ListInboxChannelsResponseUnderscoreLinks>,
14122 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
14123 pub results: Option<Vec<ChannelResponse>>,
14124}
14125
14126impl std::fmt::Display for ListInboxChannelsResponse {
14127 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14128 write!(
14129 f,
14130 "{}",
14131 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14132 )
14133 }
14134}
14135
14136impl tabled::Tabled for ListInboxChannelsResponse {
14137 const LENGTH: usize = 2;
14138 fn fields(&self) -> Vec<String> {
14139 vec![
14140 if let Some(underscore_links) = &self.underscore_links {
14141 format!("{:?}", underscore_links)
14142 } else {
14143 String::new()
14144 },
14145 if let Some(results) = &self.results {
14146 format!("{:?}", results)
14147 } else {
14148 String::new()
14149 },
14150 ]
14151 }
14152
14153 fn headers() -> Vec<String> {
14154 vec!["underscore_links".to_string(), "results".to_string()]
14155 }
14156}
14157
14158#[derive(
14159 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14160)]
14161pub struct ListConversationCommentsResponseUnderscoreLinks {
14162 #[doc = "Link to resource"]
14163 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
14164 pub self_: Option<String>,
14165}
14166
14167impl std::fmt::Display for ListConversationCommentsResponseUnderscoreLinks {
14168 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14169 write!(
14170 f,
14171 "{}",
14172 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14173 )
14174 }
14175}
14176
14177impl tabled::Tabled for ListConversationCommentsResponseUnderscoreLinks {
14178 const LENGTH: usize = 1;
14179 fn fields(&self) -> Vec<String> {
14180 vec![if let Some(self_) = &self.self_ {
14181 format!("{:?}", self_)
14182 } else {
14183 String::new()
14184 }]
14185 }
14186
14187 fn headers() -> Vec<String> {
14188 vec!["self_".to_string()]
14189 }
14190}
14191
14192#[derive(
14193 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14194)]
14195pub struct ListConversationCommentsResponse {
14196 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
14197 pub underscore_links: Option<ListConversationCommentsResponseUnderscoreLinks>,
14198 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
14199 pub results: Option<Vec<CommentResponse>>,
14200}
14201
14202impl std::fmt::Display for ListConversationCommentsResponse {
14203 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14204 write!(
14205 f,
14206 "{}",
14207 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14208 )
14209 }
14210}
14211
14212impl tabled::Tabled for ListConversationCommentsResponse {
14213 const LENGTH: usize = 2;
14214 fn fields(&self) -> Vec<String> {
14215 vec![
14216 if let Some(underscore_links) = &self.underscore_links {
14217 format!("{:?}", underscore_links)
14218 } else {
14219 String::new()
14220 },
14221 if let Some(results) = &self.results {
14222 format!("{:?}", results)
14223 } else {
14224 String::new()
14225 },
14226 ]
14227 }
14228
14229 fn headers() -> Vec<String> {
14230 vec!["underscore_links".to_string(), "results".to_string()]
14231 }
14232}
14233
14234#[derive(
14235 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14236)]
14237pub struct ListCommentMentionsResponseUnderscoreLinks {
14238 #[doc = "Link to resource"]
14239 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
14240 pub self_: Option<String>,
14241}
14242
14243impl std::fmt::Display for ListCommentMentionsResponseUnderscoreLinks {
14244 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14245 write!(
14246 f,
14247 "{}",
14248 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14249 )
14250 }
14251}
14252
14253impl tabled::Tabled for ListCommentMentionsResponseUnderscoreLinks {
14254 const LENGTH: usize = 1;
14255 fn fields(&self) -> Vec<String> {
14256 vec![if let Some(self_) = &self.self_ {
14257 format!("{:?}", self_)
14258 } else {
14259 String::new()
14260 }]
14261 }
14262
14263 fn headers() -> Vec<String> {
14264 vec!["self_".to_string()]
14265 }
14266}
14267
14268#[derive(
14269 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14270)]
14271pub struct ListCommentMentionsResponse {
14272 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
14273 pub underscore_links: Option<ListCommentMentionsResponseUnderscoreLinks>,
14274 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
14275 pub results: Option<Vec<TeammateResponse>>,
14276}
14277
14278impl std::fmt::Display for ListCommentMentionsResponse {
14279 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14280 write!(
14281 f,
14282 "{}",
14283 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14284 )
14285 }
14286}
14287
14288impl tabled::Tabled for ListCommentMentionsResponse {
14289 const LENGTH: usize = 2;
14290 fn fields(&self) -> Vec<String> {
14291 vec![
14292 if let Some(underscore_links) = &self.underscore_links {
14293 format!("{:?}", underscore_links)
14294 } else {
14295 String::new()
14296 },
14297 if let Some(results) = &self.results {
14298 format!("{:?}", results)
14299 } else {
14300 String::new()
14301 },
14302 ]
14303 }
14304
14305 fn headers() -> Vec<String> {
14306 vec!["underscore_links".to_string(), "results".to_string()]
14307 }
14308}
14309
14310#[derive(
14311 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14312)]
14313pub struct ListConversationsResponseUnderscoreLinks {
14314 #[doc = "Link to resource"]
14315 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
14316 pub self_: Option<String>,
14317}
14318
14319impl std::fmt::Display for ListConversationsResponseUnderscoreLinks {
14320 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14321 write!(
14322 f,
14323 "{}",
14324 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14325 )
14326 }
14327}
14328
14329impl tabled::Tabled for ListConversationsResponseUnderscoreLinks {
14330 const LENGTH: usize = 1;
14331 fn fields(&self) -> Vec<String> {
14332 vec![if let Some(self_) = &self.self_ {
14333 format!("{:?}", self_)
14334 } else {
14335 String::new()
14336 }]
14337 }
14338
14339 fn headers() -> Vec<String> {
14340 vec!["self_".to_string()]
14341 }
14342}
14343
14344#[derive(
14345 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14346)]
14347pub struct ListConversationsResponse {
14348 #[serde(
14349 rename = "_pagination",
14350 default,
14351 skip_serializing_if = "Option::is_none"
14352 )]
14353 pub pagination: Option<Pagination>,
14354 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
14355 pub underscore_links: Option<ListConversationsResponseUnderscoreLinks>,
14356 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
14357 pub results: Option<Vec<ConversationResponse>>,
14358}
14359
14360impl std::fmt::Display for ListConversationsResponse {
14361 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14362 write!(
14363 f,
14364 "{}",
14365 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14366 )
14367 }
14368}
14369
14370impl tabled::Tabled for ListConversationsResponse {
14371 const LENGTH: usize = 3;
14372 fn fields(&self) -> Vec<String> {
14373 vec![
14374 if let Some(pagination) = &self.pagination {
14375 format!("{:?}", pagination)
14376 } else {
14377 String::new()
14378 },
14379 if let Some(underscore_links) = &self.underscore_links {
14380 format!("{:?}", underscore_links)
14381 } else {
14382 String::new()
14383 },
14384 if let Some(results) = &self.results {
14385 format!("{:?}", results)
14386 } else {
14387 String::new()
14388 },
14389 ]
14390 }
14391
14392 fn headers() -> Vec<String> {
14393 vec![
14394 "pagination".to_string(),
14395 "underscore_links".to_string(),
14396 "results".to_string(),
14397 ]
14398 }
14399}
14400
14401#[derive(
14402 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14403)]
14404pub struct AddConversationLinkRequestBody {
14405 #[doc = "Link IDs to add. Either link_ids or link_external_urls must be specified but not both"]
14406 #[serde(default, skip_serializing_if = "Option::is_none")]
14407 pub link_ids: Option<Vec<String>>,
14408 #[doc = "Link external URLs to add. Creates links if necessary. Either link_ids or \
14409 link_external_urls must be specified but not both"]
14410 #[serde(default, skip_serializing_if = "Option::is_none")]
14411 pub link_external_urls: Option<Vec<String>>,
14412}
14413
14414impl std::fmt::Display for AddConversationLinkRequestBody {
14415 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14416 write!(
14417 f,
14418 "{}",
14419 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14420 )
14421 }
14422}
14423
14424impl tabled::Tabled for AddConversationLinkRequestBody {
14425 const LENGTH: usize = 2;
14426 fn fields(&self) -> Vec<String> {
14427 vec![
14428 if let Some(link_ids) = &self.link_ids {
14429 format!("{:?}", link_ids)
14430 } else {
14431 String::new()
14432 },
14433 if let Some(link_external_urls) = &self.link_external_urls {
14434 format!("{:?}", link_external_urls)
14435 } else {
14436 String::new()
14437 },
14438 ]
14439 }
14440
14441 fn headers() -> Vec<String> {
14442 vec!["link_ids".to_string(), "link_external_urls".to_string()]
14443 }
14444}
14445
14446#[derive(
14447 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14448)]
14449pub struct RemoveConversationLinkRequestBody {
14450 #[doc = "Link IDs to remove."]
14451 pub link_ids: Vec<String>,
14452}
14453
14454impl std::fmt::Display for RemoveConversationLinkRequestBody {
14455 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14456 write!(
14457 f,
14458 "{}",
14459 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14460 )
14461 }
14462}
14463
14464impl tabled::Tabled for RemoveConversationLinkRequestBody {
14465 const LENGTH: usize = 1;
14466 fn fields(&self) -> Vec<String> {
14467 vec![format!("{:?}", self.link_ids)]
14468 }
14469
14470 fn headers() -> Vec<String> {
14471 vec!["link_ids".to_string()]
14472 }
14473}
14474
14475#[derive(
14476 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14477)]
14478pub struct ListConversationInboxesResponseUnderscoreLinks {
14479 #[doc = "Link to resource"]
14480 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
14481 pub self_: Option<String>,
14482}
14483
14484impl std::fmt::Display for ListConversationInboxesResponseUnderscoreLinks {
14485 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14486 write!(
14487 f,
14488 "{}",
14489 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14490 )
14491 }
14492}
14493
14494impl tabled::Tabled for ListConversationInboxesResponseUnderscoreLinks {
14495 const LENGTH: usize = 1;
14496 fn fields(&self) -> Vec<String> {
14497 vec![if let Some(self_) = &self.self_ {
14498 format!("{:?}", self_)
14499 } else {
14500 String::new()
14501 }]
14502 }
14503
14504 fn headers() -> Vec<String> {
14505 vec!["self_".to_string()]
14506 }
14507}
14508
14509#[derive(
14510 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14511)]
14512pub struct ListConversationInboxesResponse {
14513 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
14514 pub underscore_links: Option<ListConversationInboxesResponseUnderscoreLinks>,
14515 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
14516 pub results: Option<Vec<InboxResponse>>,
14517}
14518
14519impl std::fmt::Display for ListConversationInboxesResponse {
14520 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14521 write!(
14522 f,
14523 "{}",
14524 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14525 )
14526 }
14527}
14528
14529impl tabled::Tabled for ListConversationInboxesResponse {
14530 const LENGTH: usize = 2;
14531 fn fields(&self) -> Vec<String> {
14532 vec![
14533 if let Some(underscore_links) = &self.underscore_links {
14534 format!("{:?}", underscore_links)
14535 } else {
14536 String::new()
14537 },
14538 if let Some(results) = &self.results {
14539 format!("{:?}", results)
14540 } else {
14541 String::new()
14542 },
14543 ]
14544 }
14545
14546 fn headers() -> Vec<String> {
14547 vec!["underscore_links".to_string(), "results".to_string()]
14548 }
14549}
14550
14551#[derive(
14552 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14553)]
14554pub struct ListConversationFollowersResponseUnderscoreLinks {
14555 #[doc = "Link to resource"]
14556 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
14557 pub self_: Option<String>,
14558}
14559
14560impl std::fmt::Display for ListConversationFollowersResponseUnderscoreLinks {
14561 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14562 write!(
14563 f,
14564 "{}",
14565 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14566 )
14567 }
14568}
14569
14570impl tabled::Tabled for ListConversationFollowersResponseUnderscoreLinks {
14571 const LENGTH: usize = 1;
14572 fn fields(&self) -> Vec<String> {
14573 vec![if let Some(self_) = &self.self_ {
14574 format!("{:?}", self_)
14575 } else {
14576 String::new()
14577 }]
14578 }
14579
14580 fn headers() -> Vec<String> {
14581 vec!["self_".to_string()]
14582 }
14583}
14584
14585#[derive(
14586 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14587)]
14588pub struct ListConversationFollowersResponse {
14589 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
14590 pub underscore_links: Option<ListConversationFollowersResponseUnderscoreLinks>,
14591 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
14592 pub results: Option<Vec<TeammateResponse>>,
14593}
14594
14595impl std::fmt::Display for ListConversationFollowersResponse {
14596 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14597 write!(
14598 f,
14599 "{}",
14600 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14601 )
14602 }
14603}
14604
14605impl tabled::Tabled for ListConversationFollowersResponse {
14606 const LENGTH: usize = 2;
14607 fn fields(&self) -> Vec<String> {
14608 vec![
14609 if let Some(underscore_links) = &self.underscore_links {
14610 format!("{:?}", underscore_links)
14611 } else {
14612 String::new()
14613 },
14614 if let Some(results) = &self.results {
14615 format!("{:?}", results)
14616 } else {
14617 String::new()
14618 },
14619 ]
14620 }
14621
14622 fn headers() -> Vec<String> {
14623 vec!["underscore_links".to_string(), "results".to_string()]
14624 }
14625}
14626
14627#[derive(
14628 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14629)]
14630pub struct AddConversationFollowersRequestBody {
14631 #[doc = "IDs of the teammate to add to the followers list."]
14632 pub teammate_ids: Vec<String>,
14633}
14634
14635impl std::fmt::Display for AddConversationFollowersRequestBody {
14636 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14637 write!(
14638 f,
14639 "{}",
14640 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14641 )
14642 }
14643}
14644
14645impl tabled::Tabled for AddConversationFollowersRequestBody {
14646 const LENGTH: usize = 1;
14647 fn fields(&self) -> Vec<String> {
14648 vec![format!("{:?}", self.teammate_ids)]
14649 }
14650
14651 fn headers() -> Vec<String> {
14652 vec!["teammate_ids".to_string()]
14653 }
14654}
14655
14656#[derive(
14657 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14658)]
14659pub struct DeleteConversationFollowersRequestBody {
14660 #[doc = "IDs of the teammate to remove from the followers list."]
14661 pub teammate_ids: Vec<String>,
14662}
14663
14664impl std::fmt::Display for DeleteConversationFollowersRequestBody {
14665 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14666 write!(
14667 f,
14668 "{}",
14669 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14670 )
14671 }
14672}
14673
14674impl tabled::Tabled for DeleteConversationFollowersRequestBody {
14675 const LENGTH: usize = 1;
14676 fn fields(&self) -> Vec<String> {
14677 vec![format!("{:?}", self.teammate_ids)]
14678 }
14679
14680 fn headers() -> Vec<String> {
14681 vec!["teammate_ids".to_string()]
14682 }
14683}
14684
14685#[derive(
14686 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14687)]
14688pub struct ListConversationMessagesResponseUnderscoreLinks {
14689 #[doc = "Link to resource"]
14690 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
14691 pub self_: Option<String>,
14692}
14693
14694impl std::fmt::Display for ListConversationMessagesResponseUnderscoreLinks {
14695 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14696 write!(
14697 f,
14698 "{}",
14699 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14700 )
14701 }
14702}
14703
14704impl tabled::Tabled for ListConversationMessagesResponseUnderscoreLinks {
14705 const LENGTH: usize = 1;
14706 fn fields(&self) -> Vec<String> {
14707 vec![if let Some(self_) = &self.self_ {
14708 format!("{:?}", self_)
14709 } else {
14710 String::new()
14711 }]
14712 }
14713
14714 fn headers() -> Vec<String> {
14715 vec!["self_".to_string()]
14716 }
14717}
14718
14719#[derive(
14720 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14721)]
14722pub struct ListConversationMessagesResponse {
14723 #[serde(
14724 rename = "_pagination",
14725 default,
14726 skip_serializing_if = "Option::is_none"
14727 )]
14728 pub pagination: Option<Pagination>,
14729 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
14730 pub underscore_links: Option<ListConversationMessagesResponseUnderscoreLinks>,
14731 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
14732 pub results: Option<Vec<MessageResponse>>,
14733}
14734
14735impl std::fmt::Display for ListConversationMessagesResponse {
14736 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14737 write!(
14738 f,
14739 "{}",
14740 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14741 )
14742 }
14743}
14744
14745impl tabled::Tabled for ListConversationMessagesResponse {
14746 const LENGTH: usize = 3;
14747 fn fields(&self) -> Vec<String> {
14748 vec![
14749 if let Some(pagination) = &self.pagination {
14750 format!("{:?}", pagination)
14751 } else {
14752 String::new()
14753 },
14754 if let Some(underscore_links) = &self.underscore_links {
14755 format!("{:?}", underscore_links)
14756 } else {
14757 String::new()
14758 },
14759 if let Some(results) = &self.results {
14760 format!("{:?}", results)
14761 } else {
14762 String::new()
14763 },
14764 ]
14765 }
14766
14767 fn headers() -> Vec<String> {
14768 vec![
14769 "pagination".to_string(),
14770 "underscore_links".to_string(),
14771 "results".to_string(),
14772 ]
14773 }
14774}
14775
14776#[derive(
14777 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14778)]
14779pub struct ListConversationEventsResponseUnderscoreLinks {
14780 #[doc = "Link to resource"]
14781 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
14782 pub self_: Option<String>,
14783}
14784
14785impl std::fmt::Display for ListConversationEventsResponseUnderscoreLinks {
14786 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14787 write!(
14788 f,
14789 "{}",
14790 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14791 )
14792 }
14793}
14794
14795impl tabled::Tabled for ListConversationEventsResponseUnderscoreLinks {
14796 const LENGTH: usize = 1;
14797 fn fields(&self) -> Vec<String> {
14798 vec![if let Some(self_) = &self.self_ {
14799 format!("{:?}", self_)
14800 } else {
14801 String::new()
14802 }]
14803 }
14804
14805 fn headers() -> Vec<String> {
14806 vec!["self_".to_string()]
14807 }
14808}
14809
14810#[derive(
14811 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14812)]
14813pub struct ListConversationEventsResponse {
14814 #[serde(
14815 rename = "_pagination",
14816 default,
14817 skip_serializing_if = "Option::is_none"
14818 )]
14819 pub pagination: Option<Pagination>,
14820 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
14821 pub underscore_links: Option<ListConversationEventsResponseUnderscoreLinks>,
14822 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
14823 pub results: Option<Vec<EventResponse>>,
14824}
14825
14826impl std::fmt::Display for ListConversationEventsResponse {
14827 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14828 write!(
14829 f,
14830 "{}",
14831 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14832 )
14833 }
14834}
14835
14836impl tabled::Tabled for ListConversationEventsResponse {
14837 const LENGTH: usize = 3;
14838 fn fields(&self) -> Vec<String> {
14839 vec![
14840 if let Some(pagination) = &self.pagination {
14841 format!("{:?}", pagination)
14842 } else {
14843 String::new()
14844 },
14845 if let Some(underscore_links) = &self.underscore_links {
14846 format!("{:?}", underscore_links)
14847 } else {
14848 String::new()
14849 },
14850 if let Some(results) = &self.results {
14851 format!("{:?}", results)
14852 } else {
14853 String::new()
14854 },
14855 ]
14856 }
14857
14858 fn headers() -> Vec<String> {
14859 vec![
14860 "pagination".to_string(),
14861 "underscore_links".to_string(),
14862 "results".to_string(),
14863 ]
14864 }
14865}
14866
14867#[derive(
14868 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14869)]
14870pub struct ListContactCustomFieldsResponseUnderscoreLinks {
14871 #[doc = "Link to resource"]
14872 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
14873 pub self_: Option<String>,
14874}
14875
14876impl std::fmt::Display for ListContactCustomFieldsResponseUnderscoreLinks {
14877 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14878 write!(
14879 f,
14880 "{}",
14881 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14882 )
14883 }
14884}
14885
14886impl tabled::Tabled for ListContactCustomFieldsResponseUnderscoreLinks {
14887 const LENGTH: usize = 1;
14888 fn fields(&self) -> Vec<String> {
14889 vec![if let Some(self_) = &self.self_ {
14890 format!("{:?}", self_)
14891 } else {
14892 String::new()
14893 }]
14894 }
14895
14896 fn headers() -> Vec<String> {
14897 vec!["self_".to_string()]
14898 }
14899}
14900
14901#[derive(
14902 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14903)]
14904pub struct ListContactCustomFieldsResponse {
14905 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
14906 pub underscore_links: Option<ListContactCustomFieldsResponseUnderscoreLinks>,
14907 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
14908 pub results: Option<Vec<CustomFieldResponse>>,
14909}
14910
14911impl std::fmt::Display for ListContactCustomFieldsResponse {
14912 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14913 write!(
14914 f,
14915 "{}",
14916 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14917 )
14918 }
14919}
14920
14921impl tabled::Tabled for ListContactCustomFieldsResponse {
14922 const LENGTH: usize = 2;
14923 fn fields(&self) -> Vec<String> {
14924 vec![
14925 if let Some(underscore_links) = &self.underscore_links {
14926 format!("{:?}", underscore_links)
14927 } else {
14928 String::new()
14929 },
14930 if let Some(results) = &self.results {
14931 format!("{:?}", results)
14932 } else {
14933 String::new()
14934 },
14935 ]
14936 }
14937
14938 fn headers() -> Vec<String> {
14939 vec!["underscore_links".to_string(), "results".to_string()]
14940 }
14941}
14942
14943#[derive(
14944 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
14945)]
14946pub struct ListCustomFieldsResponseUnderscoreLinks {
14947 #[doc = "Link to resource"]
14948 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
14949 pub self_: Option<String>,
14950}
14951
14952impl std::fmt::Display for ListCustomFieldsResponseUnderscoreLinks {
14953 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14954 write!(
14955 f,
14956 "{}",
14957 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14958 )
14959 }
14960}
14961
14962impl tabled::Tabled for ListCustomFieldsResponseUnderscoreLinks {
14963 const LENGTH: usize = 1;
14964 fn fields(&self) -> Vec<String> {
14965 vec![if let Some(self_) = &self.self_ {
14966 format!("{:?}", self_)
14967 } else {
14968 String::new()
14969 }]
14970 }
14971
14972 fn headers() -> Vec<String> {
14973 vec!["self_".to_string()]
14974 }
14975}
14976
14977#[derive(
14978 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14979)]
14980pub struct ListCustomFieldsResponse {
14981 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
14982 pub underscore_links: Option<ListCustomFieldsResponseUnderscoreLinks>,
14983 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
14984 pub results: Option<Vec<CustomFieldResponse>>,
14985}
14986
14987impl std::fmt::Display for ListCustomFieldsResponse {
14988 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14989 write!(
14990 f,
14991 "{}",
14992 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14993 )
14994 }
14995}
14996
14997impl tabled::Tabled for ListCustomFieldsResponse {
14998 const LENGTH: usize = 2;
14999 fn fields(&self) -> Vec<String> {
15000 vec![
15001 if let Some(underscore_links) = &self.underscore_links {
15002 format!("{:?}", underscore_links)
15003 } else {
15004 String::new()
15005 },
15006 if let Some(results) = &self.results {
15007 format!("{:?}", results)
15008 } else {
15009 String::new()
15010 },
15011 ]
15012 }
15013
15014 fn headers() -> Vec<String> {
15015 vec!["underscore_links".to_string(), "results".to_string()]
15016 }
15017}
15018
15019#[derive(
15020 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15021)]
15022pub struct ListConversationDraftsResponseUnderscoreLinks {
15023 #[doc = "Link to resource"]
15024 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
15025 pub self_: Option<String>,
15026}
15027
15028impl std::fmt::Display for ListConversationDraftsResponseUnderscoreLinks {
15029 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15030 write!(
15031 f,
15032 "{}",
15033 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15034 )
15035 }
15036}
15037
15038impl tabled::Tabled for ListConversationDraftsResponseUnderscoreLinks {
15039 const LENGTH: usize = 1;
15040 fn fields(&self) -> Vec<String> {
15041 vec![if let Some(self_) = &self.self_ {
15042 format!("{:?}", self_)
15043 } else {
15044 String::new()
15045 }]
15046 }
15047
15048 fn headers() -> Vec<String> {
15049 vec!["self_".to_string()]
15050 }
15051}
15052
15053#[derive(
15054 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15055)]
15056pub struct ListConversationDraftsResponse {
15057 #[serde(
15058 rename = "_pagination",
15059 default,
15060 skip_serializing_if = "Option::is_none"
15061 )]
15062 pub pagination: Option<Pagination>,
15063 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
15064 pub underscore_links: Option<ListConversationDraftsResponseUnderscoreLinks>,
15065 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
15066 pub results: Option<Vec<MessageResponse>>,
15067}
15068
15069impl std::fmt::Display for ListConversationDraftsResponse {
15070 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15071 write!(
15072 f,
15073 "{}",
15074 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15075 )
15076 }
15077}
15078
15079impl tabled::Tabled for ListConversationDraftsResponse {
15080 const LENGTH: usize = 3;
15081 fn fields(&self) -> Vec<String> {
15082 vec![
15083 if let Some(pagination) = &self.pagination {
15084 format!("{:?}", pagination)
15085 } else {
15086 String::new()
15087 },
15088 if let Some(underscore_links) = &self.underscore_links {
15089 format!("{:?}", underscore_links)
15090 } else {
15091 String::new()
15092 },
15093 if let Some(results) = &self.results {
15094 format!("{:?}", results)
15095 } else {
15096 String::new()
15097 },
15098 ]
15099 }
15100
15101 fn headers() -> Vec<String> {
15102 vec![
15103 "pagination".to_string(),
15104 "underscore_links".to_string(),
15105 "results".to_string(),
15106 ]
15107 }
15108}
15109
15110#[derive(
15111 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15112)]
15113pub struct ListInboxesResponseUnderscoreLinks {
15114 #[doc = "Link to resource"]
15115 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
15116 pub self_: Option<String>,
15117}
15118
15119impl std::fmt::Display for ListInboxesResponseUnderscoreLinks {
15120 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15121 write!(
15122 f,
15123 "{}",
15124 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15125 )
15126 }
15127}
15128
15129impl tabled::Tabled for ListInboxesResponseUnderscoreLinks {
15130 const LENGTH: usize = 1;
15131 fn fields(&self) -> Vec<String> {
15132 vec![if let Some(self_) = &self.self_ {
15133 format!("{:?}", self_)
15134 } else {
15135 String::new()
15136 }]
15137 }
15138
15139 fn headers() -> Vec<String> {
15140 vec!["self_".to_string()]
15141 }
15142}
15143
15144#[derive(
15145 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15146)]
15147pub struct ListInboxesResponse {
15148 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
15149 pub underscore_links: Option<ListInboxesResponseUnderscoreLinks>,
15150 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
15151 pub results: Option<Vec<InboxResponse>>,
15152}
15153
15154impl std::fmt::Display for ListInboxesResponse {
15155 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15156 write!(
15157 f,
15158 "{}",
15159 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15160 )
15161 }
15162}
15163
15164impl tabled::Tabled for ListInboxesResponse {
15165 const LENGTH: usize = 2;
15166 fn fields(&self) -> Vec<String> {
15167 vec![
15168 if let Some(underscore_links) = &self.underscore_links {
15169 format!("{:?}", underscore_links)
15170 } else {
15171 String::new()
15172 },
15173 if let Some(results) = &self.results {
15174 format!("{:?}", results)
15175 } else {
15176 String::new()
15177 },
15178 ]
15179 }
15180
15181 fn headers() -> Vec<String> {
15182 vec!["underscore_links".to_string(), "results".to_string()]
15183 }
15184}
15185
15186#[derive(
15187 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15188)]
15189pub struct ListTeamInboxesResponseUnderscoreLinks {
15190 #[doc = "Link to resource"]
15191 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
15192 pub self_: Option<String>,
15193}
15194
15195impl std::fmt::Display for ListTeamInboxesResponseUnderscoreLinks {
15196 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15197 write!(
15198 f,
15199 "{}",
15200 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15201 )
15202 }
15203}
15204
15205impl tabled::Tabled for ListTeamInboxesResponseUnderscoreLinks {
15206 const LENGTH: usize = 1;
15207 fn fields(&self) -> Vec<String> {
15208 vec![if let Some(self_) = &self.self_ {
15209 format!("{:?}", self_)
15210 } else {
15211 String::new()
15212 }]
15213 }
15214
15215 fn headers() -> Vec<String> {
15216 vec!["self_".to_string()]
15217 }
15218}
15219
15220#[derive(
15221 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15222)]
15223pub struct ListTeamInboxesResponse {
15224 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
15225 pub underscore_links: Option<ListTeamInboxesResponseUnderscoreLinks>,
15226 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
15227 pub results: Option<Vec<InboxResponse>>,
15228}
15229
15230impl std::fmt::Display for ListTeamInboxesResponse {
15231 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15232 write!(
15233 f,
15234 "{}",
15235 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15236 )
15237 }
15238}
15239
15240impl tabled::Tabled for ListTeamInboxesResponse {
15241 const LENGTH: usize = 2;
15242 fn fields(&self) -> Vec<String> {
15243 vec![
15244 if let Some(underscore_links) = &self.underscore_links {
15245 format!("{:?}", underscore_links)
15246 } else {
15247 String::new()
15248 },
15249 if let Some(results) = &self.results {
15250 format!("{:?}", results)
15251 } else {
15252 String::new()
15253 },
15254 ]
15255 }
15256
15257 fn headers() -> Vec<String> {
15258 vec!["underscore_links".to_string(), "results".to_string()]
15259 }
15260}
15261
15262#[derive(
15263 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15264)]
15265pub struct ListInboxConversationsResponseUnderscoreLinks {
15266 #[doc = "Link to resource"]
15267 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
15268 pub self_: Option<String>,
15269}
15270
15271impl std::fmt::Display for ListInboxConversationsResponseUnderscoreLinks {
15272 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15273 write!(
15274 f,
15275 "{}",
15276 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15277 )
15278 }
15279}
15280
15281impl tabled::Tabled for ListInboxConversationsResponseUnderscoreLinks {
15282 const LENGTH: usize = 1;
15283 fn fields(&self) -> Vec<String> {
15284 vec![if let Some(self_) = &self.self_ {
15285 format!("{:?}", self_)
15286 } else {
15287 String::new()
15288 }]
15289 }
15290
15291 fn headers() -> Vec<String> {
15292 vec!["self_".to_string()]
15293 }
15294}
15295
15296#[derive(
15297 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15298)]
15299pub struct ListInboxConversationsResponse {
15300 #[serde(
15301 rename = "_pagination",
15302 default,
15303 skip_serializing_if = "Option::is_none"
15304 )]
15305 pub pagination: Option<Pagination>,
15306 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
15307 pub underscore_links: Option<ListInboxConversationsResponseUnderscoreLinks>,
15308 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
15309 pub results: Option<Vec<ConversationResponse>>,
15310}
15311
15312impl std::fmt::Display for ListInboxConversationsResponse {
15313 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15314 write!(
15315 f,
15316 "{}",
15317 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15318 )
15319 }
15320}
15321
15322impl tabled::Tabled for ListInboxConversationsResponse {
15323 const LENGTH: usize = 3;
15324 fn fields(&self) -> Vec<String> {
15325 vec![
15326 if let Some(pagination) = &self.pagination {
15327 format!("{:?}", pagination)
15328 } else {
15329 String::new()
15330 },
15331 if let Some(underscore_links) = &self.underscore_links {
15332 format!("{:?}", underscore_links)
15333 } else {
15334 String::new()
15335 },
15336 if let Some(results) = &self.results {
15337 format!("{:?}", results)
15338 } else {
15339 String::new()
15340 },
15341 ]
15342 }
15343
15344 fn headers() -> Vec<String> {
15345 vec![
15346 "pagination".to_string(),
15347 "underscore_links".to_string(),
15348 "results".to_string(),
15349 ]
15350 }
15351}
15352
15353#[derive(
15354 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15355)]
15356pub struct ListInboxTeammatesResponseUnderscoreLinks {
15357 #[doc = "Link to resource"]
15358 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
15359 pub self_: Option<String>,
15360}
15361
15362impl std::fmt::Display for ListInboxTeammatesResponseUnderscoreLinks {
15363 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15364 write!(
15365 f,
15366 "{}",
15367 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15368 )
15369 }
15370}
15371
15372impl tabled::Tabled for ListInboxTeammatesResponseUnderscoreLinks {
15373 const LENGTH: usize = 1;
15374 fn fields(&self) -> Vec<String> {
15375 vec![if let Some(self_) = &self.self_ {
15376 format!("{:?}", self_)
15377 } else {
15378 String::new()
15379 }]
15380 }
15381
15382 fn headers() -> Vec<String> {
15383 vec!["self_".to_string()]
15384 }
15385}
15386
15387#[derive(
15388 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15389)]
15390pub struct ListInboxTeammatesResponse {
15391 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
15392 pub underscore_links: Option<ListInboxTeammatesResponseUnderscoreLinks>,
15393 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
15394 pub results: Option<Vec<TeammateResponse>>,
15395}
15396
15397impl std::fmt::Display for ListInboxTeammatesResponse {
15398 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15399 write!(
15400 f,
15401 "{}",
15402 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15403 )
15404 }
15405}
15406
15407impl tabled::Tabled for ListInboxTeammatesResponse {
15408 const LENGTH: usize = 2;
15409 fn fields(&self) -> Vec<String> {
15410 vec![
15411 if let Some(underscore_links) = &self.underscore_links {
15412 format!("{:?}", underscore_links)
15413 } else {
15414 String::new()
15415 },
15416 if let Some(results) = &self.results {
15417 format!("{:?}", results)
15418 } else {
15419 String::new()
15420 },
15421 ]
15422 }
15423
15424 fn headers() -> Vec<String> {
15425 vec!["underscore_links".to_string(), "results".to_string()]
15426 }
15427}
15428
15429#[derive(
15430 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15431)]
15432pub struct GetMessageSeenStatusResponseUnderscoreLinks {
15433 #[doc = "Link to resource"]
15434 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
15435 pub self_: Option<String>,
15436}
15437
15438impl std::fmt::Display for GetMessageSeenStatusResponseUnderscoreLinks {
15439 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15440 write!(
15441 f,
15442 "{}",
15443 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15444 )
15445 }
15446}
15447
15448impl tabled::Tabled for GetMessageSeenStatusResponseUnderscoreLinks {
15449 const LENGTH: usize = 1;
15450 fn fields(&self) -> Vec<String> {
15451 vec![if let Some(self_) = &self.self_ {
15452 format!("{:?}", self_)
15453 } else {
15454 String::new()
15455 }]
15456 }
15457
15458 fn headers() -> Vec<String> {
15459 vec!["self_".to_string()]
15460 }
15461}
15462
15463#[derive(
15464 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15465)]
15466pub struct GetMessageSeenStatusResponse {
15467 #[serde(
15468 rename = "_pagination",
15469 default,
15470 skip_serializing_if = "Option::is_none"
15471 )]
15472 pub pagination: Option<Pagination>,
15473 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
15474 pub underscore_links: Option<GetMessageSeenStatusResponseUnderscoreLinks>,
15475 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
15476 pub results: Option<Vec<SeenReceiptResponse>>,
15477}
15478
15479impl std::fmt::Display for GetMessageSeenStatusResponse {
15480 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15481 write!(
15482 f,
15483 "{}",
15484 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15485 )
15486 }
15487}
15488
15489impl tabled::Tabled for GetMessageSeenStatusResponse {
15490 const LENGTH: usize = 3;
15491 fn fields(&self) -> Vec<String> {
15492 vec![
15493 if let Some(pagination) = &self.pagination {
15494 format!("{:?}", pagination)
15495 } else {
15496 String::new()
15497 },
15498 if let Some(underscore_links) = &self.underscore_links {
15499 format!("{:?}", underscore_links)
15500 } else {
15501 String::new()
15502 },
15503 if let Some(results) = &self.results {
15504 format!("{:?}", results)
15505 } else {
15506 String::new()
15507 },
15508 ]
15509 }
15510
15511 fn headers() -> Vec<String> {
15512 vec![
15513 "pagination".to_string(),
15514 "underscore_links".to_string(),
15515 "results".to_string(),
15516 ]
15517 }
15518}
15519
15520#[derive(
15521 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15522)]
15523pub struct MarkMessageSeenRequestBody {}
15524
15525impl std::fmt::Display for MarkMessageSeenRequestBody {
15526 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15527 write!(
15528 f,
15529 "{}",
15530 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15531 )
15532 }
15533}
15534
15535impl tabled::Tabled for MarkMessageSeenRequestBody {
15536 const LENGTH: usize = 0;
15537 fn fields(&self) -> Vec<String> {
15538 vec![]
15539 }
15540
15541 fn headers() -> Vec<String> {
15542 vec![]
15543 }
15544}
15545
15546#[derive(
15547 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15548)]
15549pub struct ReceiveCustomMessageResponse {
15550 #[serde(default, skip_serializing_if = "Option::is_none")]
15551 pub status: Option<String>,
15552 #[doc = "Message unique identifier"]
15553 #[serde(default, skip_serializing_if = "Option::is_none")]
15554 pub message_uid: Option<String>,
15555}
15556
15557impl std::fmt::Display for ReceiveCustomMessageResponse {
15558 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15559 write!(
15560 f,
15561 "{}",
15562 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15563 )
15564 }
15565}
15566
15567impl tabled::Tabled for ReceiveCustomMessageResponse {
15568 const LENGTH: usize = 2;
15569 fn fields(&self) -> Vec<String> {
15570 vec![
15571 if let Some(status) = &self.status {
15572 format!("{:?}", status)
15573 } else {
15574 String::new()
15575 },
15576 if let Some(message_uid) = &self.message_uid {
15577 format!("{:?}", message_uid)
15578 } else {
15579 String::new()
15580 },
15581 ]
15582 }
15583
15584 fn headers() -> Vec<String> {
15585 vec!["status".to_string(), "message_uid".to_string()]
15586 }
15587}
15588
15589#[derive(
15590 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15591)]
15592pub struct ImportInboxMessageResponse {
15593 #[serde(default, skip_serializing_if = "Option::is_none")]
15594 pub status: Option<String>,
15595 #[doc = "Message unique identifier"]
15596 #[serde(default, skip_serializing_if = "Option::is_none")]
15597 pub message_uid: Option<String>,
15598}
15599
15600impl std::fmt::Display for ImportInboxMessageResponse {
15601 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15602 write!(
15603 f,
15604 "{}",
15605 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15606 )
15607 }
15608}
15609
15610impl tabled::Tabled for ImportInboxMessageResponse {
15611 const LENGTH: usize = 2;
15612 fn fields(&self) -> Vec<String> {
15613 vec![
15614 if let Some(status) = &self.status {
15615 format!("{:?}", status)
15616 } else {
15617 String::new()
15618 },
15619 if let Some(message_uid) = &self.message_uid {
15620 format!("{:?}", message_uid)
15621 } else {
15622 String::new()
15623 },
15624 ]
15625 }
15626
15627 fn headers() -> Vec<String> {
15628 vec!["status".to_string(), "message_uid".to_string()]
15629 }
15630}
15631
15632#[derive(
15633 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15634)]
15635pub struct ListRulesResponseUnderscoreLinks {
15636 #[doc = "Link to resource"]
15637 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
15638 pub self_: Option<String>,
15639}
15640
15641impl std::fmt::Display for ListRulesResponseUnderscoreLinks {
15642 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15643 write!(
15644 f,
15645 "{}",
15646 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15647 )
15648 }
15649}
15650
15651impl tabled::Tabled for ListRulesResponseUnderscoreLinks {
15652 const LENGTH: usize = 1;
15653 fn fields(&self) -> Vec<String> {
15654 vec![if let Some(self_) = &self.self_ {
15655 format!("{:?}", self_)
15656 } else {
15657 String::new()
15658 }]
15659 }
15660
15661 fn headers() -> Vec<String> {
15662 vec!["self_".to_string()]
15663 }
15664}
15665
15666#[derive(
15667 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15668)]
15669pub struct ListRulesResponse {
15670 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
15671 pub underscore_links: Option<ListRulesResponseUnderscoreLinks>,
15672 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
15673 pub results: Option<Vec<RuleResponse>>,
15674}
15675
15676impl std::fmt::Display for ListRulesResponse {
15677 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15678 write!(
15679 f,
15680 "{}",
15681 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15682 )
15683 }
15684}
15685
15686impl tabled::Tabled for ListRulesResponse {
15687 const LENGTH: usize = 2;
15688 fn fields(&self) -> Vec<String> {
15689 vec![
15690 if let Some(underscore_links) = &self.underscore_links {
15691 format!("{:?}", underscore_links)
15692 } else {
15693 String::new()
15694 },
15695 if let Some(results) = &self.results {
15696 format!("{:?}", results)
15697 } else {
15698 String::new()
15699 },
15700 ]
15701 }
15702
15703 fn headers() -> Vec<String> {
15704 vec!["underscore_links".to_string(), "results".to_string()]
15705 }
15706}
15707
15708#[derive(
15709 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15710)]
15711pub struct ListTeamRulesResponseUnderscoreLinks {
15712 #[doc = "Link to resource"]
15713 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
15714 pub self_: Option<String>,
15715}
15716
15717impl std::fmt::Display for ListTeamRulesResponseUnderscoreLinks {
15718 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15719 write!(
15720 f,
15721 "{}",
15722 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15723 )
15724 }
15725}
15726
15727impl tabled::Tabled for ListTeamRulesResponseUnderscoreLinks {
15728 const LENGTH: usize = 1;
15729 fn fields(&self) -> Vec<String> {
15730 vec![if let Some(self_) = &self.self_ {
15731 format!("{:?}", self_)
15732 } else {
15733 String::new()
15734 }]
15735 }
15736
15737 fn headers() -> Vec<String> {
15738 vec!["self_".to_string()]
15739 }
15740}
15741
15742#[derive(
15743 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15744)]
15745pub struct ListTeamRulesResponse {
15746 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
15747 pub underscore_links: Option<ListTeamRulesResponseUnderscoreLinks>,
15748 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
15749 pub results: Option<Vec<RuleResponse>>,
15750}
15751
15752impl std::fmt::Display for ListTeamRulesResponse {
15753 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15754 write!(
15755 f,
15756 "{}",
15757 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15758 )
15759 }
15760}
15761
15762impl tabled::Tabled for ListTeamRulesResponse {
15763 const LENGTH: usize = 2;
15764 fn fields(&self) -> Vec<String> {
15765 vec![
15766 if let Some(underscore_links) = &self.underscore_links {
15767 format!("{:?}", underscore_links)
15768 } else {
15769 String::new()
15770 },
15771 if let Some(results) = &self.results {
15772 format!("{:?}", results)
15773 } else {
15774 String::new()
15775 },
15776 ]
15777 }
15778
15779 fn headers() -> Vec<String> {
15780 vec!["underscore_links".to_string(), "results".to_string()]
15781 }
15782}
15783
15784#[derive(
15785 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15786)]
15787pub struct ListTeammateRulesResponseUnderscoreLinks {
15788 #[doc = "Link to resource"]
15789 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
15790 pub self_: Option<String>,
15791}
15792
15793impl std::fmt::Display for ListTeammateRulesResponseUnderscoreLinks {
15794 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15795 write!(
15796 f,
15797 "{}",
15798 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15799 )
15800 }
15801}
15802
15803impl tabled::Tabled for ListTeammateRulesResponseUnderscoreLinks {
15804 const LENGTH: usize = 1;
15805 fn fields(&self) -> Vec<String> {
15806 vec![if let Some(self_) = &self.self_ {
15807 format!("{:?}", self_)
15808 } else {
15809 String::new()
15810 }]
15811 }
15812
15813 fn headers() -> Vec<String> {
15814 vec!["self_".to_string()]
15815 }
15816}
15817
15818#[derive(
15819 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15820)]
15821pub struct ListTeammateRulesResponse {
15822 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
15823 pub underscore_links: Option<ListTeammateRulesResponseUnderscoreLinks>,
15824 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
15825 pub results: Option<Vec<RuleResponse>>,
15826}
15827
15828impl std::fmt::Display for ListTeammateRulesResponse {
15829 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15830 write!(
15831 f,
15832 "{}",
15833 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15834 )
15835 }
15836}
15837
15838impl tabled::Tabled for ListTeammateRulesResponse {
15839 const LENGTH: usize = 2;
15840 fn fields(&self) -> Vec<String> {
15841 vec![
15842 if let Some(underscore_links) = &self.underscore_links {
15843 format!("{:?}", underscore_links)
15844 } else {
15845 String::new()
15846 },
15847 if let Some(results) = &self.results {
15848 format!("{:?}", results)
15849 } else {
15850 String::new()
15851 },
15852 ]
15853 }
15854
15855 fn headers() -> Vec<String> {
15856 vec!["underscore_links".to_string(), "results".to_string()]
15857 }
15858}
15859
15860#[derive(
15861 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15862)]
15863pub struct SearchConversationsResponse {
15864 #[serde(
15865 rename = "_pagination",
15866 default,
15867 skip_serializing_if = "Option::is_none"
15868 )]
15869 pub pagination: Option<Pagination>,
15870 #[doc = "Total number of matching conversations"]
15871 #[serde(rename = "_total", default, skip_serializing_if = "Option::is_none")]
15872 pub total: Option<i64>,
15873 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
15874 pub results: Option<Vec<ConversationResponse>>,
15875}
15876
15877impl std::fmt::Display for SearchConversationsResponse {
15878 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15879 write!(
15880 f,
15881 "{}",
15882 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15883 )
15884 }
15885}
15886
15887impl tabled::Tabled for SearchConversationsResponse {
15888 const LENGTH: usize = 3;
15889 fn fields(&self) -> Vec<String> {
15890 vec![
15891 if let Some(pagination) = &self.pagination {
15892 format!("{:?}", pagination)
15893 } else {
15894 String::new()
15895 },
15896 if let Some(total) = &self.total {
15897 format!("{:?}", total)
15898 } else {
15899 String::new()
15900 },
15901 if let Some(results) = &self.results {
15902 format!("{:?}", results)
15903 } else {
15904 String::new()
15905 },
15906 ]
15907 }
15908
15909 fn headers() -> Vec<String> {
15910 vec![
15911 "pagination".to_string(),
15912 "total".to_string(),
15913 "results".to_string(),
15914 ]
15915 }
15916}
15917
15918#[derive(
15919 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15920)]
15921pub struct ListShiftsResponseUnderscoreLinks {
15922 #[doc = "Link to resource"]
15923 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
15924 pub self_: Option<String>,
15925}
15926
15927impl std::fmt::Display for ListShiftsResponseUnderscoreLinks {
15928 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15929 write!(
15930 f,
15931 "{}",
15932 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15933 )
15934 }
15935}
15936
15937impl tabled::Tabled for ListShiftsResponseUnderscoreLinks {
15938 const LENGTH: usize = 1;
15939 fn fields(&self) -> Vec<String> {
15940 vec![if let Some(self_) = &self.self_ {
15941 format!("{:?}", self_)
15942 } else {
15943 String::new()
15944 }]
15945 }
15946
15947 fn headers() -> Vec<String> {
15948 vec!["self_".to_string()]
15949 }
15950}
15951
15952#[derive(
15953 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15954)]
15955pub struct ListShiftsResponse {
15956 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
15957 pub underscore_links: Option<ListShiftsResponseUnderscoreLinks>,
15958 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
15959 pub results: Option<Vec<ShiftResponse>>,
15960}
15961
15962impl std::fmt::Display for ListShiftsResponse {
15963 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15964 write!(
15965 f,
15966 "{}",
15967 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15968 )
15969 }
15970}
15971
15972impl tabled::Tabled for ListShiftsResponse {
15973 const LENGTH: usize = 2;
15974 fn fields(&self) -> Vec<String> {
15975 vec![
15976 if let Some(underscore_links) = &self.underscore_links {
15977 format!("{:?}", underscore_links)
15978 } else {
15979 String::new()
15980 },
15981 if let Some(results) = &self.results {
15982 format!("{:?}", results)
15983 } else {
15984 String::new()
15985 },
15986 ]
15987 }
15988
15989 fn headers() -> Vec<String> {
15990 vec!["underscore_links".to_string(), "results".to_string()]
15991 }
15992}
15993
15994#[derive(
15995 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
15996)]
15997pub struct ListTeamShiftsResponseUnderscoreLinks {
15998 #[doc = "Link to resource"]
15999 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
16000 pub self_: Option<String>,
16001}
16002
16003impl std::fmt::Display for ListTeamShiftsResponseUnderscoreLinks {
16004 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16005 write!(
16006 f,
16007 "{}",
16008 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16009 )
16010 }
16011}
16012
16013impl tabled::Tabled for ListTeamShiftsResponseUnderscoreLinks {
16014 const LENGTH: usize = 1;
16015 fn fields(&self) -> Vec<String> {
16016 vec![if let Some(self_) = &self.self_ {
16017 format!("{:?}", self_)
16018 } else {
16019 String::new()
16020 }]
16021 }
16022
16023 fn headers() -> Vec<String> {
16024 vec!["self_".to_string()]
16025 }
16026}
16027
16028#[derive(
16029 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16030)]
16031pub struct ListTeamShiftsResponse {
16032 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
16033 pub underscore_links: Option<ListTeamShiftsResponseUnderscoreLinks>,
16034 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
16035 pub results: Option<Vec<ShiftResponse>>,
16036}
16037
16038impl std::fmt::Display for ListTeamShiftsResponse {
16039 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16040 write!(
16041 f,
16042 "{}",
16043 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16044 )
16045 }
16046}
16047
16048impl tabled::Tabled for ListTeamShiftsResponse {
16049 const LENGTH: usize = 2;
16050 fn fields(&self) -> Vec<String> {
16051 vec![
16052 if let Some(underscore_links) = &self.underscore_links {
16053 format!("{:?}", underscore_links)
16054 } else {
16055 String::new()
16056 },
16057 if let Some(results) = &self.results {
16058 format!("{:?}", results)
16059 } else {
16060 String::new()
16061 },
16062 ]
16063 }
16064
16065 fn headers() -> Vec<String> {
16066 vec!["underscore_links".to_string(), "results".to_string()]
16067 }
16068}
16069
16070#[derive(
16071 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
16072)]
16073pub struct ListTeammateShiftsResponseUnderscoreLinks {
16074 #[doc = "Link to resource"]
16075 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
16076 pub self_: Option<String>,
16077}
16078
16079impl std::fmt::Display for ListTeammateShiftsResponseUnderscoreLinks {
16080 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16081 write!(
16082 f,
16083 "{}",
16084 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16085 )
16086 }
16087}
16088
16089impl tabled::Tabled for ListTeammateShiftsResponseUnderscoreLinks {
16090 const LENGTH: usize = 1;
16091 fn fields(&self) -> Vec<String> {
16092 vec![if let Some(self_) = &self.self_ {
16093 format!("{:?}", self_)
16094 } else {
16095 String::new()
16096 }]
16097 }
16098
16099 fn headers() -> Vec<String> {
16100 vec!["self_".to_string()]
16101 }
16102}
16103
16104#[derive(
16105 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16106)]
16107pub struct ListTeammateShiftsResponse {
16108 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
16109 pub underscore_links: Option<ListTeammateShiftsResponseUnderscoreLinks>,
16110 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
16111 pub results: Option<Vec<ShiftResponse>>,
16112}
16113
16114impl std::fmt::Display for ListTeammateShiftsResponse {
16115 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16116 write!(
16117 f,
16118 "{}",
16119 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16120 )
16121 }
16122}
16123
16124impl tabled::Tabled for ListTeammateShiftsResponse {
16125 const LENGTH: usize = 2;
16126 fn fields(&self) -> Vec<String> {
16127 vec![
16128 if let Some(underscore_links) = &self.underscore_links {
16129 format!("{:?}", underscore_links)
16130 } else {
16131 String::new()
16132 },
16133 if let Some(results) = &self.results {
16134 format!("{:?}", results)
16135 } else {
16136 String::new()
16137 },
16138 ]
16139 }
16140
16141 fn headers() -> Vec<String> {
16142 vec!["underscore_links".to_string(), "results".to_string()]
16143 }
16144}
16145
16146#[derive(
16147 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
16148)]
16149pub struct ListShiftTeammatesResponseUnderscoreLinks {
16150 #[doc = "Link to resource"]
16151 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
16152 pub self_: Option<String>,
16153}
16154
16155impl std::fmt::Display for ListShiftTeammatesResponseUnderscoreLinks {
16156 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16157 write!(
16158 f,
16159 "{}",
16160 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16161 )
16162 }
16163}
16164
16165impl tabled::Tabled for ListShiftTeammatesResponseUnderscoreLinks {
16166 const LENGTH: usize = 1;
16167 fn fields(&self) -> Vec<String> {
16168 vec![if let Some(self_) = &self.self_ {
16169 format!("{:?}", self_)
16170 } else {
16171 String::new()
16172 }]
16173 }
16174
16175 fn headers() -> Vec<String> {
16176 vec!["self_".to_string()]
16177 }
16178}
16179
16180#[derive(
16181 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16182)]
16183pub struct ListShiftTeammatesResponse {
16184 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
16185 pub underscore_links: Option<ListShiftTeammatesResponseUnderscoreLinks>,
16186 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
16187 pub results: Option<Vec<TeammateResponse>>,
16188}
16189
16190impl std::fmt::Display for ListShiftTeammatesResponse {
16191 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16192 write!(
16193 f,
16194 "{}",
16195 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16196 )
16197 }
16198}
16199
16200impl tabled::Tabled for ListShiftTeammatesResponse {
16201 const LENGTH: usize = 2;
16202 fn fields(&self) -> Vec<String> {
16203 vec![
16204 if let Some(underscore_links) = &self.underscore_links {
16205 format!("{:?}", underscore_links)
16206 } else {
16207 String::new()
16208 },
16209 if let Some(results) = &self.results {
16210 format!("{:?}", results)
16211 } else {
16212 String::new()
16213 },
16214 ]
16215 }
16216
16217 fn headers() -> Vec<String> {
16218 vec!["underscore_links".to_string(), "results".to_string()]
16219 }
16220}
16221
16222#[derive(
16223 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
16224)]
16225pub struct ListTeammateSignaturesResponseUnderscoreLinks {
16226 #[doc = "Link to resource"]
16227 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
16228 pub self_: Option<String>,
16229}
16230
16231impl std::fmt::Display for ListTeammateSignaturesResponseUnderscoreLinks {
16232 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16233 write!(
16234 f,
16235 "{}",
16236 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16237 )
16238 }
16239}
16240
16241impl tabled::Tabled for ListTeammateSignaturesResponseUnderscoreLinks {
16242 const LENGTH: usize = 1;
16243 fn fields(&self) -> Vec<String> {
16244 vec![if let Some(self_) = &self.self_ {
16245 format!("{:?}", self_)
16246 } else {
16247 String::new()
16248 }]
16249 }
16250
16251 fn headers() -> Vec<String> {
16252 vec!["self_".to_string()]
16253 }
16254}
16255
16256#[derive(
16257 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16258)]
16259pub struct ListTeammateSignaturesResponse {
16260 #[serde(
16261 rename = "_pagination",
16262 default,
16263 skip_serializing_if = "Option::is_none"
16264 )]
16265 pub pagination: Option<Pagination>,
16266 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
16267 pub underscore_links: Option<ListTeammateSignaturesResponseUnderscoreLinks>,
16268 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
16269 pub results: Option<Vec<SignatureResponse>>,
16270}
16271
16272impl std::fmt::Display for ListTeammateSignaturesResponse {
16273 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16274 write!(
16275 f,
16276 "{}",
16277 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16278 )
16279 }
16280}
16281
16282impl tabled::Tabled for ListTeammateSignaturesResponse {
16283 const LENGTH: usize = 3;
16284 fn fields(&self) -> Vec<String> {
16285 vec![
16286 if let Some(pagination) = &self.pagination {
16287 format!("{:?}", pagination)
16288 } else {
16289 String::new()
16290 },
16291 if let Some(underscore_links) = &self.underscore_links {
16292 format!("{:?}", underscore_links)
16293 } else {
16294 String::new()
16295 },
16296 if let Some(results) = &self.results {
16297 format!("{:?}", results)
16298 } else {
16299 String::new()
16300 },
16301 ]
16302 }
16303
16304 fn headers() -> Vec<String> {
16305 vec![
16306 "pagination".to_string(),
16307 "underscore_links".to_string(),
16308 "results".to_string(),
16309 ]
16310 }
16311}
16312
16313#[derive(
16314 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
16315)]
16316pub struct ListTeamSignaturesResponseUnderscoreLinks {
16317 #[doc = "Link to resource"]
16318 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
16319 pub self_: Option<String>,
16320}
16321
16322impl std::fmt::Display for ListTeamSignaturesResponseUnderscoreLinks {
16323 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16324 write!(
16325 f,
16326 "{}",
16327 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16328 )
16329 }
16330}
16331
16332impl tabled::Tabled for ListTeamSignaturesResponseUnderscoreLinks {
16333 const LENGTH: usize = 1;
16334 fn fields(&self) -> Vec<String> {
16335 vec![if let Some(self_) = &self.self_ {
16336 format!("{:?}", self_)
16337 } else {
16338 String::new()
16339 }]
16340 }
16341
16342 fn headers() -> Vec<String> {
16343 vec!["self_".to_string()]
16344 }
16345}
16346
16347#[derive(
16348 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16349)]
16350pub struct ListTeamSignaturesResponse {
16351 #[serde(
16352 rename = "_pagination",
16353 default,
16354 skip_serializing_if = "Option::is_none"
16355 )]
16356 pub pagination: Option<Pagination>,
16357 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
16358 pub underscore_links: Option<ListTeamSignaturesResponseUnderscoreLinks>,
16359 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
16360 pub results: Option<Vec<SignatureResponse>>,
16361}
16362
16363impl std::fmt::Display for ListTeamSignaturesResponse {
16364 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16365 write!(
16366 f,
16367 "{}",
16368 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16369 )
16370 }
16371}
16372
16373impl tabled::Tabled for ListTeamSignaturesResponse {
16374 const LENGTH: usize = 3;
16375 fn fields(&self) -> Vec<String> {
16376 vec![
16377 if let Some(pagination) = &self.pagination {
16378 format!("{:?}", pagination)
16379 } else {
16380 String::new()
16381 },
16382 if let Some(underscore_links) = &self.underscore_links {
16383 format!("{:?}", underscore_links)
16384 } else {
16385 String::new()
16386 },
16387 if let Some(results) = &self.results {
16388 format!("{:?}", results)
16389 } else {
16390 String::new()
16391 },
16392 ]
16393 }
16394
16395 fn headers() -> Vec<String> {
16396 vec![
16397 "pagination".to_string(),
16398 "underscore_links".to_string(),
16399 "results".to_string(),
16400 ]
16401 }
16402}
16403
16404#[derive(
16405 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
16406)]
16407pub struct ListTagsResponseUnderscoreLinks {
16408 #[doc = "Link to resource"]
16409 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
16410 pub self_: Option<String>,
16411}
16412
16413impl std::fmt::Display for ListTagsResponseUnderscoreLinks {
16414 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16415 write!(
16416 f,
16417 "{}",
16418 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16419 )
16420 }
16421}
16422
16423impl tabled::Tabled for ListTagsResponseUnderscoreLinks {
16424 const LENGTH: usize = 1;
16425 fn fields(&self) -> Vec<String> {
16426 vec![if let Some(self_) = &self.self_ {
16427 format!("{:?}", self_)
16428 } else {
16429 String::new()
16430 }]
16431 }
16432
16433 fn headers() -> Vec<String> {
16434 vec!["self_".to_string()]
16435 }
16436}
16437
16438#[derive(
16439 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16440)]
16441pub struct ListTagsResponse {
16442 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
16443 pub underscore_links: Option<ListTagsResponseUnderscoreLinks>,
16444 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
16445 pub results: Option<Vec<TagResponse>>,
16446}
16447
16448impl std::fmt::Display for ListTagsResponse {
16449 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16450 write!(
16451 f,
16452 "{}",
16453 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16454 )
16455 }
16456}
16457
16458impl tabled::Tabled for ListTagsResponse {
16459 const LENGTH: usize = 2;
16460 fn fields(&self) -> Vec<String> {
16461 vec![
16462 if let Some(underscore_links) = &self.underscore_links {
16463 format!("{:?}", underscore_links)
16464 } else {
16465 String::new()
16466 },
16467 if let Some(results) = &self.results {
16468 format!("{:?}", results)
16469 } else {
16470 String::new()
16471 },
16472 ]
16473 }
16474
16475 fn headers() -> Vec<String> {
16476 vec!["underscore_links".to_string(), "results".to_string()]
16477 }
16478}
16479
16480#[derive(
16481 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
16482)]
16483pub struct ListTeamTagsResponseUnderscoreLinks {
16484 #[doc = "Link to resource"]
16485 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
16486 pub self_: Option<String>,
16487}
16488
16489impl std::fmt::Display for ListTeamTagsResponseUnderscoreLinks {
16490 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16491 write!(
16492 f,
16493 "{}",
16494 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16495 )
16496 }
16497}
16498
16499impl tabled::Tabled for ListTeamTagsResponseUnderscoreLinks {
16500 const LENGTH: usize = 1;
16501 fn fields(&self) -> Vec<String> {
16502 vec![if let Some(self_) = &self.self_ {
16503 format!("{:?}", self_)
16504 } else {
16505 String::new()
16506 }]
16507 }
16508
16509 fn headers() -> Vec<String> {
16510 vec!["self_".to_string()]
16511 }
16512}
16513
16514#[derive(
16515 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16516)]
16517pub struct ListTeamTagsResponse {
16518 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
16519 pub underscore_links: Option<ListTeamTagsResponseUnderscoreLinks>,
16520 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
16521 pub results: Option<Vec<TagResponse>>,
16522}
16523
16524impl std::fmt::Display for ListTeamTagsResponse {
16525 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16526 write!(
16527 f,
16528 "{}",
16529 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16530 )
16531 }
16532}
16533
16534impl tabled::Tabled for ListTeamTagsResponse {
16535 const LENGTH: usize = 2;
16536 fn fields(&self) -> Vec<String> {
16537 vec![
16538 if let Some(underscore_links) = &self.underscore_links {
16539 format!("{:?}", underscore_links)
16540 } else {
16541 String::new()
16542 },
16543 if let Some(results) = &self.results {
16544 format!("{:?}", results)
16545 } else {
16546 String::new()
16547 },
16548 ]
16549 }
16550
16551 fn headers() -> Vec<String> {
16552 vec!["underscore_links".to_string(), "results".to_string()]
16553 }
16554}
16555
16556#[derive(
16557 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
16558)]
16559pub struct ListTeammateTagsResponseUnderscoreLinks {
16560 #[doc = "Link to resource"]
16561 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
16562 pub self_: Option<String>,
16563}
16564
16565impl std::fmt::Display for ListTeammateTagsResponseUnderscoreLinks {
16566 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16567 write!(
16568 f,
16569 "{}",
16570 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16571 )
16572 }
16573}
16574
16575impl tabled::Tabled for ListTeammateTagsResponseUnderscoreLinks {
16576 const LENGTH: usize = 1;
16577 fn fields(&self) -> Vec<String> {
16578 vec![if let Some(self_) = &self.self_ {
16579 format!("{:?}", self_)
16580 } else {
16581 String::new()
16582 }]
16583 }
16584
16585 fn headers() -> Vec<String> {
16586 vec!["self_".to_string()]
16587 }
16588}
16589
16590#[derive(
16591 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16592)]
16593pub struct ListTeammateTagsResponse {
16594 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
16595 pub underscore_links: Option<ListTeammateTagsResponseUnderscoreLinks>,
16596 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
16597 pub results: Option<Vec<TagResponse>>,
16598}
16599
16600impl std::fmt::Display for ListTeammateTagsResponse {
16601 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16602 write!(
16603 f,
16604 "{}",
16605 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16606 )
16607 }
16608}
16609
16610impl tabled::Tabled for ListTeammateTagsResponse {
16611 const LENGTH: usize = 2;
16612 fn fields(&self) -> Vec<String> {
16613 vec![
16614 if let Some(underscore_links) = &self.underscore_links {
16615 format!("{:?}", underscore_links)
16616 } else {
16617 String::new()
16618 },
16619 if let Some(results) = &self.results {
16620 format!("{:?}", results)
16621 } else {
16622 String::new()
16623 },
16624 ]
16625 }
16626
16627 fn headers() -> Vec<String> {
16628 vec!["underscore_links".to_string(), "results".to_string()]
16629 }
16630}
16631
16632#[derive(
16633 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
16634)]
16635pub struct ListTagChildrenResponseUnderscoreLinks {
16636 #[doc = "Link to resource"]
16637 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
16638 pub self_: Option<String>,
16639}
16640
16641impl std::fmt::Display for ListTagChildrenResponseUnderscoreLinks {
16642 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16643 write!(
16644 f,
16645 "{}",
16646 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16647 )
16648 }
16649}
16650
16651impl tabled::Tabled for ListTagChildrenResponseUnderscoreLinks {
16652 const LENGTH: usize = 1;
16653 fn fields(&self) -> Vec<String> {
16654 vec![if let Some(self_) = &self.self_ {
16655 format!("{:?}", self_)
16656 } else {
16657 String::new()
16658 }]
16659 }
16660
16661 fn headers() -> Vec<String> {
16662 vec!["self_".to_string()]
16663 }
16664}
16665
16666#[derive(
16667 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16668)]
16669pub struct ListTagChildrenResponse {
16670 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
16671 pub underscore_links: Option<ListTagChildrenResponseUnderscoreLinks>,
16672 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
16673 pub results: Option<Vec<TagResponse>>,
16674}
16675
16676impl std::fmt::Display for ListTagChildrenResponse {
16677 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16678 write!(
16679 f,
16680 "{}",
16681 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16682 )
16683 }
16684}
16685
16686impl tabled::Tabled for ListTagChildrenResponse {
16687 const LENGTH: usize = 2;
16688 fn fields(&self) -> Vec<String> {
16689 vec![
16690 if let Some(underscore_links) = &self.underscore_links {
16691 format!("{:?}", underscore_links)
16692 } else {
16693 String::new()
16694 },
16695 if let Some(results) = &self.results {
16696 format!("{:?}", results)
16697 } else {
16698 String::new()
16699 },
16700 ]
16701 }
16702
16703 fn headers() -> Vec<String> {
16704 vec!["underscore_links".to_string(), "results".to_string()]
16705 }
16706}
16707
16708#[derive(
16709 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
16710)]
16711pub struct ListTaggedConversationsResponseUnderscoreLinks {
16712 #[doc = "Link to resource"]
16713 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
16714 pub self_: Option<String>,
16715}
16716
16717impl std::fmt::Display for ListTaggedConversationsResponseUnderscoreLinks {
16718 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16719 write!(
16720 f,
16721 "{}",
16722 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16723 )
16724 }
16725}
16726
16727impl tabled::Tabled for ListTaggedConversationsResponseUnderscoreLinks {
16728 const LENGTH: usize = 1;
16729 fn fields(&self) -> Vec<String> {
16730 vec![if let Some(self_) = &self.self_ {
16731 format!("{:?}", self_)
16732 } else {
16733 String::new()
16734 }]
16735 }
16736
16737 fn headers() -> Vec<String> {
16738 vec!["self_".to_string()]
16739 }
16740}
16741
16742#[derive(
16743 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16744)]
16745pub struct ListTaggedConversationsResponse {
16746 #[serde(
16747 rename = "_pagination",
16748 default,
16749 skip_serializing_if = "Option::is_none"
16750 )]
16751 pub pagination: Option<Pagination>,
16752 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
16753 pub underscore_links: Option<ListTaggedConversationsResponseUnderscoreLinks>,
16754 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
16755 pub results: Option<Vec<ConversationResponse>>,
16756}
16757
16758impl std::fmt::Display for ListTaggedConversationsResponse {
16759 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16760 write!(
16761 f,
16762 "{}",
16763 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16764 )
16765 }
16766}
16767
16768impl tabled::Tabled for ListTaggedConversationsResponse {
16769 const LENGTH: usize = 3;
16770 fn fields(&self) -> Vec<String> {
16771 vec![
16772 if let Some(pagination) = &self.pagination {
16773 format!("{:?}", pagination)
16774 } else {
16775 String::new()
16776 },
16777 if let Some(underscore_links) = &self.underscore_links {
16778 format!("{:?}", underscore_links)
16779 } else {
16780 String::new()
16781 },
16782 if let Some(results) = &self.results {
16783 format!("{:?}", results)
16784 } else {
16785 String::new()
16786 },
16787 ]
16788 }
16789
16790 fn headers() -> Vec<String> {
16791 vec![
16792 "pagination".to_string(),
16793 "underscore_links".to_string(),
16794 "results".to_string(),
16795 ]
16796 }
16797}
16798
16799#[derive(
16800 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
16801)]
16802pub struct ListTeamsResponseUnderscoreLinks {
16803 #[doc = "Link to resource"]
16804 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
16805 pub self_: Option<String>,
16806}
16807
16808impl std::fmt::Display for ListTeamsResponseUnderscoreLinks {
16809 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16810 write!(
16811 f,
16812 "{}",
16813 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16814 )
16815 }
16816}
16817
16818impl tabled::Tabled for ListTeamsResponseUnderscoreLinks {
16819 const LENGTH: usize = 1;
16820 fn fields(&self) -> Vec<String> {
16821 vec![if let Some(self_) = &self.self_ {
16822 format!("{:?}", self_)
16823 } else {
16824 String::new()
16825 }]
16826 }
16827
16828 fn headers() -> Vec<String> {
16829 vec!["self_".to_string()]
16830 }
16831}
16832
16833#[derive(
16834 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16835)]
16836pub struct ListTeamsResponse {
16837 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
16838 pub underscore_links: Option<ListTeamsResponseUnderscoreLinks>,
16839 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
16840 pub results: Option<Vec<TeamResponse>>,
16841}
16842
16843impl std::fmt::Display for ListTeamsResponse {
16844 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16845 write!(
16846 f,
16847 "{}",
16848 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16849 )
16850 }
16851}
16852
16853impl tabled::Tabled for ListTeamsResponse {
16854 const LENGTH: usize = 2;
16855 fn fields(&self) -> Vec<String> {
16856 vec![
16857 if let Some(underscore_links) = &self.underscore_links {
16858 format!("{:?}", underscore_links)
16859 } else {
16860 String::new()
16861 },
16862 if let Some(results) = &self.results {
16863 format!("{:?}", results)
16864 } else {
16865 String::new()
16866 },
16867 ]
16868 }
16869
16870 fn headers() -> Vec<String> {
16871 vec!["underscore_links".to_string(), "results".to_string()]
16872 }
16873}
16874
16875#[derive(
16876 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
16877)]
16878pub struct ListTeammatesResponseUnderscoreLinks {
16879 #[doc = "Link to resource"]
16880 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
16881 pub self_: Option<String>,
16882}
16883
16884impl std::fmt::Display for ListTeammatesResponseUnderscoreLinks {
16885 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16886 write!(
16887 f,
16888 "{}",
16889 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16890 )
16891 }
16892}
16893
16894impl tabled::Tabled for ListTeammatesResponseUnderscoreLinks {
16895 const LENGTH: usize = 1;
16896 fn fields(&self) -> Vec<String> {
16897 vec![if let Some(self_) = &self.self_ {
16898 format!("{:?}", self_)
16899 } else {
16900 String::new()
16901 }]
16902 }
16903
16904 fn headers() -> Vec<String> {
16905 vec!["self_".to_string()]
16906 }
16907}
16908
16909#[derive(
16910 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16911)]
16912pub struct ListTeammatesResponse {
16913 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
16914 pub underscore_links: Option<ListTeammatesResponseUnderscoreLinks>,
16915 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
16916 pub results: Option<Vec<TeammateResponse>>,
16917}
16918
16919impl std::fmt::Display for ListTeammatesResponse {
16920 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16921 write!(
16922 f,
16923 "{}",
16924 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16925 )
16926 }
16927}
16928
16929impl tabled::Tabled for ListTeammatesResponse {
16930 const LENGTH: usize = 2;
16931 fn fields(&self) -> Vec<String> {
16932 vec![
16933 if let Some(underscore_links) = &self.underscore_links {
16934 format!("{:?}", underscore_links)
16935 } else {
16936 String::new()
16937 },
16938 if let Some(results) = &self.results {
16939 format!("{:?}", results)
16940 } else {
16941 String::new()
16942 },
16943 ]
16944 }
16945
16946 fn headers() -> Vec<String> {
16947 vec!["underscore_links".to_string(), "results".to_string()]
16948 }
16949}
16950
16951#[derive(
16952 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
16953)]
16954pub struct ListAssignedConversationsResponseUnderscoreLinks {
16955 #[doc = "Link to resource"]
16956 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
16957 pub self_: Option<String>,
16958}
16959
16960impl std::fmt::Display for ListAssignedConversationsResponseUnderscoreLinks {
16961 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16962 write!(
16963 f,
16964 "{}",
16965 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16966 )
16967 }
16968}
16969
16970impl tabled::Tabled for ListAssignedConversationsResponseUnderscoreLinks {
16971 const LENGTH: usize = 1;
16972 fn fields(&self) -> Vec<String> {
16973 vec![if let Some(self_) = &self.self_ {
16974 format!("{:?}", self_)
16975 } else {
16976 String::new()
16977 }]
16978 }
16979
16980 fn headers() -> Vec<String> {
16981 vec!["self_".to_string()]
16982 }
16983}
16984
16985#[derive(
16986 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16987)]
16988pub struct ListAssignedConversationsResponse {
16989 #[serde(
16990 rename = "_pagination",
16991 default,
16992 skip_serializing_if = "Option::is_none"
16993 )]
16994 pub pagination: Option<Pagination>,
16995 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
16996 pub underscore_links: Option<ListAssignedConversationsResponseUnderscoreLinks>,
16997 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
16998 pub results: Option<Vec<ConversationResponse>>,
16999}
17000
17001impl std::fmt::Display for ListAssignedConversationsResponse {
17002 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
17003 write!(
17004 f,
17005 "{}",
17006 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
17007 )
17008 }
17009}
17010
17011impl tabled::Tabled for ListAssignedConversationsResponse {
17012 const LENGTH: usize = 3;
17013 fn fields(&self) -> Vec<String> {
17014 vec![
17015 if let Some(pagination) = &self.pagination {
17016 format!("{:?}", pagination)
17017 } else {
17018 String::new()
17019 },
17020 if let Some(underscore_links) = &self.underscore_links {
17021 format!("{:?}", underscore_links)
17022 } else {
17023 String::new()
17024 },
17025 if let Some(results) = &self.results {
17026 format!("{:?}", results)
17027 } else {
17028 String::new()
17029 },
17030 ]
17031 }
17032
17033 fn headers() -> Vec<String> {
17034 vec![
17035 "pagination".to_string(),
17036 "underscore_links".to_string(),
17037 "results".to_string(),
17038 ]
17039 }
17040}
17041
17042#[derive(
17043 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
17044)]
17045pub struct ListTeammateInboxesResponseUnderscoreLinks {
17046 #[doc = "Link to resource"]
17047 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
17048 pub self_: Option<String>,
17049}
17050
17051impl std::fmt::Display for ListTeammateInboxesResponseUnderscoreLinks {
17052 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
17053 write!(
17054 f,
17055 "{}",
17056 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
17057 )
17058 }
17059}
17060
17061impl tabled::Tabled for ListTeammateInboxesResponseUnderscoreLinks {
17062 const LENGTH: usize = 1;
17063 fn fields(&self) -> Vec<String> {
17064 vec![if let Some(self_) = &self.self_ {
17065 format!("{:?}", self_)
17066 } else {
17067 String::new()
17068 }]
17069 }
17070
17071 fn headers() -> Vec<String> {
17072 vec!["self_".to_string()]
17073 }
17074}
17075
17076#[derive(
17077 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
17078)]
17079pub struct ListTeammateInboxesResponse {
17080 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
17081 pub underscore_links: Option<ListTeammateInboxesResponseUnderscoreLinks>,
17082 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
17083 pub results: Option<Vec<InboxResponse>>,
17084}
17085
17086impl std::fmt::Display for ListTeammateInboxesResponse {
17087 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
17088 write!(
17089 f,
17090 "{}",
17091 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
17092 )
17093 }
17094}
17095
17096impl tabled::Tabled for ListTeammateInboxesResponse {
17097 const LENGTH: usize = 2;
17098 fn fields(&self) -> Vec<String> {
17099 vec![
17100 if let Some(underscore_links) = &self.underscore_links {
17101 format!("{:?}", underscore_links)
17102 } else {
17103 String::new()
17104 },
17105 if let Some(results) = &self.results {
17106 format!("{:?}", results)
17107 } else {
17108 String::new()
17109 },
17110 ]
17111 }
17112
17113 fn headers() -> Vec<String> {
17114 vec!["underscore_links".to_string(), "results".to_string()]
17115 }
17116}
17117
17118#[derive(
17119 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
17120)]
17121pub struct ListLinkConversationsResponseUnderscoreLinks {
17122 #[doc = "Link to resource"]
17123 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
17124 pub self_: Option<String>,
17125}
17126
17127impl std::fmt::Display for ListLinkConversationsResponseUnderscoreLinks {
17128 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
17129 write!(
17130 f,
17131 "{}",
17132 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
17133 )
17134 }
17135}
17136
17137impl tabled::Tabled for ListLinkConversationsResponseUnderscoreLinks {
17138 const LENGTH: usize = 1;
17139 fn fields(&self) -> Vec<String> {
17140 vec![if let Some(self_) = &self.self_ {
17141 format!("{:?}", self_)
17142 } else {
17143 String::new()
17144 }]
17145 }
17146
17147 fn headers() -> Vec<String> {
17148 vec!["self_".to_string()]
17149 }
17150}
17151
17152#[derive(
17153 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
17154)]
17155pub struct ListLinkConversationsResponse {
17156 #[serde(
17157 rename = "_pagination",
17158 default,
17159 skip_serializing_if = "Option::is_none"
17160 )]
17161 pub pagination: Option<Pagination>,
17162 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
17163 pub underscore_links: Option<ListLinkConversationsResponseUnderscoreLinks>,
17164 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
17165 pub results: Option<Vec<ConversationResponse>>,
17166}
17167
17168impl std::fmt::Display for ListLinkConversationsResponse {
17169 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
17170 write!(
17171 f,
17172 "{}",
17173 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
17174 )
17175 }
17176}
17177
17178impl tabled::Tabled for ListLinkConversationsResponse {
17179 const LENGTH: usize = 3;
17180 fn fields(&self) -> Vec<String> {
17181 vec![
17182 if let Some(pagination) = &self.pagination {
17183 format!("{:?}", pagination)
17184 } else {
17185 String::new()
17186 },
17187 if let Some(underscore_links) = &self.underscore_links {
17188 format!("{:?}", underscore_links)
17189 } else {
17190 String::new()
17191 },
17192 if let Some(results) = &self.results {
17193 format!("{:?}", results)
17194 } else {
17195 String::new()
17196 },
17197 ]
17198 }
17199
17200 fn headers() -> Vec<String> {
17201 vec![
17202 "pagination".to_string(),
17203 "underscore_links".to_string(),
17204 "results".to_string(),
17205 ]
17206 }
17207}
17208
17209#[derive(
17210 serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema,
17211)]
17212pub struct ListLinksResponseUnderscoreLinks {
17213 #[doc = "Link to resource"]
17214 #[serde(rename = "self", default, skip_serializing_if = "Option::is_none")]
17215 pub self_: Option<String>,
17216}
17217
17218impl std::fmt::Display for ListLinksResponseUnderscoreLinks {
17219 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
17220 write!(
17221 f,
17222 "{}",
17223 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
17224 )
17225 }
17226}
17227
17228impl tabled::Tabled for ListLinksResponseUnderscoreLinks {
17229 const LENGTH: usize = 1;
17230 fn fields(&self) -> Vec<String> {
17231 vec![if let Some(self_) = &self.self_ {
17232 format!("{:?}", self_)
17233 } else {
17234 String::new()
17235 }]
17236 }
17237
17238 fn headers() -> Vec<String> {
17239 vec!["self_".to_string()]
17240 }
17241}
17242
17243#[derive(
17244 serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
17245)]
17246pub struct ListLinksResponse {
17247 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
17248 pub underscore_links: Option<ListLinksResponseUnderscoreLinks>,
17249 #[serde(rename = "_results", default, skip_serializing_if = "Option::is_none")]
17250 pub results: Option<Vec<LinkResponse>>,
17251}
17252
17253impl std::fmt::Display for ListLinksResponse {
17254 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
17255 write!(
17256 f,
17257 "{}",
17258 serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
17259 )
17260 }
17261}
17262
17263impl tabled::Tabled for ListLinksResponse {
17264 const LENGTH: usize = 2;
17265 fn fields(&self) -> Vec<String> {
17266 vec![
17267 if let Some(underscore_links) = &self.underscore_links {
17268 format!("{:?}", underscore_links)
17269 } else {
17270 String::new()
17271 },
17272 if let Some(results) = &self.results {
17273 format!("{:?}", results)
17274 } else {
17275 String::new()
17276 },
17277 ]
17278 }
17279
17280 fn headers() -> Vec<String> {
17281 vec!["underscore_links".to_string(), "results".to_string()]
17282 }
17283}