rippling_api/
types.rs

1#![doc = r" This module contains the generated types for the library."]
2#[cfg(feature = "tabled")]
3use tabled::Tabled;
4pub mod base64 {
5    #![doc = " Base64 data that encodes to url safe base64, but can decode from multiple"]
6    #![doc = " base64 implementations to account for various clients and libraries. Compatible"]
7    #![doc = " with serde and JsonSchema."]
8    use std::{convert::TryFrom, fmt};
9
10    use serde::{
11        de::{Error, Unexpected, Visitor},
12        Deserialize, Deserializer, Serialize, Serializer,
13    };
14    static ALLOWED_DECODING_FORMATS: &[data_encoding::Encoding] = &[
15        data_encoding::BASE64,
16        data_encoding::BASE64URL,
17        data_encoding::BASE64URL_NOPAD,
18        data_encoding::BASE64_MIME,
19        data_encoding::BASE64_NOPAD,
20    ];
21    #[derive(Debug, Clone, PartialEq, Eq)]
22    #[doc = " A container for binary that should be base64 encoded in serialisation. In reverse"]
23    #[doc = " when deserializing, will decode from many different types of base64 possible."]
24    pub struct Base64Data(pub Vec<u8>);
25    impl Base64Data {
26        #[doc = " Return is the data is empty."]
27        pub fn is_empty(&self) -> bool {
28            self.0.is_empty()
29        }
30    }
31
32    impl fmt::Display for Base64Data {
33        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
34            write!(f, "{}", data_encoding::BASE64URL_NOPAD.encode(&self.0))
35        }
36    }
37
38    impl From<Base64Data> for Vec<u8> {
39        fn from(data: Base64Data) -> Vec<u8> {
40            data.0
41        }
42    }
43
44    impl From<Vec<u8>> for Base64Data {
45        fn from(data: Vec<u8>) -> Base64Data {
46            Base64Data(data)
47        }
48    }
49
50    impl AsRef<[u8]> for Base64Data {
51        fn as_ref(&self) -> &[u8] {
52            &self.0
53        }
54    }
55
56    impl TryFrom<&str> for Base64Data {
57        type Error = anyhow::Error;
58        fn try_from(v: &str) -> Result<Self, Self::Error> {
59            for config in ALLOWED_DECODING_FORMATS {
60                if let Ok(data) = config.decode(v.as_bytes()) {
61                    return Ok(Base64Data(data));
62                }
63            }
64            anyhow::bail!("Could not decode base64 data: {}", v);
65        }
66    }
67
68    struct Base64DataVisitor;
69    impl Visitor<'_> for Base64DataVisitor {
70        type Value = Base64Data;
71        fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
72            write!(formatter, "a base64 encoded string")
73        }
74
75        fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
76        where
77            E: Error,
78        {
79            for config in ALLOWED_DECODING_FORMATS {
80                if let Ok(data) = config.decode(v.as_bytes()) {
81                    return Ok(Base64Data(data));
82                }
83            }
84            Err(serde::de::Error::invalid_value(Unexpected::Str(v), &self))
85        }
86    }
87
88    impl<'de> Deserialize<'de> for Base64Data {
89        fn deserialize<D>(deserializer: D) -> Result<Self, <D as Deserializer<'de>>::Error>
90        where
91            D: Deserializer<'de>,
92        {
93            deserializer.deserialize_str(Base64DataVisitor)
94        }
95    }
96
97    impl Serialize for Base64Data {
98        fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
99        where
100            S: Serializer,
101        {
102            let encoded = data_encoding::BASE64URL_NOPAD.encode(&self.0);
103            serializer.serialize_str(&encoded)
104        }
105    }
106
107    impl schemars::JsonSchema for Base64Data {
108        fn schema_name() -> String {
109            "Base64Data".to_string()
110        }
111
112        fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
113            let mut obj = gen.root_schema_for::<String>().schema;
114            obj.format = Some("byte".to_string());
115            schemars::schema::Schema::Object(obj)
116        }
117
118        fn is_referenceable() -> bool {
119            false
120        }
121    }
122
123    #[cfg(test)]
124    mod tests {
125        use std::convert::TryFrom;
126
127        use super::Base64Data;
128        #[test]
129        fn test_base64_try_from() {
130            assert!(Base64Data::try_from("aGVsbG8=").is_ok());
131            assert!(Base64Data::try_from("abcdefghij").is_err());
132        }
133    }
134}
135
136#[cfg(feature = "requests")]
137pub mod multipart {
138    #![doc = " Multipart form data types."]
139    use std::path::PathBuf;
140    #[doc = " An attachement to a multipart form."]
141    #[derive(Debug, Clone, PartialEq, Eq, Hash)]
142    pub struct Attachment {
143        #[doc = " The name of the field."]
144        pub name: String,
145        #[doc = " The file path of the attachment."]
146        pub filepath: Option<PathBuf>,
147        #[doc = " The content type of the attachment."]
148        pub content_type: Option<String>,
149        #[doc = " The data of the attachment."]
150        pub data: Vec<u8>,
151    }
152
153    impl std::convert::TryFrom<Attachment> for reqwest::multipart::Part {
154        type Error = reqwest::Error;
155        fn try_from(attachment: Attachment) -> Result<Self, Self::Error> {
156            let mut part = reqwest::multipart::Part::bytes(attachment.data);
157            if let Some(filepath) = attachment.filepath {
158                part = part.file_name(filepath.to_string_lossy().to_string());
159            }
160            if let Some(content_type) = attachment.content_type {
161                part = part.mime_str(&content_type)?;
162            }
163            Ok(part)
164        }
165    }
166
167    impl std::convert::TryFrom<std::path::PathBuf> for Attachment {
168        type Error = std::io::Error;
169        fn try_from(path: std::path::PathBuf) -> Result<Self, Self::Error> {
170            let content_type = mime_guess::from_path(&path).first_raw();
171            let data = std::fs::read(&path)?;
172            Ok(Attachment {
173                name: "file".to_string(),
174                filepath: Some(path),
175                content_type: content_type.map(|s| s.to_string()),
176                data,
177            })
178        }
179    }
180}
181
182#[cfg(feature = "requests")]
183pub mod paginate {
184    #![doc = " Utility functions used for pagination."]
185    use anyhow::Result;
186    #[doc = " A trait for types that allow pagination."]
187    pub trait Pagination {
188        #[doc = " The item that is paginated."]
189        type Item: serde::de::DeserializeOwned;
190        #[doc = " Returns true if the response has more pages."]
191        fn has_more_pages(&self) -> bool;
192        #[doc = " Returns the next page token."]
193        fn next_page_token(&self) -> Option<String>;
194        #[doc = " Modify a request to get the next page."]
195        fn next_page(
196            &self,
197            req: reqwest::Request,
198        ) -> Result<reqwest::Request, crate::types::error::Error>;
199        #[doc = " Get the items from a page."]
200        fn items(&self) -> Vec<Self::Item>;
201    }
202}
203
204pub mod phone_number {
205    #![doc = " A library to implement phone numbers for our database and JSON serialization and \
206              deserialization."]
207    use std::str::FromStr;
208
209    use schemars::JsonSchema;
210    #[doc = " A phone number."]
211    #[derive(Debug, Default, Clone, PartialEq, Hash, Eq)]
212    pub struct PhoneNumber(pub Option<phonenumber::PhoneNumber>);
213    impl From<phonenumber::PhoneNumber> for PhoneNumber {
214        fn from(id: phonenumber::PhoneNumber) -> PhoneNumber {
215            PhoneNumber(Some(id))
216        }
217    }
218
219    impl AsRef<Option<phonenumber::PhoneNumber>> for PhoneNumber {
220        fn as_ref(&self) -> &Option<phonenumber::PhoneNumber> {
221            &self.0
222        }
223    }
224
225    impl std::ops::Deref for PhoneNumber {
226        type Target = Option<phonenumber::PhoneNumber>;
227        fn deref(&self) -> &Self::Target {
228            &self.0
229        }
230    }
231
232    impl serde::ser::Serialize for PhoneNumber {
233        fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
234        where
235            S: serde::ser::Serializer,
236        {
237            serializer.serialize_str(&self.to_string())
238        }
239    }
240
241    impl<'de> serde::de::Deserialize<'de> for PhoneNumber {
242        fn deserialize<D>(deserializer: D) -> Result<PhoneNumber, D::Error>
243        where
244            D: serde::de::Deserializer<'de>,
245        {
246            let s = String::deserialize(deserializer).unwrap_or_default();
247            PhoneNumber::from_str(&s).map_err(serde::de::Error::custom)
248        }
249    }
250
251    impl std::str::FromStr for PhoneNumber {
252        type Err = anyhow::Error;
253        fn from_str(s: &str) -> Result<Self, Self::Err> {
254            if s.trim().is_empty() {
255                return Ok(PhoneNumber(None));
256            }
257            let s = if !s.trim().starts_with('+') {
258                format!("+1{s}")
259            } else {
260                s.to_string()
261            }
262            .replace(['-', '(', ')', ' '], "");
263            Ok(PhoneNumber(Some(phonenumber::parse(None, &s).map_err(
264                |e| anyhow::anyhow!("invalid phone number `{}`: {}", s, e),
265            )?)))
266        }
267    }
268
269    impl std::fmt::Display for PhoneNumber {
270        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
271            let s = if let Some(phone) = &self.0 {
272                phone
273                    .format()
274                    .mode(phonenumber::Mode::International)
275                    .to_string()
276            } else {
277                String::new()
278            };
279            write!(f, "{}", s)
280        }
281    }
282
283    impl JsonSchema for PhoneNumber {
284        fn schema_name() -> String {
285            "PhoneNumber".to_string()
286        }
287
288        fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
289            let mut obj = gen.root_schema_for::<String>().schema;
290            obj.format = Some("phone".to_string());
291            schemars::schema::Schema::Object(obj)
292        }
293
294        fn is_referenceable() -> bool {
295            false
296        }
297    }
298
299    #[cfg(test)]
300    mod test {
301        use pretty_assertions::assert_eq;
302
303        use super::PhoneNumber;
304        #[test]
305        fn test_parse_phone_number() {
306            let mut phone = "+1-555-555-5555";
307            let mut phone_parsed: PhoneNumber =
308                serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
309            let mut expected = PhoneNumber(Some(phonenumber::parse(None, phone).unwrap()));
310            assert_eq!(phone_parsed, expected);
311            let mut expected_str = "+1 555-555-5555";
312            assert_eq!(expected_str, serde_json::json!(phone_parsed));
313            phone = "555-555-5555";
314            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
315            assert_eq!(phone_parsed, expected);
316            assert_eq!(expected_str, serde_json::json!(phone_parsed));
317            phone = "+1 555-555-5555";
318            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
319            assert_eq!(phone_parsed, expected);
320            assert_eq!(expected_str, serde_json::json!(phone_parsed));
321            phone = "5555555555";
322            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
323            assert_eq!(phone_parsed, expected);
324            assert_eq!(expected_str, serde_json::json!(phone_parsed));
325            phone = "(510) 864-1234";
326            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
327            expected = PhoneNumber(Some(phonenumber::parse(None, "+15108641234").unwrap()));
328            assert_eq!(phone_parsed, expected);
329            expected_str = "+1 510-864-1234";
330            assert_eq!(expected_str, serde_json::json!(phone_parsed));
331            phone = "(510)8641234";
332            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
333            assert_eq!(phone_parsed, expected);
334            expected_str = "+1 510-864-1234";
335            assert_eq!(expected_str, serde_json::json!(phone_parsed));
336            phone = "";
337            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
338            assert_eq!(phone_parsed, PhoneNumber(None));
339            assert_eq!("", serde_json::json!(phone_parsed));
340            phone = "+49 30  1234 1234";
341            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
342            expected = PhoneNumber(Some(phonenumber::parse(None, phone).unwrap()));
343            assert_eq!(phone_parsed, expected);
344            expected_str = "+49 30 12341234";
345            assert_eq!(expected_str, serde_json::json!(phone_parsed));
346        }
347    }
348}
349
350#[cfg(feature = "requests")]
351pub mod error {
352    #![doc = " Error methods."]
353    #[doc = " Error produced by generated client methods."]
354    pub enum Error {
355        #[doc = " The request did not conform to API requirements."]
356        InvalidRequest(String),
357        #[cfg(feature = "retry")]
358        #[doc = " A server error either due to the data, or with the connection."]
359        CommunicationError(reqwest_middleware::Error),
360        #[doc = " A request error, caused when building the request."]
361        RequestError(reqwest::Error),
362        #[doc = " An expected response whose deserialization failed."]
363        SerdeError {
364            #[doc = " The error."]
365            error: format_serde_error::SerdeError,
366            #[doc = " The response status."]
367            status: reqwest::StatusCode,
368        },
369        #[doc = " An expected error response."]
370        InvalidResponsePayload {
371            #[cfg(feature = "retry")]
372            #[doc = " The error."]
373            error: reqwest_middleware::Error,
374            #[cfg(not(feature = "retry"))]
375            #[doc = " The error."]
376            error: reqwest::Error,
377            #[doc = " The full response."]
378            response: reqwest::Response,
379        },
380        #[doc = " An error from the server."]
381        Server {
382            #[doc = " The text from the body."]
383            body: String,
384            #[doc = " The response status."]
385            status: reqwest::StatusCode,
386        },
387        #[doc = " A response not listed in the API description. This may represent a"]
388        #[doc = " success or failure response; check `status().is_success()`."]
389        UnexpectedResponse(reqwest::Response),
390    }
391
392    impl Error {
393        #[doc = " Returns the status code, if the error was generated from a response."]
394        pub fn status(&self) -> Option<reqwest::StatusCode> {
395            match self {
396                Error::InvalidRequest(_) => None,
397                Error::RequestError(e) => e.status(),
398                #[cfg(feature = "retry")]
399                Error::CommunicationError(reqwest_middleware::Error::Reqwest(e)) => e.status(),
400                #[cfg(feature = "retry")]
401                Error::CommunicationError(reqwest_middleware::Error::Middleware(_)) => None,
402                Error::SerdeError { error: _, status } => Some(*status),
403                Error::InvalidResponsePayload { error: _, response } => Some(response.status()),
404                Error::Server { body: _, status } => Some(*status),
405                Error::UnexpectedResponse(r) => Some(r.status()),
406            }
407        }
408
409        #[doc = " Creates a new error from a response status and a serde error."]
410        pub fn from_serde_error(
411            e: format_serde_error::SerdeError,
412            status: reqwest::StatusCode,
413        ) -> Self {
414            Self::SerdeError { error: e, status }
415        }
416    }
417
418    #[cfg(feature = "retry")]
419    impl From<reqwest_middleware::Error> for Error {
420        fn from(e: reqwest_middleware::Error) -> Self {
421            Self::CommunicationError(e)
422        }
423    }
424
425    impl From<reqwest::Error> for Error {
426        fn from(e: reqwest::Error) -> Self {
427            Self::RequestError(e)
428        }
429    }
430
431    impl From<serde_json::Error> for Error {
432        fn from(e: serde_json::Error) -> Self {
433            Self::SerdeError {
434                error: format_serde_error::SerdeError::new(String::new(), e),
435                status: reqwest::StatusCode::INTERNAL_SERVER_ERROR,
436            }
437        }
438    }
439
440    impl std::fmt::Display for Error {
441        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
442            match self {
443                Error::InvalidRequest(s) => {
444                    write!(f, "Invalid Request: {}", s)
445                }
446                #[cfg(feature = "retry")]
447                Error::CommunicationError(e) => {
448                    write!(f, "Communication Error: {}", e)
449                }
450                Error::RequestError(e) => {
451                    write!(f, "Request Error: {}", e)
452                }
453                Error::SerdeError { error, status: _ } => {
454                    write!(f, "Serde Error: {}", error)
455                }
456                Error::InvalidResponsePayload { error, response: _ } => {
457                    write!(f, "Invalid Response Payload: {}", error)
458                }
459                Error::Server { body, status } => {
460                    write!(f, "Server Error: {} {}", status, body)
461                }
462                Error::UnexpectedResponse(r) => {
463                    write!(f, "Unexpected Response: {:?}", r)
464                }
465            }
466        }
467    }
468
469    impl std::fmt::Debug for Error {
470        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
471            std::fmt::Display::fmt(self, f)
472        }
473    }
474
475    impl std::error::Error for Error {
476        fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
477            match self {
478                #[cfg(feature = "retry")]
479                Error::CommunicationError(e) => Some(e),
480                Error::SerdeError { error, status: _ } => Some(error),
481                Error::InvalidResponsePayload { error, response: _ } => Some(error),
482                _ => None,
483            }
484        }
485    }
486}
487
488#[doc = "The classification of the address."]
489#[derive(
490    serde :: Serialize,
491    serde :: Deserialize,
492    PartialEq,
493    Hash,
494    Debug,
495    Clone,
496    schemars :: JsonSchema,
497    parse_display :: FromStr,
498    parse_display :: Display,
499)]
500#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
501#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
502pub enum Type {
503    #[serde(rename = "HOME")]
504    #[display("HOME")]
505    Home,
506    #[serde(rename = "WORK")]
507    #[display("WORK")]
508    Work,
509    #[serde(rename = "OTHER")]
510    #[display("OTHER")]
511    Other,
512}
513
514#[doc = "The country component, pursuant to SCIM RFC 7643 4.1.2."]
515#[derive(
516    serde :: Serialize,
517    serde :: Deserialize,
518    PartialEq,
519    Hash,
520    Debug,
521    Clone,
522    schemars :: JsonSchema,
523    parse_display :: FromStr,
524    parse_display :: Display,
525)]
526#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
527#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
528pub enum AddressCountry {
529    #[serde(rename = "AF")]
530    #[display("AF")]
531    Af,
532    #[serde(rename = "AX")]
533    #[display("AX")]
534    Ax,
535    #[serde(rename = "AL")]
536    #[display("AL")]
537    Al,
538    #[serde(rename = "DZ")]
539    #[display("DZ")]
540    Dz,
541    #[serde(rename = "AS")]
542    #[display("AS")]
543    As,
544    #[serde(rename = "AD")]
545    #[display("AD")]
546    Ad,
547    #[serde(rename = "AO")]
548    #[display("AO")]
549    Ao,
550    #[serde(rename = "AI")]
551    #[display("AI")]
552    Ai,
553    #[serde(rename = "AQ")]
554    #[display("AQ")]
555    Aq,
556    #[serde(rename = "AG")]
557    #[display("AG")]
558    Ag,
559    #[serde(rename = "AR")]
560    #[display("AR")]
561    Ar,
562    #[serde(rename = "AM")]
563    #[display("AM")]
564    Am,
565    #[serde(rename = "AW")]
566    #[display("AW")]
567    Aw,
568    #[serde(rename = "AU")]
569    #[display("AU")]
570    Au,
571    #[serde(rename = "AT")]
572    #[display("AT")]
573    At,
574    #[serde(rename = "AZ")]
575    #[display("AZ")]
576    Az,
577    #[serde(rename = "BS")]
578    #[display("BS")]
579    Bs,
580    #[serde(rename = "BH")]
581    #[display("BH")]
582    Bh,
583    #[serde(rename = "BD")]
584    #[display("BD")]
585    Bd,
586    #[serde(rename = "BB")]
587    #[display("BB")]
588    Bb,
589    #[serde(rename = "BY")]
590    #[display("BY")]
591    By,
592    #[serde(rename = "BE")]
593    #[display("BE")]
594    Be,
595    #[serde(rename = "BZ")]
596    #[display("BZ")]
597    Bz,
598    #[serde(rename = "BJ")]
599    #[display("BJ")]
600    Bj,
601    #[serde(rename = "BM")]
602    #[display("BM")]
603    Bm,
604    #[serde(rename = "BT")]
605    #[display("BT")]
606    Bt,
607    #[serde(rename = "BO")]
608    #[display("BO")]
609    Bo,
610    #[serde(rename = "BQ")]
611    #[display("BQ")]
612    Bq,
613    #[serde(rename = "BA")]
614    #[display("BA")]
615    Ba,
616    #[serde(rename = "BW")]
617    #[display("BW")]
618    Bw,
619    #[serde(rename = "BV")]
620    #[display("BV")]
621    Bv,
622    #[serde(rename = "BR")]
623    #[display("BR")]
624    Br,
625    #[serde(rename = "IO")]
626    #[display("IO")]
627    Io,
628    #[serde(rename = "BN")]
629    #[display("BN")]
630    Bn,
631    #[serde(rename = "BG")]
632    #[display("BG")]
633    Bg,
634    #[serde(rename = "BF")]
635    #[display("BF")]
636    Bf,
637    #[serde(rename = "BI")]
638    #[display("BI")]
639    Bi,
640    #[serde(rename = "CV")]
641    #[display("CV")]
642    Cv,
643    #[serde(rename = "KH")]
644    #[display("KH")]
645    Kh,
646    #[serde(rename = "CM")]
647    #[display("CM")]
648    Cm,
649    #[serde(rename = "CA")]
650    #[display("CA")]
651    Ca,
652    #[serde(rename = "KY")]
653    #[display("KY")]
654    Ky,
655    #[serde(rename = "CF")]
656    #[display("CF")]
657    Cf,
658    #[serde(rename = "TD")]
659    #[display("TD")]
660    Td,
661    #[serde(rename = "CL")]
662    #[display("CL")]
663    Cl,
664    #[serde(rename = "CN")]
665    #[display("CN")]
666    Cn,
667    #[serde(rename = "CX")]
668    #[display("CX")]
669    Cx,
670    #[serde(rename = "CC")]
671    #[display("CC")]
672    Cc,
673    #[serde(rename = "CO")]
674    #[display("CO")]
675    Co,
676    #[serde(rename = "KM")]
677    #[display("KM")]
678    Km,
679    #[serde(rename = "CG")]
680    #[display("CG")]
681    Cg,
682    #[serde(rename = "CD")]
683    #[display("CD")]
684    Cd,
685    #[serde(rename = "CK")]
686    #[display("CK")]
687    Ck,
688    #[serde(rename = "CR")]
689    #[display("CR")]
690    Cr,
691    #[serde(rename = "CI")]
692    #[display("CI")]
693    Ci,
694    #[serde(rename = "HR")]
695    #[display("HR")]
696    Hr,
697    #[serde(rename = "CW")]
698    #[display("CW")]
699    Cw,
700    #[serde(rename = "CY")]
701    #[display("CY")]
702    Cy,
703    #[serde(rename = "CZ")]
704    #[display("CZ")]
705    Cz,
706    #[serde(rename = "DK")]
707    #[display("DK")]
708    Dk,
709    #[serde(rename = "DJ")]
710    #[display("DJ")]
711    Dj,
712    #[serde(rename = "DM")]
713    #[display("DM")]
714    Dm,
715    #[serde(rename = "DO")]
716    #[display("DO")]
717    Do,
718    #[serde(rename = "EC")]
719    #[display("EC")]
720    Ec,
721    #[serde(rename = "EG")]
722    #[display("EG")]
723    Eg,
724    #[serde(rename = "SV")]
725    #[display("SV")]
726    Sv,
727    #[serde(rename = "GQ")]
728    #[display("GQ")]
729    Gq,
730    #[serde(rename = "ER")]
731    #[display("ER")]
732    Er,
733    #[serde(rename = "EE")]
734    #[display("EE")]
735    Ee,
736    #[serde(rename = "SZ")]
737    #[display("SZ")]
738    Sz,
739    #[serde(rename = "ET")]
740    #[display("ET")]
741    Et,
742    #[serde(rename = "FK")]
743    #[display("FK")]
744    Fk,
745    #[serde(rename = "FO")]
746    #[display("FO")]
747    Fo,
748    #[serde(rename = "FJ")]
749    #[display("FJ")]
750    Fj,
751    #[serde(rename = "FI")]
752    #[display("FI")]
753    Fi,
754    #[serde(rename = "FR")]
755    #[display("FR")]
756    Fr,
757    #[serde(rename = "GF")]
758    #[display("GF")]
759    Gf,
760    #[serde(rename = "PF")]
761    #[display("PF")]
762    Pf,
763    #[serde(rename = "TF")]
764    #[display("TF")]
765    Tf,
766    #[serde(rename = "GA")]
767    #[display("GA")]
768    Ga,
769    #[serde(rename = "GM")]
770    #[display("GM")]
771    Gm,
772    #[serde(rename = "GE")]
773    #[display("GE")]
774    Ge,
775    #[serde(rename = "DE")]
776    #[display("DE")]
777    De,
778    #[serde(rename = "GH")]
779    #[display("GH")]
780    Gh,
781    #[serde(rename = "GI")]
782    #[display("GI")]
783    Gi,
784    #[serde(rename = "GR")]
785    #[display("GR")]
786    Gr,
787    #[serde(rename = "GL")]
788    #[display("GL")]
789    Gl,
790    #[serde(rename = "GD")]
791    #[display("GD")]
792    Gd,
793    #[serde(rename = "GP")]
794    #[display("GP")]
795    Gp,
796    #[serde(rename = "GU")]
797    #[display("GU")]
798    Gu,
799    #[serde(rename = "GT")]
800    #[display("GT")]
801    Gt,
802    #[serde(rename = "GG")]
803    #[display("GG")]
804    Gg,
805    #[serde(rename = "GN")]
806    #[display("GN")]
807    Gn,
808    #[serde(rename = "GW")]
809    #[display("GW")]
810    Gw,
811    #[serde(rename = "GY")]
812    #[display("GY")]
813    Gy,
814    #[serde(rename = "HT")]
815    #[display("HT")]
816    Ht,
817    #[serde(rename = "HM")]
818    #[display("HM")]
819    Hm,
820    #[serde(rename = "VA")]
821    #[display("VA")]
822    Va,
823    #[serde(rename = "HN")]
824    #[display("HN")]
825    Hn,
826    #[serde(rename = "HK")]
827    #[display("HK")]
828    Hk,
829    #[serde(rename = "HU")]
830    #[display("HU")]
831    Hu,
832    #[serde(rename = "IS")]
833    #[display("IS")]
834    Is,
835    #[serde(rename = "IN")]
836    #[display("IN")]
837    In,
838    #[serde(rename = "ID")]
839    #[display("ID")]
840    Id,
841    #[serde(rename = "IQ")]
842    #[display("IQ")]
843    Iq,
844    #[serde(rename = "IE")]
845    #[display("IE")]
846    Ie,
847    #[serde(rename = "IM")]
848    #[display("IM")]
849    Im,
850    #[serde(rename = "IL")]
851    #[display("IL")]
852    Il,
853    #[serde(rename = "IT")]
854    #[display("IT")]
855    It,
856    #[serde(rename = "JM")]
857    #[display("JM")]
858    Jm,
859    #[serde(rename = "JP")]
860    #[display("JP")]
861    Jp,
862    #[serde(rename = "JE")]
863    #[display("JE")]
864    Je,
865    #[serde(rename = "JO")]
866    #[display("JO")]
867    Jo,
868    #[serde(rename = "KZ")]
869    #[display("KZ")]
870    Kz,
871    #[serde(rename = "KE")]
872    #[display("KE")]
873    Ke,
874    #[serde(rename = "KI")]
875    #[display("KI")]
876    Ki,
877    #[serde(rename = "KR")]
878    #[display("KR")]
879    Kr,
880    #[serde(rename = "XK")]
881    #[display("XK")]
882    Xk,
883    #[serde(rename = "KW")]
884    #[display("KW")]
885    Kw,
886    #[serde(rename = "KG")]
887    #[display("KG")]
888    Kg,
889    #[serde(rename = "LA")]
890    #[display("LA")]
891    La,
892    #[serde(rename = "LV")]
893    #[display("LV")]
894    Lv,
895    #[serde(rename = "LB")]
896    #[display("LB")]
897    Lb,
898    #[serde(rename = "LS")]
899    #[display("LS")]
900    Ls,
901    #[serde(rename = "LR")]
902    #[display("LR")]
903    Lr,
904    #[serde(rename = "LY")]
905    #[display("LY")]
906    Ly,
907    #[serde(rename = "LI")]
908    #[display("LI")]
909    Li,
910    #[serde(rename = "LT")]
911    #[display("LT")]
912    Lt,
913    #[serde(rename = "LU")]
914    #[display("LU")]
915    Lu,
916    #[serde(rename = "MO")]
917    #[display("MO")]
918    Mo,
919    #[serde(rename = "MG")]
920    #[display("MG")]
921    Mg,
922    #[serde(rename = "MW")]
923    #[display("MW")]
924    Mw,
925    #[serde(rename = "MY")]
926    #[display("MY")]
927    My,
928    #[serde(rename = "MV")]
929    #[display("MV")]
930    Mv,
931    #[serde(rename = "ML")]
932    #[display("ML")]
933    Ml,
934    #[serde(rename = "MT")]
935    #[display("MT")]
936    Mt,
937    #[serde(rename = "MH")]
938    #[display("MH")]
939    Mh,
940    #[serde(rename = "MQ")]
941    #[display("MQ")]
942    Mq,
943    #[serde(rename = "MR")]
944    #[display("MR")]
945    Mr,
946    #[serde(rename = "MU")]
947    #[display("MU")]
948    Mu,
949    #[serde(rename = "YT")]
950    #[display("YT")]
951    Yt,
952    #[serde(rename = "MX")]
953    #[display("MX")]
954    Mx,
955    #[serde(rename = "FM")]
956    #[display("FM")]
957    Fm,
958    #[serde(rename = "MD")]
959    #[display("MD")]
960    Md,
961    #[serde(rename = "MC")]
962    #[display("MC")]
963    Mc,
964    #[serde(rename = "MN")]
965    #[display("MN")]
966    Mn,
967    #[serde(rename = "ME")]
968    #[display("ME")]
969    Me,
970    #[serde(rename = "MS")]
971    #[display("MS")]
972    Ms,
973    #[serde(rename = "MA")]
974    #[display("MA")]
975    Ma,
976    #[serde(rename = "MZ")]
977    #[display("MZ")]
978    Mz,
979    #[serde(rename = "MM")]
980    #[display("MM")]
981    Mm,
982    #[serde(rename = "NA")]
983    #[display("NA")]
984    Na,
985    #[serde(rename = "NR")]
986    #[display("NR")]
987    Nr,
988    #[serde(rename = "NP")]
989    #[display("NP")]
990    Np,
991    #[serde(rename = "NL")]
992    #[display("NL")]
993    Nl,
994    #[serde(rename = "AN")]
995    #[display("AN")]
996    An,
997    #[serde(rename = "NC")]
998    #[display("NC")]
999    Nc,
1000    #[serde(rename = "NZ")]
1001    #[display("NZ")]
1002    Nz,
1003    #[serde(rename = "NI")]
1004    #[display("NI")]
1005    Ni,
1006    #[serde(rename = "NE")]
1007    #[display("NE")]
1008    Ne,
1009    #[serde(rename = "NG")]
1010    #[display("NG")]
1011    Ng,
1012    #[serde(rename = "NU")]
1013    #[display("NU")]
1014    Nu,
1015    #[serde(rename = "NF")]
1016    #[display("NF")]
1017    Nf,
1018    #[serde(rename = "MK")]
1019    #[display("MK")]
1020    Mk,
1021    #[serde(rename = "MP")]
1022    #[display("MP")]
1023    Mp,
1024    #[serde(rename = "NO")]
1025    #[display("NO")]
1026    No,
1027    #[serde(rename = "OM")]
1028    #[display("OM")]
1029    Om,
1030    #[serde(rename = "PK")]
1031    #[display("PK")]
1032    Pk,
1033    #[serde(rename = "PW")]
1034    #[display("PW")]
1035    Pw,
1036    #[serde(rename = "PS")]
1037    #[display("PS")]
1038    Ps,
1039    #[serde(rename = "PA")]
1040    #[display("PA")]
1041    Pa,
1042    #[serde(rename = "PG")]
1043    #[display("PG")]
1044    Pg,
1045    #[serde(rename = "PY")]
1046    #[display("PY")]
1047    Py,
1048    #[serde(rename = "PE")]
1049    #[display("PE")]
1050    Pe,
1051    #[serde(rename = "PH")]
1052    #[display("PH")]
1053    Ph,
1054    #[serde(rename = "PN")]
1055    #[display("PN")]
1056    Pn,
1057    #[serde(rename = "PL")]
1058    #[display("PL")]
1059    Pl,
1060    #[serde(rename = "PT")]
1061    #[display("PT")]
1062    Pt,
1063    #[serde(rename = "PR")]
1064    #[display("PR")]
1065    Pr,
1066    #[serde(rename = "QA")]
1067    #[display("QA")]
1068    Qa,
1069    #[serde(rename = "RO")]
1070    #[display("RO")]
1071    Ro,
1072    #[serde(rename = "RU")]
1073    #[display("RU")]
1074    Ru,
1075    #[serde(rename = "RW")]
1076    #[display("RW")]
1077    Rw,
1078    #[serde(rename = "RE")]
1079    #[display("RE")]
1080    Re,
1081    #[serde(rename = "BL")]
1082    #[display("BL")]
1083    Bl,
1084    #[serde(rename = "SH")]
1085    #[display("SH")]
1086    Sh,
1087    #[serde(rename = "KN")]
1088    #[display("KN")]
1089    Kn,
1090    #[serde(rename = "LC")]
1091    #[display("LC")]
1092    Lc,
1093    #[serde(rename = "MF")]
1094    #[display("MF")]
1095    Mf,
1096    #[serde(rename = "PM")]
1097    #[display("PM")]
1098    Pm,
1099    #[serde(rename = "VC")]
1100    #[display("VC")]
1101    Vc,
1102    #[serde(rename = "WS")]
1103    #[display("WS")]
1104    Ws,
1105    #[serde(rename = "SM")]
1106    #[display("SM")]
1107    Sm,
1108    #[serde(rename = "ST")]
1109    #[display("ST")]
1110    St,
1111    #[serde(rename = "SA")]
1112    #[display("SA")]
1113    Sa,
1114    #[serde(rename = "SN")]
1115    #[display("SN")]
1116    Sn,
1117    #[serde(rename = "RS")]
1118    #[display("RS")]
1119    Rs,
1120    #[serde(rename = "SC")]
1121    #[display("SC")]
1122    Sc,
1123    #[serde(rename = "SL")]
1124    #[display("SL")]
1125    Sl,
1126    #[serde(rename = "SG")]
1127    #[display("SG")]
1128    Sg,
1129    #[serde(rename = "SX")]
1130    #[display("SX")]
1131    Sx,
1132    #[serde(rename = "SK")]
1133    #[display("SK")]
1134    Sk,
1135    #[serde(rename = "SI")]
1136    #[display("SI")]
1137    Si,
1138    #[serde(rename = "SB")]
1139    #[display("SB")]
1140    Sb,
1141    #[serde(rename = "SO")]
1142    #[display("SO")]
1143    So,
1144    #[serde(rename = "ZA")]
1145    #[display("ZA")]
1146    Za,
1147    #[serde(rename = "GS")]
1148    #[display("GS")]
1149    Gs,
1150    #[serde(rename = "SS")]
1151    #[display("SS")]
1152    Ss,
1153    #[serde(rename = "ES")]
1154    #[display("ES")]
1155    Es,
1156    #[serde(rename = "LK")]
1157    #[display("LK")]
1158    Lk,
1159    #[serde(rename = "SD")]
1160    #[display("SD")]
1161    Sd,
1162    #[serde(rename = "SR")]
1163    #[display("SR")]
1164    Sr,
1165    #[serde(rename = "SJ")]
1166    #[display("SJ")]
1167    Sj,
1168    #[serde(rename = "SE")]
1169    #[display("SE")]
1170    Se,
1171    #[serde(rename = "CH")]
1172    #[display("CH")]
1173    Ch,
1174    #[serde(rename = "TW")]
1175    #[display("TW")]
1176    Tw,
1177    #[serde(rename = "TJ")]
1178    #[display("TJ")]
1179    Tj,
1180    #[serde(rename = "TZ")]
1181    #[display("TZ")]
1182    Tz,
1183    #[serde(rename = "TH")]
1184    #[display("TH")]
1185    Th,
1186    #[serde(rename = "TL")]
1187    #[display("TL")]
1188    Tl,
1189    #[serde(rename = "TG")]
1190    #[display("TG")]
1191    Tg,
1192    #[serde(rename = "TK")]
1193    #[display("TK")]
1194    Tk,
1195    #[serde(rename = "TO")]
1196    #[display("TO")]
1197    To,
1198    #[serde(rename = "TT")]
1199    #[display("TT")]
1200    Tt,
1201    #[serde(rename = "TN")]
1202    #[display("TN")]
1203    Tn,
1204    #[serde(rename = "TR")]
1205    #[display("TR")]
1206    Tr,
1207    #[serde(rename = "TM")]
1208    #[display("TM")]
1209    Tm,
1210    #[serde(rename = "TC")]
1211    #[display("TC")]
1212    Tc,
1213    #[serde(rename = "TV")]
1214    #[display("TV")]
1215    Tv,
1216    #[serde(rename = "UG")]
1217    #[display("UG")]
1218    Ug,
1219    #[serde(rename = "UA")]
1220    #[display("UA")]
1221    Ua,
1222    #[serde(rename = "AE")]
1223    #[display("AE")]
1224    Ae,
1225    #[serde(rename = "GB")]
1226    #[display("GB")]
1227    Gb,
1228    #[serde(rename = "US")]
1229    #[display("US")]
1230    Us,
1231    #[serde(rename = "UM")]
1232    #[display("UM")]
1233    Um,
1234    #[serde(rename = "UY")]
1235    #[display("UY")]
1236    Uy,
1237    #[serde(rename = "UZ")]
1238    #[display("UZ")]
1239    Uz,
1240    #[serde(rename = "VU")]
1241    #[display("VU")]
1242    Vu,
1243    #[serde(rename = "VE")]
1244    #[display("VE")]
1245    Ve,
1246    #[serde(rename = "VN")]
1247    #[display("VN")]
1248    Vn,
1249    #[serde(rename = "VG")]
1250    #[display("VG")]
1251    Vg,
1252    #[serde(rename = "VI")]
1253    #[display("VI")]
1254    Vi,
1255    #[serde(rename = "WF")]
1256    #[display("WF")]
1257    Wf,
1258    #[serde(rename = "EH")]
1259    #[display("EH")]
1260    Eh,
1261    #[serde(rename = "YE")]
1262    #[display("YE")]
1263    Ye,
1264    #[serde(rename = "ZM")]
1265    #[display("ZM")]
1266    Zm,
1267    #[serde(rename = "ZW")]
1268    #[display("ZW")]
1269    Zw,
1270}
1271
1272#[doc = "Address."]
1273#[derive(
1274    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1275)]
1276pub struct Address {
1277    #[doc = "The classification of the address."]
1278    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1279    pub type_: Option<Type>,
1280    #[doc = "The formatted mailing address."]
1281    #[serde(default, skip_serializing_if = "Option::is_none")]
1282    pub formatted: Option<String>,
1283    #[doc = "The full street address component, which may include house number, street name, P.O. \
1284             box, and multi-line extended street address information, pursuant to SCIM RFC 7643 \
1285             4.1.2.."]
1286    #[serde(default, skip_serializing_if = "Option::is_none")]
1287    pub street_address: Option<String>,
1288    #[doc = "The city or locality component."]
1289    #[serde(default, skip_serializing_if = "Option::is_none")]
1290    pub locality: Option<String>,
1291    #[doc = "The state or region component, pursuant to SCIM RFC 7643 4.1.2."]
1292    #[serde(default, skip_serializing_if = "Option::is_none")]
1293    pub region: Option<String>,
1294    #[doc = "The zip code or postal code component, pursuant to SCIM RFC 7643 4.1.2."]
1295    #[serde(default, skip_serializing_if = "Option::is_none")]
1296    pub postal_code: Option<String>,
1297    #[doc = "The country component, pursuant to SCIM RFC 7643 4.1.2."]
1298    #[serde(default, skip_serializing_if = "Option::is_none")]
1299    pub country: Option<AddressCountry>,
1300}
1301
1302impl std::fmt::Display for Address {
1303    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1304        write!(
1305            f,
1306            "{}",
1307            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1308        )
1309    }
1310}
1311
1312#[cfg(feature = "tabled")]
1313impl tabled::Tabled for Address {
1314    const LENGTH: usize = 7;
1315    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1316        vec![
1317            if let Some(type_) = &self.type_ {
1318                format!("{:?}", type_).into()
1319            } else {
1320                String::new().into()
1321            },
1322            if let Some(formatted) = &self.formatted {
1323                format!("{:?}", formatted).into()
1324            } else {
1325                String::new().into()
1326            },
1327            if let Some(street_address) = &self.street_address {
1328                format!("{:?}", street_address).into()
1329            } else {
1330                String::new().into()
1331            },
1332            if let Some(locality) = &self.locality {
1333                format!("{:?}", locality).into()
1334            } else {
1335                String::new().into()
1336            },
1337            if let Some(region) = &self.region {
1338                format!("{:?}", region).into()
1339            } else {
1340                String::new().into()
1341            },
1342            if let Some(postal_code) = &self.postal_code {
1343                format!("{:?}", postal_code).into()
1344            } else {
1345                String::new().into()
1346            },
1347            if let Some(country) = &self.country {
1348                format!("{:?}", country).into()
1349            } else {
1350                String::new().into()
1351            },
1352        ]
1353    }
1354
1355    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1356        vec![
1357            "type_".into(),
1358            "formatted".into(),
1359            "street_address".into(),
1360            "locality".into(),
1361            "region".into(),
1362            "postal_code".into(),
1363            "country".into(),
1364        ]
1365    }
1366}
1367
1368#[doc = "Application status"]
1369#[derive(
1370    serde :: Serialize,
1371    serde :: Deserialize,
1372    PartialEq,
1373    Hash,
1374    Debug,
1375    Clone,
1376    schemars :: JsonSchema,
1377    parse_display :: FromStr,
1378    parse_display :: Display,
1379)]
1380#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
1381#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
1382pub enum Status {
1383    #[serde(rename = "ACTIVE")]
1384    #[display("ACTIVE")]
1385    Active,
1386    #[serde(rename = "REJECTED")]
1387    #[display("REJECTED")]
1388    Rejected,
1389    #[serde(rename = "HIRED")]
1390    #[display("HIRED")]
1391    Hired,
1392    #[serde(rename = "ARCHIVED")]
1393    #[display("ARCHIVED")]
1394    Archived,
1395}
1396
1397#[doc = "Application."]
1398#[derive(
1399    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1400)]
1401pub struct Application {
1402    #[doc = "Identifier field"]
1403    pub id: String,
1404    #[doc = "Record creation date"]
1405    pub created_at: String,
1406    #[doc = "Record update date"]
1407    pub updated_at: String,
1408    #[doc = "Application status"]
1409    #[serde(default, skip_serializing_if = "Option::is_none")]
1410    pub status: Option<Status>,
1411    #[doc = "Application stage"]
1412    #[serde(default, skip_serializing_if = "Option::is_none")]
1413    pub stage: Option<String>,
1414    #[doc = "Application creation date"]
1415    #[serde(default, skip_serializing_if = "Option::is_none")]
1416    pub applied_at: Option<String>,
1417    #[doc = "Job requisition ID"]
1418    #[serde(default, skip_serializing_if = "Option::is_none")]
1419    pub job_id: Option<String>,
1420    #[doc = "Job requisition\n\nExpandable field"]
1421    #[serde(default, skip_serializing_if = "Option::is_none")]
1422    pub job: Option<JobRequisition>,
1423    #[doc = "Application url"]
1424    #[serde(default, skip_serializing_if = "Option::is_none")]
1425    pub url: Option<String>,
1426}
1427
1428impl std::fmt::Display for Application {
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
1438#[cfg(feature = "tabled")]
1439impl tabled::Tabled for Application {
1440    const LENGTH: usize = 9;
1441    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1442        vec![
1443            self.id.clone().into(),
1444            self.created_at.clone().into(),
1445            self.updated_at.clone().into(),
1446            if let Some(status) = &self.status {
1447                format!("{:?}", status).into()
1448            } else {
1449                String::new().into()
1450            },
1451            if let Some(stage) = &self.stage {
1452                format!("{:?}", stage).into()
1453            } else {
1454                String::new().into()
1455            },
1456            if let Some(applied_at) = &self.applied_at {
1457                format!("{:?}", applied_at).into()
1458            } else {
1459                String::new().into()
1460            },
1461            if let Some(job_id) = &self.job_id {
1462                format!("{:?}", job_id).into()
1463            } else {
1464                String::new().into()
1465            },
1466            if let Some(job) = &self.job {
1467                format!("{:?}", job).into()
1468            } else {
1469                String::new().into()
1470            },
1471            if let Some(url) = &self.url {
1472                format!("{:?}", url).into()
1473            } else {
1474                String::new().into()
1475            },
1476        ]
1477    }
1478
1479    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1480        vec![
1481            "id".into(),
1482            "created_at".into(),
1483            "updated_at".into(),
1484            "status".into(),
1485            "stage".into(),
1486            "applied_at".into(),
1487            "job_id".into(),
1488            "job".into(),
1489            "url".into(),
1490        ]
1491    }
1492}
1493
1494#[doc = "Break."]
1495#[derive(
1496    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1497)]
1498pub struct Break {
1499    #[doc = "The start time of the break."]
1500    #[serde(default, skip_serializing_if = "Option::is_none")]
1501    pub start_time: Option<String>,
1502    #[doc = "The end time of the break."]
1503    #[serde(default, skip_serializing_if = "Option::is_none")]
1504    pub end_time: Option<String>,
1505    #[doc = "The original start time of the break. If the startTime field has been rounded then \
1506             this contain the start time before the rounding occured."]
1507    #[serde(default, skip_serializing_if = "Option::is_none")]
1508    pub original_start_time: Option<String>,
1509    #[doc = "The original end time of the break. If the endTime field has been rounded then this \
1510             contain the end time before the rounding occured."]
1511    #[serde(default, skip_serializing_if = "Option::is_none")]
1512    pub original_end_time: Option<String>,
1513    #[doc = "The ID of the break type."]
1514    #[serde(default, skip_serializing_if = "Option::is_none")]
1515    pub break_type_id: Option<String>,
1516}
1517
1518impl std::fmt::Display for Break {
1519    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1520        write!(
1521            f,
1522            "{}",
1523            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1524        )
1525    }
1526}
1527
1528#[cfg(feature = "tabled")]
1529impl tabled::Tabled for Break {
1530    const LENGTH: usize = 5;
1531    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1532        vec![
1533            if let Some(start_time) = &self.start_time {
1534                format!("{:?}", start_time).into()
1535            } else {
1536                String::new().into()
1537            },
1538            if let Some(end_time) = &self.end_time {
1539                format!("{:?}", end_time).into()
1540            } else {
1541                String::new().into()
1542            },
1543            if let Some(original_start_time) = &self.original_start_time {
1544                format!("{:?}", original_start_time).into()
1545            } else {
1546                String::new().into()
1547            },
1548            if let Some(original_end_time) = &self.original_end_time {
1549                format!("{:?}", original_end_time).into()
1550            } else {
1551                String::new().into()
1552            },
1553            if let Some(break_type_id) = &self.break_type_id {
1554                format!("{:?}", break_type_id).into()
1555            } else {
1556                String::new().into()
1557            },
1558        ]
1559    }
1560
1561    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1562        vec![
1563            "start_time".into(),
1564            "end_time".into(),
1565            "original_start_time".into(),
1566            "original_end_time".into(),
1567            "break_type_id".into(),
1568        ]
1569    }
1570}
1571
1572#[doc = "BreakRequest."]
1573#[derive(
1574    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1575)]
1576pub struct BreakRequest {
1577    #[doc = "The start time of the break."]
1578    #[serde(default, skip_serializing_if = "Option::is_none")]
1579    pub start_time: Option<String>,
1580    #[doc = "The end time of the break."]
1581    #[serde(default, skip_serializing_if = "Option::is_none")]
1582    pub end_time: Option<String>,
1583    #[doc = "The ID of the break type."]
1584    #[serde(default, skip_serializing_if = "Option::is_none")]
1585    pub break_type_id: Option<String>,
1586}
1587
1588impl std::fmt::Display for BreakRequest {
1589    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1590        write!(
1591            f,
1592            "{}",
1593            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1594        )
1595    }
1596}
1597
1598#[cfg(feature = "tabled")]
1599impl tabled::Tabled for BreakRequest {
1600    const LENGTH: usize = 3;
1601    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1602        vec![
1603            if let Some(start_time) = &self.start_time {
1604                format!("{:?}", start_time).into()
1605            } else {
1606                String::new().into()
1607            },
1608            if let Some(end_time) = &self.end_time {
1609                format!("{:?}", end_time).into()
1610            } else {
1611                String::new().into()
1612            },
1613            if let Some(break_type_id) = &self.break_type_id {
1614                format!("{:?}", break_type_id).into()
1615            } else {
1616                String::new().into()
1617            },
1618        ]
1619    }
1620
1621    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1622        vec![
1623            "start_time".into(),
1624            "end_time".into(),
1625            "break_type_id".into(),
1626        ]
1627    }
1628}
1629
1630#[doc = "Candidate."]
1631#[derive(
1632    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1633)]
1634pub struct Candidate {
1635    #[doc = "Identifier field"]
1636    pub id: String,
1637    #[doc = "Record creation date"]
1638    pub created_at: String,
1639    #[doc = "Record update date"]
1640    pub updated_at: String,
1641    #[doc = "Candidate first name"]
1642    #[serde(default, skip_serializing_if = "Option::is_none")]
1643    pub first_name: Option<String>,
1644    #[doc = "Candidate last name"]
1645    #[serde(default, skip_serializing_if = "Option::is_none")]
1646    pub last_name: Option<String>,
1647    #[doc = "Candidate email"]
1648    #[serde(default, skip_serializing_if = "Option::is_none")]
1649    pub email: Option<String>,
1650    #[doc = "Candidate phone number"]
1651    #[serde(default, skip_serializing_if = "Option::is_none")]
1652    pub phone_number: Option<String>,
1653    #[doc = "Candidate timezone"]
1654    #[serde(default, skip_serializing_if = "Option::is_none")]
1655    pub timezone: Option<String>,
1656}
1657
1658impl std::fmt::Display for Candidate {
1659    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1660        write!(
1661            f,
1662            "{}",
1663            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1664        )
1665    }
1666}
1667
1668#[cfg(feature = "tabled")]
1669impl tabled::Tabled for Candidate {
1670    const LENGTH: usize = 8;
1671    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1672        vec![
1673            self.id.clone().into(),
1674            self.created_at.clone().into(),
1675            self.updated_at.clone().into(),
1676            if let Some(first_name) = &self.first_name {
1677                format!("{:?}", first_name).into()
1678            } else {
1679                String::new().into()
1680            },
1681            if let Some(last_name) = &self.last_name {
1682                format!("{:?}", last_name).into()
1683            } else {
1684                String::new().into()
1685            },
1686            if let Some(email) = &self.email {
1687                format!("{:?}", email).into()
1688            } else {
1689                String::new().into()
1690            },
1691            if let Some(phone_number) = &self.phone_number {
1692                format!("{:?}", phone_number).into()
1693            } else {
1694                String::new().into()
1695            },
1696            if let Some(timezone) = &self.timezone {
1697                format!("{:?}", timezone).into()
1698            } else {
1699                String::new().into()
1700            },
1701        ]
1702    }
1703
1704    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1705        vec![
1706            "id".into(),
1707            "created_at".into(),
1708            "updated_at".into(),
1709            "first_name".into(),
1710            "last_name".into(),
1711            "email".into(),
1712            "phone_number".into(),
1713            "timezone".into(),
1714        ]
1715    }
1716}
1717
1718#[doc = "Company."]
1719#[derive(
1720    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1721)]
1722pub struct Company {
1723    #[doc = "Identifier field"]
1724    pub id: String,
1725    #[doc = "Record creation date"]
1726    pub created_at: String,
1727    #[doc = "Record update date"]
1728    pub updated_at: String,
1729    #[doc = "The company's ultimate holding entity."]
1730    #[serde(default, skip_serializing_if = "Option::is_none")]
1731    pub parent_legal_entity_id: Option<String>,
1732    #[doc = "A list of the company's entities."]
1733    pub legal_entities_id: Vec<String>,
1734    #[doc = "The physical address of the holding entity."]
1735    #[serde(default, skip_serializing_if = "Option::is_none")]
1736    pub physical_address: Option<Address>,
1737    #[doc = "The email address used when registering this company."]
1738    #[serde(default, skip_serializing_if = "Option::is_none")]
1739    pub primary_email: Option<String>,
1740    #[doc = "The legal name of the company."]
1741    #[serde(default, skip_serializing_if = "Option::is_none")]
1742    pub legal_name: Option<String>,
1743    #[doc = "The doing business as name for the company."]
1744    #[serde(default, skip_serializing_if = "Option::is_none")]
1745    pub doing_business_as_name: Option<String>,
1746    #[doc = "The phone number for the company."]
1747    #[serde(default, skip_serializing_if = "Option::is_none")]
1748    pub phone: Option<String>,
1749    #[doc = "The name of the company."]
1750    pub name: String,
1751}
1752
1753impl std::fmt::Display for Company {
1754    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1755        write!(
1756            f,
1757            "{}",
1758            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1759        )
1760    }
1761}
1762
1763#[cfg(feature = "tabled")]
1764impl tabled::Tabled for Company {
1765    const LENGTH: usize = 11;
1766    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1767        vec![
1768            self.id.clone().into(),
1769            self.created_at.clone().into(),
1770            self.updated_at.clone().into(),
1771            if let Some(parent_legal_entity_id) = &self.parent_legal_entity_id {
1772                format!("{:?}", parent_legal_entity_id).into()
1773            } else {
1774                String::new().into()
1775            },
1776            format!("{:?}", self.legal_entities_id).into(),
1777            if let Some(physical_address) = &self.physical_address {
1778                format!("{:?}", physical_address).into()
1779            } else {
1780                String::new().into()
1781            },
1782            if let Some(primary_email) = &self.primary_email {
1783                format!("{:?}", primary_email).into()
1784            } else {
1785                String::new().into()
1786            },
1787            if let Some(legal_name) = &self.legal_name {
1788                format!("{:?}", legal_name).into()
1789            } else {
1790                String::new().into()
1791            },
1792            if let Some(doing_business_as_name) = &self.doing_business_as_name {
1793                format!("{:?}", doing_business_as_name).into()
1794            } else {
1795                String::new().into()
1796            },
1797            if let Some(phone) = &self.phone {
1798                format!("{:?}", phone).into()
1799            } else {
1800                String::new().into()
1801            },
1802            self.name.clone().into(),
1803        ]
1804    }
1805
1806    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1807        vec![
1808            "id".into(),
1809            "created_at".into(),
1810            "updated_at".into(),
1811            "parent_legal_entity_id".into(),
1812            "legal_entities_id".into(),
1813            "physical_address".into(),
1814            "primary_email".into(),
1815            "legal_name".into(),
1816            "doing_business_as_name".into(),
1817            "phone".into(),
1818            "name".into(),
1819        ]
1820    }
1821}
1822
1823#[doc = "The classification of the worker by the company. * `CONTRACTOR`: Contractors are \
1824         self-employed workers who provide services on a short-term or per-project basis and are \
1825         not eligible for tax-withholding or benefits. * `EMPLOYEE`: Employees are hired and \
1826         managed by an employer, work under the employer's direct supervision and control, and are \
1827         protected by law for wages and employment rights."]
1828#[derive(
1829    serde :: Serialize,
1830    serde :: Deserialize,
1831    PartialEq,
1832    Hash,
1833    Debug,
1834    Clone,
1835    schemars :: JsonSchema,
1836    parse_display :: FromStr,
1837    parse_display :: Display,
1838)]
1839#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
1840#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
1841pub enum CompanyEmploymentTypeType {
1842    #[serde(rename = "CONTRACTOR")]
1843    #[display("CONTRACTOR")]
1844    Contractor,
1845    #[serde(rename = "EMPLOYEE")]
1846    #[display("EMPLOYEE")]
1847    Employee,
1848}
1849
1850#[doc = "The compensation period for the employment type. * `SALARIED`: Employees that are paid a \
1851         fixed amount per year. * `HOURLY`: Employees that are paid a wage per hour worked."]
1852#[derive(
1853    serde :: Serialize,
1854    serde :: Deserialize,
1855    PartialEq,
1856    Hash,
1857    Debug,
1858    Clone,
1859    schemars :: JsonSchema,
1860    parse_display :: FromStr,
1861    parse_display :: Display,
1862)]
1863#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
1864#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
1865pub enum CompensationTimePeriod {
1866    #[serde(rename = "HOURLY")]
1867    #[display("HOURLY")]
1868    Hourly,
1869    #[serde(rename = "SALARIED")]
1870    #[display("SALARIED")]
1871    Salaried,
1872}
1873
1874#[doc = "The amount worked for the employment type. * `FULL-TIME`: Full-time is at least 30 hours \
1875         per week. Full-time workers will typically be eligible for benefits. * `PART-TIME`: \
1876         Part-time is less than 30 hours per week. These workers may be eligible for benefits, \
1877         depending on company settings and hours worked. * `TEMPORARY`: These workers are hired on \
1878         a temporary basis. You can specify how each worker with this employment type will be paid \
1879         individually."]
1880#[derive(
1881    serde :: Serialize,
1882    serde :: Deserialize,
1883    PartialEq,
1884    Hash,
1885    Debug,
1886    Clone,
1887    schemars :: JsonSchema,
1888    parse_display :: FromStr,
1889    parse_display :: Display,
1890)]
1891#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
1892#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
1893pub enum AmountWorked {
1894    #[serde(rename = "PART-TIME")]
1895    #[display("PART-TIME")]
1896    PartTime,
1897    #[serde(rename = "FULL-TIME")]
1898    #[display("FULL-TIME")]
1899    FullTime,
1900    #[serde(rename = "TEMPORARY")]
1901    #[display("TEMPORARY")]
1902    Temporary,
1903}
1904
1905#[doc = "CompanyEmploymentType."]
1906#[derive(
1907    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1908)]
1909pub struct CompanyEmploymentType {
1910    #[doc = "Identifier field"]
1911    pub id: String,
1912    #[doc = "Record creation date"]
1913    pub created_at: String,
1914    #[doc = "Record update date"]
1915    pub updated_at: String,
1916    #[doc = "The display label of the employment type."]
1917    pub label: String,
1918    #[doc = "The name of the employment type for non-custom employment types."]
1919    #[serde(default, skip_serializing_if = "Option::is_none")]
1920    pub name: Option<String>,
1921    #[doc = "The classification of the worker by the company. * `CONTRACTOR`: Contractors are \
1922             self-employed workers who provide services on a short-term or per-project basis and \
1923             are not eligible for tax-withholding or benefits. * `EMPLOYEE`: Employees are hired \
1924             and managed by an employer, work under the employer's direct supervision and \
1925             control, and are protected by law for wages and employment rights."]
1926    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1927    pub type_: Option<CompanyEmploymentTypeType>,
1928    #[doc = "The compensation period for the employment type. * `SALARIED`: Employees that are \
1929             paid a fixed amount per year. * `HOURLY`: Employees that are paid a wage per hour \
1930             worked."]
1931    #[serde(default, skip_serializing_if = "Option::is_none")]
1932    pub compensation_time_period: Option<CompensationTimePeriod>,
1933    #[doc = "The amount worked for the employment type. * `FULL-TIME`: Full-time is at least 30 \
1934             hours per week. Full-time workers will typically be eligible for benefits. * \
1935             `PART-TIME`: Part-time is less than 30 hours per week. These workers may be eligible \
1936             for benefits, depending on company settings and hours worked. * `TEMPORARY`: These \
1937             workers are hired on a temporary basis. You can specify how each worker with this \
1938             employment type will be paid individually."]
1939    #[serde(default, skip_serializing_if = "Option::is_none")]
1940    pub amount_worked: Option<AmountWorked>,
1941}
1942
1943impl std::fmt::Display for CompanyEmploymentType {
1944    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1945        write!(
1946            f,
1947            "{}",
1948            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1949        )
1950    }
1951}
1952
1953#[cfg(feature = "tabled")]
1954impl tabled::Tabled for CompanyEmploymentType {
1955    const LENGTH: usize = 8;
1956    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1957        vec![
1958            self.id.clone().into(),
1959            self.created_at.clone().into(),
1960            self.updated_at.clone().into(),
1961            self.label.clone().into(),
1962            if let Some(name) = &self.name {
1963                format!("{:?}", name).into()
1964            } else {
1965                String::new().into()
1966            },
1967            if let Some(type_) = &self.type_ {
1968                format!("{:?}", type_).into()
1969            } else {
1970                String::new().into()
1971            },
1972            if let Some(compensation_time_period) = &self.compensation_time_period {
1973                format!("{:?}", compensation_time_period).into()
1974            } else {
1975                String::new().into()
1976            },
1977            if let Some(amount_worked) = &self.amount_worked {
1978                format!("{:?}", amount_worked).into()
1979            } else {
1980                String::new().into()
1981            },
1982        ]
1983    }
1984
1985    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1986        vec![
1987            "id".into(),
1988            "created_at".into(),
1989            "updated_at".into(),
1990            "label".into(),
1991            "name".into(),
1992            "type_".into(),
1993            "compensation_time_period".into(),
1994            "amount_worked".into(),
1995        ]
1996    }
1997}
1998
1999#[doc = "Compensation."]
2000#[derive(
2001    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
2002)]
2003pub struct Compensation {
2004    #[doc = "Identifier field"]
2005    pub id: String,
2006    #[doc = "Record creation date"]
2007    pub created_at: String,
2008    #[doc = "Record update date"]
2009    pub updated_at: String,
2010    #[doc = "The worker's ID."]
2011    #[serde(default, skip_serializing_if = "Option::is_none")]
2012    pub worker_id: Option<String>,
2013    #[doc = "The worker's annual compensation. This calculation assumes 40-hour work weeks for \
2014             workers with an hourly wage."]
2015    #[serde(default, skip_serializing_if = "Option::is_none")]
2016    pub annual_compensation: Option<Currency>,
2017    #[doc = "The worker's annual salary equivalent, for insurance purposes. It will be equal to \
2018             the worker's annual compensation, except for owners that are receiving no \
2019             cashcompensation."]
2020    #[serde(default, skip_serializing_if = "Option::is_none")]
2021    pub annual_salary_equivalent: Option<Currency>,
2022    #[doc = "The worker's hourly wage. This calculation assumes 40-hour work weeks for workers \
2023             with fixed compensation."]
2024    #[serde(default, skip_serializing_if = "Option::is_none")]
2025    pub hourly_wage: Option<Currency>,
2026    #[doc = "The worker's monthly compensation. This calculation assumes 40-hour work weeks for \
2027             workers with an hourly wage."]
2028    #[serde(default, skip_serializing_if = "Option::is_none")]
2029    pub monthly_compensation: Option<Currency>,
2030    #[doc = "The worker's on-target commission."]
2031    #[serde(default, skip_serializing_if = "Option::is_none")]
2032    pub on_target_commission: Option<Currency>,
2033    #[doc = "The worker's hourly wage. This calculation assumes 40-hour work weeks for workers \
2034             with fixed compensation."]
2035    #[serde(default, skip_serializing_if = "Option::is_none")]
2036    pub relocation_reimbursement: Option<Currency>,
2037    #[doc = "The worker's signing bonus."]
2038    #[serde(default, skip_serializing_if = "Option::is_none")]
2039    pub signing_bonus: Option<Currency>,
2040    #[doc = "The worker's target annual bonus amount."]
2041    #[serde(default, skip_serializing_if = "Option::is_none")]
2042    pub target_annual_bonus: Option<Currency>,
2043    #[doc = "The worker's weekly compensation. This calculation assumes 40-hour work weeks for \
2044             workers with an hourly wage."]
2045    #[serde(default, skip_serializing_if = "Option::is_none")]
2046    pub weekly_compensation: Option<Currency>,
2047    #[doc = "The worker's target annual bonus as a percent of annual compensation."]
2048    #[serde(default, skip_serializing_if = "Option::is_none")]
2049    pub target_annual_bonus_percent: Option<f64>,
2050    #[doc = "The worker's bonus schedule."]
2051    #[serde(default, skip_serializing_if = "Option::is_none")]
2052    pub bonus_schedule: Option<String>,
2053    #[doc = "The payment type for an worker's compensation."]
2054    #[serde(default, skip_serializing_if = "Option::is_none")]
2055    pub payment_type: Option<String>,
2056    #[doc = "The payment terms for an worker's compensation."]
2057    #[serde(default, skip_serializing_if = "Option::is_none")]
2058    pub payment_terms: Option<String>,
2059}
2060
2061impl std::fmt::Display for Compensation {
2062    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2063        write!(
2064            f,
2065            "{}",
2066            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2067        )
2068    }
2069}
2070
2071#[cfg(feature = "tabled")]
2072impl tabled::Tabled for Compensation {
2073    const LENGTH: usize = 17;
2074    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
2075        vec![
2076            self.id.clone().into(),
2077            self.created_at.clone().into(),
2078            self.updated_at.clone().into(),
2079            if let Some(worker_id) = &self.worker_id {
2080                format!("{:?}", worker_id).into()
2081            } else {
2082                String::new().into()
2083            },
2084            if let Some(annual_compensation) = &self.annual_compensation {
2085                format!("{:?}", annual_compensation).into()
2086            } else {
2087                String::new().into()
2088            },
2089            if let Some(annual_salary_equivalent) = &self.annual_salary_equivalent {
2090                format!("{:?}", annual_salary_equivalent).into()
2091            } else {
2092                String::new().into()
2093            },
2094            if let Some(hourly_wage) = &self.hourly_wage {
2095                format!("{:?}", hourly_wage).into()
2096            } else {
2097                String::new().into()
2098            },
2099            if let Some(monthly_compensation) = &self.monthly_compensation {
2100                format!("{:?}", monthly_compensation).into()
2101            } else {
2102                String::new().into()
2103            },
2104            if let Some(on_target_commission) = &self.on_target_commission {
2105                format!("{:?}", on_target_commission).into()
2106            } else {
2107                String::new().into()
2108            },
2109            if let Some(relocation_reimbursement) = &self.relocation_reimbursement {
2110                format!("{:?}", relocation_reimbursement).into()
2111            } else {
2112                String::new().into()
2113            },
2114            if let Some(signing_bonus) = &self.signing_bonus {
2115                format!("{:?}", signing_bonus).into()
2116            } else {
2117                String::new().into()
2118            },
2119            if let Some(target_annual_bonus) = &self.target_annual_bonus {
2120                format!("{:?}", target_annual_bonus).into()
2121            } else {
2122                String::new().into()
2123            },
2124            if let Some(weekly_compensation) = &self.weekly_compensation {
2125                format!("{:?}", weekly_compensation).into()
2126            } else {
2127                String::new().into()
2128            },
2129            if let Some(target_annual_bonus_percent) = &self.target_annual_bonus_percent {
2130                format!("{:?}", target_annual_bonus_percent).into()
2131            } else {
2132                String::new().into()
2133            },
2134            if let Some(bonus_schedule) = &self.bonus_schedule {
2135                format!("{:?}", bonus_schedule).into()
2136            } else {
2137                String::new().into()
2138            },
2139            if let Some(payment_type) = &self.payment_type {
2140                format!("{:?}", payment_type).into()
2141            } else {
2142                String::new().into()
2143            },
2144            if let Some(payment_terms) = &self.payment_terms {
2145                format!("{:?}", payment_terms).into()
2146            } else {
2147                String::new().into()
2148            },
2149        ]
2150    }
2151
2152    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
2153        vec![
2154            "id".into(),
2155            "created_at".into(),
2156            "updated_at".into(),
2157            "worker_id".into(),
2158            "annual_compensation".into(),
2159            "annual_salary_equivalent".into(),
2160            "hourly_wage".into(),
2161            "monthly_compensation".into(),
2162            "on_target_commission".into(),
2163            "relocation_reimbursement".into(),
2164            "signing_bonus".into(),
2165            "target_annual_bonus".into(),
2166            "weekly_compensation".into(),
2167            "target_annual_bonus_percent".into(),
2168            "bonus_schedule".into(),
2169            "payment_type".into(),
2170            "payment_terms".into(),
2171        ]
2172    }
2173}
2174
2175#[doc = "The code of the country."]
2176#[derive(
2177    serde :: Serialize,
2178    serde :: Deserialize,
2179    PartialEq,
2180    Hash,
2181    Debug,
2182    Clone,
2183    schemars :: JsonSchema,
2184    parse_display :: FromStr,
2185    parse_display :: Display,
2186)]
2187#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
2188#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
2189pub enum Code {
2190    #[serde(rename = "AF")]
2191    #[display("AF")]
2192    Af,
2193    #[serde(rename = "AX")]
2194    #[display("AX")]
2195    Ax,
2196    #[serde(rename = "AL")]
2197    #[display("AL")]
2198    Al,
2199    #[serde(rename = "DZ")]
2200    #[display("DZ")]
2201    Dz,
2202    #[serde(rename = "AS")]
2203    #[display("AS")]
2204    As,
2205    #[serde(rename = "AD")]
2206    #[display("AD")]
2207    Ad,
2208    #[serde(rename = "AO")]
2209    #[display("AO")]
2210    Ao,
2211    #[serde(rename = "AI")]
2212    #[display("AI")]
2213    Ai,
2214    #[serde(rename = "AQ")]
2215    #[display("AQ")]
2216    Aq,
2217    #[serde(rename = "AG")]
2218    #[display("AG")]
2219    Ag,
2220    #[serde(rename = "AR")]
2221    #[display("AR")]
2222    Ar,
2223    #[serde(rename = "AM")]
2224    #[display("AM")]
2225    Am,
2226    #[serde(rename = "AW")]
2227    #[display("AW")]
2228    Aw,
2229    #[serde(rename = "AU")]
2230    #[display("AU")]
2231    Au,
2232    #[serde(rename = "AT")]
2233    #[display("AT")]
2234    At,
2235    #[serde(rename = "AZ")]
2236    #[display("AZ")]
2237    Az,
2238    #[serde(rename = "BS")]
2239    #[display("BS")]
2240    Bs,
2241    #[serde(rename = "BH")]
2242    #[display("BH")]
2243    Bh,
2244    #[serde(rename = "BD")]
2245    #[display("BD")]
2246    Bd,
2247    #[serde(rename = "BB")]
2248    #[display("BB")]
2249    Bb,
2250    #[serde(rename = "BY")]
2251    #[display("BY")]
2252    By,
2253    #[serde(rename = "BE")]
2254    #[display("BE")]
2255    Be,
2256    #[serde(rename = "BZ")]
2257    #[display("BZ")]
2258    Bz,
2259    #[serde(rename = "BJ")]
2260    #[display("BJ")]
2261    Bj,
2262    #[serde(rename = "BM")]
2263    #[display("BM")]
2264    Bm,
2265    #[serde(rename = "BT")]
2266    #[display("BT")]
2267    Bt,
2268    #[serde(rename = "BO")]
2269    #[display("BO")]
2270    Bo,
2271    #[serde(rename = "BQ")]
2272    #[display("BQ")]
2273    Bq,
2274    #[serde(rename = "BA")]
2275    #[display("BA")]
2276    Ba,
2277    #[serde(rename = "BW")]
2278    #[display("BW")]
2279    Bw,
2280    #[serde(rename = "BV")]
2281    #[display("BV")]
2282    Bv,
2283    #[serde(rename = "BR")]
2284    #[display("BR")]
2285    Br,
2286    #[serde(rename = "IO")]
2287    #[display("IO")]
2288    Io,
2289    #[serde(rename = "BN")]
2290    #[display("BN")]
2291    Bn,
2292    #[serde(rename = "BG")]
2293    #[display("BG")]
2294    Bg,
2295    #[serde(rename = "BF")]
2296    #[display("BF")]
2297    Bf,
2298    #[serde(rename = "BI")]
2299    #[display("BI")]
2300    Bi,
2301    #[serde(rename = "CV")]
2302    #[display("CV")]
2303    Cv,
2304    #[serde(rename = "KH")]
2305    #[display("KH")]
2306    Kh,
2307    #[serde(rename = "CM")]
2308    #[display("CM")]
2309    Cm,
2310    #[serde(rename = "CA")]
2311    #[display("CA")]
2312    Ca,
2313    #[serde(rename = "KY")]
2314    #[display("KY")]
2315    Ky,
2316    #[serde(rename = "CF")]
2317    #[display("CF")]
2318    Cf,
2319    #[serde(rename = "TD")]
2320    #[display("TD")]
2321    Td,
2322    #[serde(rename = "CL")]
2323    #[display("CL")]
2324    Cl,
2325    #[serde(rename = "CN")]
2326    #[display("CN")]
2327    Cn,
2328    #[serde(rename = "CX")]
2329    #[display("CX")]
2330    Cx,
2331    #[serde(rename = "CC")]
2332    #[display("CC")]
2333    Cc,
2334    #[serde(rename = "CO")]
2335    #[display("CO")]
2336    Co,
2337    #[serde(rename = "KM")]
2338    #[display("KM")]
2339    Km,
2340    #[serde(rename = "CG")]
2341    #[display("CG")]
2342    Cg,
2343    #[serde(rename = "CD")]
2344    #[display("CD")]
2345    Cd,
2346    #[serde(rename = "CK")]
2347    #[display("CK")]
2348    Ck,
2349    #[serde(rename = "CR")]
2350    #[display("CR")]
2351    Cr,
2352    #[serde(rename = "CI")]
2353    #[display("CI")]
2354    Ci,
2355    #[serde(rename = "HR")]
2356    #[display("HR")]
2357    Hr,
2358    #[serde(rename = "CW")]
2359    #[display("CW")]
2360    Cw,
2361    #[serde(rename = "CY")]
2362    #[display("CY")]
2363    Cy,
2364    #[serde(rename = "CZ")]
2365    #[display("CZ")]
2366    Cz,
2367    #[serde(rename = "DK")]
2368    #[display("DK")]
2369    Dk,
2370    #[serde(rename = "DJ")]
2371    #[display("DJ")]
2372    Dj,
2373    #[serde(rename = "DM")]
2374    #[display("DM")]
2375    Dm,
2376    #[serde(rename = "DO")]
2377    #[display("DO")]
2378    Do,
2379    #[serde(rename = "EC")]
2380    #[display("EC")]
2381    Ec,
2382    #[serde(rename = "EG")]
2383    #[display("EG")]
2384    Eg,
2385    #[serde(rename = "SV")]
2386    #[display("SV")]
2387    Sv,
2388    #[serde(rename = "GQ")]
2389    #[display("GQ")]
2390    Gq,
2391    #[serde(rename = "ER")]
2392    #[display("ER")]
2393    Er,
2394    #[serde(rename = "EE")]
2395    #[display("EE")]
2396    Ee,
2397    #[serde(rename = "SZ")]
2398    #[display("SZ")]
2399    Sz,
2400    #[serde(rename = "ET")]
2401    #[display("ET")]
2402    Et,
2403    #[serde(rename = "FK")]
2404    #[display("FK")]
2405    Fk,
2406    #[serde(rename = "FO")]
2407    #[display("FO")]
2408    Fo,
2409    #[serde(rename = "FJ")]
2410    #[display("FJ")]
2411    Fj,
2412    #[serde(rename = "FI")]
2413    #[display("FI")]
2414    Fi,
2415    #[serde(rename = "FR")]
2416    #[display("FR")]
2417    Fr,
2418    #[serde(rename = "GF")]
2419    #[display("GF")]
2420    Gf,
2421    #[serde(rename = "PF")]
2422    #[display("PF")]
2423    Pf,
2424    #[serde(rename = "TF")]
2425    #[display("TF")]
2426    Tf,
2427    #[serde(rename = "GA")]
2428    #[display("GA")]
2429    Ga,
2430    #[serde(rename = "GM")]
2431    #[display("GM")]
2432    Gm,
2433    #[serde(rename = "GE")]
2434    #[display("GE")]
2435    Ge,
2436    #[serde(rename = "DE")]
2437    #[display("DE")]
2438    De,
2439    #[serde(rename = "GH")]
2440    #[display("GH")]
2441    Gh,
2442    #[serde(rename = "GI")]
2443    #[display("GI")]
2444    Gi,
2445    #[serde(rename = "GR")]
2446    #[display("GR")]
2447    Gr,
2448    #[serde(rename = "GL")]
2449    #[display("GL")]
2450    Gl,
2451    #[serde(rename = "GD")]
2452    #[display("GD")]
2453    Gd,
2454    #[serde(rename = "GP")]
2455    #[display("GP")]
2456    Gp,
2457    #[serde(rename = "GU")]
2458    #[display("GU")]
2459    Gu,
2460    #[serde(rename = "GT")]
2461    #[display("GT")]
2462    Gt,
2463    #[serde(rename = "GG")]
2464    #[display("GG")]
2465    Gg,
2466    #[serde(rename = "GN")]
2467    #[display("GN")]
2468    Gn,
2469    #[serde(rename = "GW")]
2470    #[display("GW")]
2471    Gw,
2472    #[serde(rename = "GY")]
2473    #[display("GY")]
2474    Gy,
2475    #[serde(rename = "HT")]
2476    #[display("HT")]
2477    Ht,
2478    #[serde(rename = "HM")]
2479    #[display("HM")]
2480    Hm,
2481    #[serde(rename = "VA")]
2482    #[display("VA")]
2483    Va,
2484    #[serde(rename = "HN")]
2485    #[display("HN")]
2486    Hn,
2487    #[serde(rename = "HK")]
2488    #[display("HK")]
2489    Hk,
2490    #[serde(rename = "HU")]
2491    #[display("HU")]
2492    Hu,
2493    #[serde(rename = "IS")]
2494    #[display("IS")]
2495    Is,
2496    #[serde(rename = "IN")]
2497    #[display("IN")]
2498    In,
2499    #[serde(rename = "ID")]
2500    #[display("ID")]
2501    Id,
2502    #[serde(rename = "IQ")]
2503    #[display("IQ")]
2504    Iq,
2505    #[serde(rename = "IE")]
2506    #[display("IE")]
2507    Ie,
2508    #[serde(rename = "IM")]
2509    #[display("IM")]
2510    Im,
2511    #[serde(rename = "IL")]
2512    #[display("IL")]
2513    Il,
2514    #[serde(rename = "IT")]
2515    #[display("IT")]
2516    It,
2517    #[serde(rename = "JM")]
2518    #[display("JM")]
2519    Jm,
2520    #[serde(rename = "JP")]
2521    #[display("JP")]
2522    Jp,
2523    #[serde(rename = "JE")]
2524    #[display("JE")]
2525    Je,
2526    #[serde(rename = "JO")]
2527    #[display("JO")]
2528    Jo,
2529    #[serde(rename = "KZ")]
2530    #[display("KZ")]
2531    Kz,
2532    #[serde(rename = "KE")]
2533    #[display("KE")]
2534    Ke,
2535    #[serde(rename = "KI")]
2536    #[display("KI")]
2537    Ki,
2538    #[serde(rename = "KR")]
2539    #[display("KR")]
2540    Kr,
2541    #[serde(rename = "XK")]
2542    #[display("XK")]
2543    Xk,
2544    #[serde(rename = "KW")]
2545    #[display("KW")]
2546    Kw,
2547    #[serde(rename = "KG")]
2548    #[display("KG")]
2549    Kg,
2550    #[serde(rename = "LA")]
2551    #[display("LA")]
2552    La,
2553    #[serde(rename = "LV")]
2554    #[display("LV")]
2555    Lv,
2556    #[serde(rename = "LB")]
2557    #[display("LB")]
2558    Lb,
2559    #[serde(rename = "LS")]
2560    #[display("LS")]
2561    Ls,
2562    #[serde(rename = "LR")]
2563    #[display("LR")]
2564    Lr,
2565    #[serde(rename = "LY")]
2566    #[display("LY")]
2567    Ly,
2568    #[serde(rename = "LI")]
2569    #[display("LI")]
2570    Li,
2571    #[serde(rename = "LT")]
2572    #[display("LT")]
2573    Lt,
2574    #[serde(rename = "LU")]
2575    #[display("LU")]
2576    Lu,
2577    #[serde(rename = "MO")]
2578    #[display("MO")]
2579    Mo,
2580    #[serde(rename = "MG")]
2581    #[display("MG")]
2582    Mg,
2583    #[serde(rename = "MW")]
2584    #[display("MW")]
2585    Mw,
2586    #[serde(rename = "MY")]
2587    #[display("MY")]
2588    My,
2589    #[serde(rename = "MV")]
2590    #[display("MV")]
2591    Mv,
2592    #[serde(rename = "ML")]
2593    #[display("ML")]
2594    Ml,
2595    #[serde(rename = "MT")]
2596    #[display("MT")]
2597    Mt,
2598    #[serde(rename = "MH")]
2599    #[display("MH")]
2600    Mh,
2601    #[serde(rename = "MQ")]
2602    #[display("MQ")]
2603    Mq,
2604    #[serde(rename = "MR")]
2605    #[display("MR")]
2606    Mr,
2607    #[serde(rename = "MU")]
2608    #[display("MU")]
2609    Mu,
2610    #[serde(rename = "YT")]
2611    #[display("YT")]
2612    Yt,
2613    #[serde(rename = "MX")]
2614    #[display("MX")]
2615    Mx,
2616    #[serde(rename = "FM")]
2617    #[display("FM")]
2618    Fm,
2619    #[serde(rename = "MD")]
2620    #[display("MD")]
2621    Md,
2622    #[serde(rename = "MC")]
2623    #[display("MC")]
2624    Mc,
2625    #[serde(rename = "MN")]
2626    #[display("MN")]
2627    Mn,
2628    #[serde(rename = "ME")]
2629    #[display("ME")]
2630    Me,
2631    #[serde(rename = "MS")]
2632    #[display("MS")]
2633    Ms,
2634    #[serde(rename = "MA")]
2635    #[display("MA")]
2636    Ma,
2637    #[serde(rename = "MZ")]
2638    #[display("MZ")]
2639    Mz,
2640    #[serde(rename = "MM")]
2641    #[display("MM")]
2642    Mm,
2643    #[serde(rename = "NA")]
2644    #[display("NA")]
2645    Na,
2646    #[serde(rename = "NR")]
2647    #[display("NR")]
2648    Nr,
2649    #[serde(rename = "NP")]
2650    #[display("NP")]
2651    Np,
2652    #[serde(rename = "NL")]
2653    #[display("NL")]
2654    Nl,
2655    #[serde(rename = "AN")]
2656    #[display("AN")]
2657    An,
2658    #[serde(rename = "NC")]
2659    #[display("NC")]
2660    Nc,
2661    #[serde(rename = "NZ")]
2662    #[display("NZ")]
2663    Nz,
2664    #[serde(rename = "NI")]
2665    #[display("NI")]
2666    Ni,
2667    #[serde(rename = "NE")]
2668    #[display("NE")]
2669    Ne,
2670    #[serde(rename = "NG")]
2671    #[display("NG")]
2672    Ng,
2673    #[serde(rename = "NU")]
2674    #[display("NU")]
2675    Nu,
2676    #[serde(rename = "NF")]
2677    #[display("NF")]
2678    Nf,
2679    #[serde(rename = "MK")]
2680    #[display("MK")]
2681    Mk,
2682    #[serde(rename = "MP")]
2683    #[display("MP")]
2684    Mp,
2685    #[serde(rename = "NO")]
2686    #[display("NO")]
2687    No,
2688    #[serde(rename = "OM")]
2689    #[display("OM")]
2690    Om,
2691    #[serde(rename = "PK")]
2692    #[display("PK")]
2693    Pk,
2694    #[serde(rename = "PW")]
2695    #[display("PW")]
2696    Pw,
2697    #[serde(rename = "PS")]
2698    #[display("PS")]
2699    Ps,
2700    #[serde(rename = "PA")]
2701    #[display("PA")]
2702    Pa,
2703    #[serde(rename = "PG")]
2704    #[display("PG")]
2705    Pg,
2706    #[serde(rename = "PY")]
2707    #[display("PY")]
2708    Py,
2709    #[serde(rename = "PE")]
2710    #[display("PE")]
2711    Pe,
2712    #[serde(rename = "PH")]
2713    #[display("PH")]
2714    Ph,
2715    #[serde(rename = "PN")]
2716    #[display("PN")]
2717    Pn,
2718    #[serde(rename = "PL")]
2719    #[display("PL")]
2720    Pl,
2721    #[serde(rename = "PT")]
2722    #[display("PT")]
2723    Pt,
2724    #[serde(rename = "PR")]
2725    #[display("PR")]
2726    Pr,
2727    #[serde(rename = "QA")]
2728    #[display("QA")]
2729    Qa,
2730    #[serde(rename = "RO")]
2731    #[display("RO")]
2732    Ro,
2733    #[serde(rename = "RU")]
2734    #[display("RU")]
2735    Ru,
2736    #[serde(rename = "RW")]
2737    #[display("RW")]
2738    Rw,
2739    #[serde(rename = "RE")]
2740    #[display("RE")]
2741    Re,
2742    #[serde(rename = "BL")]
2743    #[display("BL")]
2744    Bl,
2745    #[serde(rename = "SH")]
2746    #[display("SH")]
2747    Sh,
2748    #[serde(rename = "KN")]
2749    #[display("KN")]
2750    Kn,
2751    #[serde(rename = "LC")]
2752    #[display("LC")]
2753    Lc,
2754    #[serde(rename = "MF")]
2755    #[display("MF")]
2756    Mf,
2757    #[serde(rename = "PM")]
2758    #[display("PM")]
2759    Pm,
2760    #[serde(rename = "VC")]
2761    #[display("VC")]
2762    Vc,
2763    #[serde(rename = "WS")]
2764    #[display("WS")]
2765    Ws,
2766    #[serde(rename = "SM")]
2767    #[display("SM")]
2768    Sm,
2769    #[serde(rename = "ST")]
2770    #[display("ST")]
2771    St,
2772    #[serde(rename = "SA")]
2773    #[display("SA")]
2774    Sa,
2775    #[serde(rename = "SN")]
2776    #[display("SN")]
2777    Sn,
2778    #[serde(rename = "RS")]
2779    #[display("RS")]
2780    Rs,
2781    #[serde(rename = "SC")]
2782    #[display("SC")]
2783    Sc,
2784    #[serde(rename = "SL")]
2785    #[display("SL")]
2786    Sl,
2787    #[serde(rename = "SG")]
2788    #[display("SG")]
2789    Sg,
2790    #[serde(rename = "SX")]
2791    #[display("SX")]
2792    Sx,
2793    #[serde(rename = "SK")]
2794    #[display("SK")]
2795    Sk,
2796    #[serde(rename = "SI")]
2797    #[display("SI")]
2798    Si,
2799    #[serde(rename = "SB")]
2800    #[display("SB")]
2801    Sb,
2802    #[serde(rename = "SO")]
2803    #[display("SO")]
2804    So,
2805    #[serde(rename = "ZA")]
2806    #[display("ZA")]
2807    Za,
2808    #[serde(rename = "GS")]
2809    #[display("GS")]
2810    Gs,
2811    #[serde(rename = "SS")]
2812    #[display("SS")]
2813    Ss,
2814    #[serde(rename = "ES")]
2815    #[display("ES")]
2816    Es,
2817    #[serde(rename = "LK")]
2818    #[display("LK")]
2819    Lk,
2820    #[serde(rename = "SD")]
2821    #[display("SD")]
2822    Sd,
2823    #[serde(rename = "SR")]
2824    #[display("SR")]
2825    Sr,
2826    #[serde(rename = "SJ")]
2827    #[display("SJ")]
2828    Sj,
2829    #[serde(rename = "SE")]
2830    #[display("SE")]
2831    Se,
2832    #[serde(rename = "CH")]
2833    #[display("CH")]
2834    Ch,
2835    #[serde(rename = "TW")]
2836    #[display("TW")]
2837    Tw,
2838    #[serde(rename = "TJ")]
2839    #[display("TJ")]
2840    Tj,
2841    #[serde(rename = "TZ")]
2842    #[display("TZ")]
2843    Tz,
2844    #[serde(rename = "TH")]
2845    #[display("TH")]
2846    Th,
2847    #[serde(rename = "TL")]
2848    #[display("TL")]
2849    Tl,
2850    #[serde(rename = "TG")]
2851    #[display("TG")]
2852    Tg,
2853    #[serde(rename = "TK")]
2854    #[display("TK")]
2855    Tk,
2856    #[serde(rename = "TO")]
2857    #[display("TO")]
2858    To,
2859    #[serde(rename = "TT")]
2860    #[display("TT")]
2861    Tt,
2862    #[serde(rename = "TN")]
2863    #[display("TN")]
2864    Tn,
2865    #[serde(rename = "TR")]
2866    #[display("TR")]
2867    Tr,
2868    #[serde(rename = "TM")]
2869    #[display("TM")]
2870    Tm,
2871    #[serde(rename = "TC")]
2872    #[display("TC")]
2873    Tc,
2874    #[serde(rename = "TV")]
2875    #[display("TV")]
2876    Tv,
2877    #[serde(rename = "UG")]
2878    #[display("UG")]
2879    Ug,
2880    #[serde(rename = "UA")]
2881    #[display("UA")]
2882    Ua,
2883    #[serde(rename = "AE")]
2884    #[display("AE")]
2885    Ae,
2886    #[serde(rename = "GB")]
2887    #[display("GB")]
2888    Gb,
2889    #[serde(rename = "US")]
2890    #[display("US")]
2891    Us,
2892    #[serde(rename = "UM")]
2893    #[display("UM")]
2894    Um,
2895    #[serde(rename = "UY")]
2896    #[display("UY")]
2897    Uy,
2898    #[serde(rename = "UZ")]
2899    #[display("UZ")]
2900    Uz,
2901    #[serde(rename = "VU")]
2902    #[display("VU")]
2903    Vu,
2904    #[serde(rename = "VE")]
2905    #[display("VE")]
2906    Ve,
2907    #[serde(rename = "VN")]
2908    #[display("VN")]
2909    Vn,
2910    #[serde(rename = "VG")]
2911    #[display("VG")]
2912    Vg,
2913    #[serde(rename = "VI")]
2914    #[display("VI")]
2915    Vi,
2916    #[serde(rename = "WF")]
2917    #[display("WF")]
2918    Wf,
2919    #[serde(rename = "EH")]
2920    #[display("EH")]
2921    Eh,
2922    #[serde(rename = "YE")]
2923    #[display("YE")]
2924    Ye,
2925    #[serde(rename = "ZM")]
2926    #[display("ZM")]
2927    Zm,
2928    #[serde(rename = "ZW")]
2929    #[display("ZW")]
2930    Zw,
2931}
2932
2933#[doc = "Country."]
2934#[derive(
2935    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
2936)]
2937pub struct Country {
2938    #[doc = "The code of the country."]
2939    pub code: Code,
2940}
2941
2942impl std::fmt::Display for Country {
2943    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2944        write!(
2945            f,
2946            "{}",
2947            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2948        )
2949    }
2950}
2951
2952#[cfg(feature = "tabled")]
2953impl tabled::Tabled for Country {
2954    const LENGTH: usize = 1;
2955    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
2956        vec![format!("{:?}", self.code).into()]
2957    }
2958
2959    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
2960        vec!["code".into()]
2961    }
2962}
2963
2964#[doc = "Currency."]
2965#[derive(
2966    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
2967)]
2968pub struct Currency {
2969    #[doc = "The currency type, ex: USD, EUR, etc."]
2970    #[serde(default, skip_serializing_if = "Option::is_none")]
2971    pub currency_type: Option<String>,
2972    #[doc = "The decimal amount for the currency."]
2973    #[serde(default, skip_serializing_if = "Option::is_none")]
2974    pub value: Option<f64>,
2975}
2976
2977impl std::fmt::Display for Currency {
2978    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2979        write!(
2980            f,
2981            "{}",
2982            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2983        )
2984    }
2985}
2986
2987#[cfg(feature = "tabled")]
2988impl tabled::Tabled for Currency {
2989    const LENGTH: usize = 2;
2990    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
2991        vec![
2992            if let Some(currency_type) = &self.currency_type {
2993                format!("{:?}", currency_type).into()
2994            } else {
2995                String::new().into()
2996            },
2997            if let Some(value) = &self.value {
2998                format!("{:?}", value).into()
2999            } else {
3000                String::new().into()
3001            },
3002        ]
3003    }
3004
3005    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3006        vec!["currency_type".into(), "value".into()]
3007    }
3008}
3009
3010#[doc = "The data type of the custom field."]
3011#[derive(
3012    serde :: Serialize,
3013    serde :: Deserialize,
3014    PartialEq,
3015    Hash,
3016    Debug,
3017    Clone,
3018    schemars :: JsonSchema,
3019    parse_display :: FromStr,
3020    parse_display :: Display,
3021)]
3022#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
3023#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
3024pub enum CustomFieldType {
3025    #[serde(rename = "TEXT")]
3026    #[display("TEXT")]
3027    Text,
3028    #[serde(rename = "DATE")]
3029    #[display("DATE")]
3030    Date,
3031    #[serde(rename = "NUMBER")]
3032    #[display("NUMBER")]
3033    Number,
3034    #[serde(rename = "CURRENCY")]
3035    #[display("CURRENCY")]
3036    Currency,
3037    #[serde(rename = "PERCENTAGE")]
3038    #[display("PERCENTAGE")]
3039    Percentage,
3040    #[serde(rename = "SELECT")]
3041    #[display("SELECT")]
3042    Select,
3043    #[serde(rename = "FILE")]
3044    #[display("FILE")]
3045    File,
3046    #[serde(rename = "ID")]
3047    #[display("ID")]
3048    Id,
3049    #[serde(rename = "RADIO")]
3050    #[display("RADIO")]
3051    Radio,
3052    #[serde(rename = "TEXTAREA")]
3053    #[display("TEXTAREA")]
3054    Textarea,
3055    #[serde(rename = "RANGE")]
3056    #[display("RANGE")]
3057    Range,
3058    #[serde(rename = "REFERENCE_ID")]
3059    #[display("REFERENCE_ID")]
3060    ReferenceId,
3061    #[serde(rename = "BOOLEAN")]
3062    #[display("BOOLEAN")]
3063    Boolean,
3064    #[serde(rename = "ADDRESS")]
3065    #[display("ADDRESS")]
3066    Address,
3067    #[serde(rename = "OG_REFERENCE_FIELD")]
3068    #[display("OG_REFERENCE_FIELD")]
3069    OgReferenceField,
3070    #[serde(rename = "NATIVE_EDGE")]
3071    #[display("NATIVE_EDGE")]
3072    NativeEdge,
3073    #[serde(rename = "DATETIME")]
3074    #[display("DATETIME")]
3075    Datetime,
3076    #[serde(rename = "EMAIL")]
3077    #[display("EMAIL")]
3078    Email,
3079    #[serde(rename = "URL")]
3080    #[display("URL")]
3081    Url,
3082}
3083
3084#[doc = "CustomField."]
3085#[derive(
3086    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3087)]
3088pub struct CustomField {
3089    #[doc = "Identifier field"]
3090    pub id: String,
3091    #[doc = "Record creation date"]
3092    pub created_at: String,
3093    #[doc = "Record update date"]
3094    pub updated_at: String,
3095    #[doc = "The name of the custom field."]
3096    pub name: String,
3097    #[doc = "The description of the custom field."]
3098    #[serde(default, skip_serializing_if = "Option::is_none")]
3099    pub description: Option<String>,
3100    #[doc = "Whether the custom field is required."]
3101    #[serde(default, skip_serializing_if = "Option::is_none")]
3102    pub required: Option<bool>,
3103    #[doc = "The data type of the custom field."]
3104    #[serde(rename = "type")]
3105    pub type_: CustomFieldType,
3106}
3107
3108impl std::fmt::Display for CustomField {
3109    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3110        write!(
3111            f,
3112            "{}",
3113            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3114        )
3115    }
3116}
3117
3118#[cfg(feature = "tabled")]
3119impl tabled::Tabled for CustomField {
3120    const LENGTH: usize = 7;
3121    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3122        vec![
3123            self.id.clone().into(),
3124            self.created_at.clone().into(),
3125            self.updated_at.clone().into(),
3126            self.name.clone().into(),
3127            if let Some(description) = &self.description {
3128                format!("{:?}", description).into()
3129            } else {
3130                String::new().into()
3131            },
3132            if let Some(required) = &self.required {
3133                format!("{:?}", required).into()
3134            } else {
3135                String::new().into()
3136            },
3137            format!("{:?}", self.type_).into(),
3138        ]
3139    }
3140
3141    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3142        vec![
3143            "id".into(),
3144            "created_at".into(),
3145            "updated_at".into(),
3146            "name".into(),
3147            "description".into(),
3148            "required".into(),
3149            "type_".into(),
3150        ]
3151    }
3152}
3153
3154#[doc = "CustomObject."]
3155#[derive(
3156    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3157)]
3158pub struct CustomObject {
3159    #[doc = "Identifier field"]
3160    pub id: String,
3161    #[doc = "Record creation date"]
3162    pub created_at: String,
3163    #[doc = "Record update date"]
3164    pub updated_at: String,
3165    #[doc = "The name of the custom object"]
3166    pub name: String,
3167    #[doc = "The description of the custom object"]
3168    #[serde(default, skip_serializing_if = "Option::is_none")]
3169    pub description: Option<String>,
3170    #[doc = "The api name of the custom object"]
3171    #[serde(default, skip_serializing_if = "Option::is_none")]
3172    pub api_name: Option<String>,
3173    #[doc = "The plural label of the custom object"]
3174    pub plural_label: String,
3175    #[doc = "The category of the custom object"]
3176    pub category_id: String,
3177    #[doc = "The native category of the custom object if belongs to"]
3178    #[serde(default, skip_serializing_if = "Option::is_none")]
3179    pub native_category_id: Option<String>,
3180    #[doc = "The id of the package which the custom object belongs to"]
3181    #[serde(default, skip_serializing_if = "Option::is_none")]
3182    pub managed_package_install_id: Option<String>,
3183    #[doc = "Whether to record the history of the custom object"]
3184    pub enable_history: bool,
3185    #[doc = "The id of the owner for the custom object"]
3186    #[serde(default, skip_serializing_if = "Option::is_none")]
3187    pub owner_id: Option<String>,
3188}
3189
3190impl std::fmt::Display for CustomObject {
3191    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3192        write!(
3193            f,
3194            "{}",
3195            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3196        )
3197    }
3198}
3199
3200#[cfg(feature = "tabled")]
3201impl tabled::Tabled for CustomObject {
3202    const LENGTH: usize = 12;
3203    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3204        vec![
3205            self.id.clone().into(),
3206            self.created_at.clone().into(),
3207            self.updated_at.clone().into(),
3208            self.name.clone().into(),
3209            if let Some(description) = &self.description {
3210                format!("{:?}", description).into()
3211            } else {
3212                String::new().into()
3213            },
3214            if let Some(api_name) = &self.api_name {
3215                format!("{:?}", api_name).into()
3216            } else {
3217                String::new().into()
3218            },
3219            self.plural_label.clone().into(),
3220            self.category_id.clone().into(),
3221            if let Some(native_category_id) = &self.native_category_id {
3222                format!("{:?}", native_category_id).into()
3223            } else {
3224                String::new().into()
3225            },
3226            if let Some(managed_package_install_id) = &self.managed_package_install_id {
3227                format!("{:?}", managed_package_install_id).into()
3228            } else {
3229                String::new().into()
3230            },
3231            format!("{:?}", self.enable_history).into(),
3232            if let Some(owner_id) = &self.owner_id {
3233                format!("{:?}", owner_id).into()
3234            } else {
3235                String::new().into()
3236            },
3237        ]
3238    }
3239
3240    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3241        vec![
3242            "id".into(),
3243            "created_at".into(),
3244            "updated_at".into(),
3245            "name".into(),
3246            "description".into(),
3247            "api_name".into(),
3248            "plural_label".into(),
3249            "category_id".into(),
3250            "native_category_id".into(),
3251            "managed_package_install_id".into(),
3252            "enable_history".into(),
3253            "owner_id".into(),
3254        ]
3255    }
3256}
3257
3258#[doc = "CustomObjectDataRow."]
3259#[derive(
3260    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3261)]
3262pub struct CustomObjectDataRow {
3263    #[doc = "Identifier field"]
3264    pub id: String,
3265    #[doc = "Record creation date"]
3266    pub created_at: String,
3267    #[doc = "Record update date"]
3268    pub updated_at: String,
3269    #[doc = "The name of the custom object datarow"]
3270    pub name: String,
3271    #[doc = "The external id of the custom object datarow"]
3272    #[serde(default, skip_serializing_if = "Option::is_none")]
3273    pub external_id: Option<String>,
3274    #[doc = "The owner id of the custom object datarow"]
3275    #[serde(default, skip_serializing_if = "Option::is_none")]
3276    pub owner_role_id: Option<String>,
3277    #[doc = "The id of the role who created the custom object datarow"]
3278    #[serde(default, skip_serializing_if = "Option::is_none")]
3279    pub created_by: Option<String>,
3280    #[doc = "The id of the role who made changes to the custom object datarow lastly"]
3281    #[serde(default, skip_serializing_if = "Option::is_none")]
3282    pub last_modified_by: Option<String>,
3283}
3284
3285impl std::fmt::Display for CustomObjectDataRow {
3286    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3287        write!(
3288            f,
3289            "{}",
3290            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3291        )
3292    }
3293}
3294
3295#[cfg(feature = "tabled")]
3296impl tabled::Tabled for CustomObjectDataRow {
3297    const LENGTH: usize = 8;
3298    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3299        vec![
3300            self.id.clone().into(),
3301            self.created_at.clone().into(),
3302            self.updated_at.clone().into(),
3303            self.name.clone().into(),
3304            if let Some(external_id) = &self.external_id {
3305                format!("{:?}", external_id).into()
3306            } else {
3307                String::new().into()
3308            },
3309            if let Some(owner_role_id) = &self.owner_role_id {
3310                format!("{:?}", owner_role_id).into()
3311            } else {
3312                String::new().into()
3313            },
3314            if let Some(created_by) = &self.created_by {
3315                format!("{:?}", created_by).into()
3316            } else {
3317                String::new().into()
3318            },
3319            if let Some(last_modified_by) = &self.last_modified_by {
3320                format!("{:?}", last_modified_by).into()
3321            } else {
3322                String::new().into()
3323            },
3324        ]
3325    }
3326
3327    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3328        vec![
3329            "id".into(),
3330            "created_at".into(),
3331            "updated_at".into(),
3332            "name".into(),
3333            "external_id".into(),
3334            "owner_role_id".into(),
3335            "created_by".into(),
3336            "last_modified_by".into(),
3337        ]
3338    }
3339}
3340
3341#[doc = "CustomObjectField."]
3342#[derive(
3343    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3344)]
3345pub struct CustomObjectField {
3346    #[doc = "Identifier field"]
3347    pub id: String,
3348    #[doc = "Record creation date"]
3349    pub created_at: String,
3350    #[doc = "Record update date"]
3351    pub updated_at: String,
3352    #[doc = "The name of the custom object field"]
3353    pub name: String,
3354    #[doc = "The custom object which the field belongs to"]
3355    pub custom_object: String,
3356    #[doc = "The description of the custom object field"]
3357    #[serde(default, skip_serializing_if = "Option::is_none")]
3358    pub description: Option<String>,
3359    #[doc = "The api name of the custom object field"]
3360    pub api_name: String,
3361    #[doc = "This field specifies whether a particular column value has unique values"]
3362    pub is_unique: bool,
3363    #[doc = "whether the field is imuatable"]
3364    pub is_immutable: bool,
3365    #[doc = "whether the field is standard field"]
3366    pub is_standard: bool,
3367    #[doc = "The id of the package which the custom object field belongs to"]
3368    #[serde(default, skip_serializing_if = "Option::is_none")]
3369    pub managed_package_install_id: Option<String>,
3370    #[doc = "whether the history is enable for the field"]
3371    pub enable_history: bool,
3372}
3373
3374impl std::fmt::Display for CustomObjectField {
3375    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3376        write!(
3377            f,
3378            "{}",
3379            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3380        )
3381    }
3382}
3383
3384#[cfg(feature = "tabled")]
3385impl tabled::Tabled for CustomObjectField {
3386    const LENGTH: usize = 12;
3387    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3388        vec![
3389            self.id.clone().into(),
3390            self.created_at.clone().into(),
3391            self.updated_at.clone().into(),
3392            self.name.clone().into(),
3393            self.custom_object.clone().into(),
3394            if let Some(description) = &self.description {
3395                format!("{:?}", description).into()
3396            } else {
3397                String::new().into()
3398            },
3399            self.api_name.clone().into(),
3400            format!("{:?}", self.is_unique).into(),
3401            format!("{:?}", self.is_immutable).into(),
3402            format!("{:?}", self.is_standard).into(),
3403            if let Some(managed_package_install_id) = &self.managed_package_install_id {
3404                format!("{:?}", managed_package_install_id).into()
3405            } else {
3406                String::new().into()
3407            },
3408            format!("{:?}", self.enable_history).into(),
3409        ]
3410    }
3411
3412    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3413        vec![
3414            "id".into(),
3415            "created_at".into(),
3416            "updated_at".into(),
3417            "name".into(),
3418            "custom_object".into(),
3419            "description".into(),
3420            "api_name".into(),
3421            "is_unique".into(),
3422            "is_immutable".into(),
3423            "is_standard".into(),
3424            "managed_package_install_id".into(),
3425            "enable_history".into(),
3426        ]
3427    }
3428}
3429
3430#[doc = "DayOff."]
3431#[derive(
3432    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3433)]
3434pub struct DayOff {
3435    #[doc = "The date of the day off."]
3436    pub date: String,
3437    #[doc = "The number of minutes taken off for the day."]
3438    pub number_of_minutes_taken_off: f64,
3439}
3440
3441impl std::fmt::Display for DayOff {
3442    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3443        write!(
3444            f,
3445            "{}",
3446            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3447        )
3448    }
3449}
3450
3451#[cfg(feature = "tabled")]
3452impl tabled::Tabled for DayOff {
3453    const LENGTH: usize = 2;
3454    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3455        vec![
3456            self.date.clone().into(),
3457            format!("{:?}", self.number_of_minutes_taken_off).into(),
3458        ]
3459    }
3460
3461    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3462        vec!["date".into(), "number_of_minutes_taken_off".into()]
3463    }
3464}
3465
3466#[doc = "Department."]
3467#[derive(
3468    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3469)]
3470pub struct Department {
3471    #[doc = "Identifier field"]
3472    pub id: String,
3473    #[doc = "Record creation date"]
3474    pub created_at: String,
3475    #[doc = "Record update date"]
3476    pub updated_at: String,
3477    #[doc = "The name of the department."]
3478    pub name: String,
3479    #[doc = "The parent department."]
3480    #[serde(default, skip_serializing_if = "Option::is_none")]
3481    pub parent_id: Option<String>,
3482    #[doc = "The parent department.\n\nExpandable field"]
3483    #[serde(default, skip_serializing_if = "Option::is_none")]
3484    pub parent: Option<Box<Department>>,
3485    #[doc = "Reference code of the department."]
3486    #[serde(default, skip_serializing_if = "Option::is_none")]
3487    pub reference_code: Option<String>,
3488}
3489
3490impl std::fmt::Display for Department {
3491    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3492        write!(
3493            f,
3494            "{}",
3495            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3496        )
3497    }
3498}
3499
3500#[cfg(feature = "tabled")]
3501impl tabled::Tabled for Department {
3502    const LENGTH: usize = 7;
3503    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3504        vec![
3505            self.id.clone().into(),
3506            self.created_at.clone().into(),
3507            self.updated_at.clone().into(),
3508            self.name.clone().into(),
3509            if let Some(parent_id) = &self.parent_id {
3510                format!("{:?}", parent_id).into()
3511            } else {
3512                String::new().into()
3513            },
3514            if let Some(parent) = &self.parent {
3515                format!("{:?}", parent).into()
3516            } else {
3517                String::new().into()
3518            },
3519            if let Some(reference_code) = &self.reference_code {
3520                format!("{:?}", reference_code).into()
3521            } else {
3522                String::new().into()
3523            },
3524        ]
3525    }
3526
3527    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3528        vec![
3529            "id".into(),
3530            "created_at".into(),
3531            "updated_at".into(),
3532            "name".into(),
3533            "parent_id".into(),
3534            "parent".into(),
3535            "reference_code".into(),
3536        ]
3537    }
3538}
3539
3540#[doc = "The classification of the email."]
3541#[derive(
3542    serde :: Serialize,
3543    serde :: Deserialize,
3544    PartialEq,
3545    Hash,
3546    Debug,
3547    Clone,
3548    schemars :: JsonSchema,
3549    parse_display :: FromStr,
3550    parse_display :: Display,
3551)]
3552#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
3553#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
3554pub enum EmailType {
3555    #[serde(rename = "HOME")]
3556    #[display("HOME")]
3557    Home,
3558    #[serde(rename = "WORK")]
3559    #[display("WORK")]
3560    Work,
3561    #[serde(rename = "OTHER")]
3562    #[display("OTHER")]
3563    Other,
3564}
3565
3566#[doc = "Email."]
3567#[derive(
3568    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3569)]
3570pub struct Email {
3571    #[doc = "A valid email address."]
3572    #[serde(default, skip_serializing_if = "Option::is_none")]
3573    pub value: Option<String>,
3574    #[doc = "The classification of the email."]
3575    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
3576    pub type_: Option<EmailType>,
3577    #[doc = "The display value of the email address."]
3578    #[serde(default, skip_serializing_if = "Option::is_none")]
3579    pub display: Option<String>,
3580}
3581
3582impl std::fmt::Display for Email {
3583    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3584        write!(
3585            f,
3586            "{}",
3587            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3588        )
3589    }
3590}
3591
3592#[cfg(feature = "tabled")]
3593impl tabled::Tabled for Email {
3594    const LENGTH: usize = 3;
3595    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3596        vec![
3597            if let Some(value) = &self.value {
3598                format!("{:?}", value).into()
3599            } else {
3600                String::new().into()
3601            },
3602            if let Some(type_) = &self.type_ {
3603                format!("{:?}", type_).into()
3604            } else {
3605                String::new().into()
3606            },
3607            if let Some(display) = &self.display {
3608                format!("{:?}", display).into()
3609            } else {
3610                String::new().into()
3611            },
3612        ]
3613    }
3614
3615    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3616        vec!["value".into(), "type_".into(), "display".into()]
3617    }
3618}
3619
3620#[doc = "EntitlementModel."]
3621#[derive(
3622    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3623)]
3624pub struct EntitlementModel {
3625    #[doc = "Identifier field"]
3626    pub id: String,
3627    #[doc = "Description of the entitlement"]
3628    pub description: String,
3629    #[doc = "Display name of the entitlement"]
3630    pub display_name: String,
3631}
3632
3633impl std::fmt::Display for EntitlementModel {
3634    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3635        write!(
3636            f,
3637            "{}",
3638            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3639        )
3640    }
3641}
3642
3643#[cfg(feature = "tabled")]
3644impl tabled::Tabled for EntitlementModel {
3645    const LENGTH: usize = 3;
3646    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3647        vec![
3648            self.id.clone().into(),
3649            self.description.clone().into(),
3650            self.display_name.clone().into(),
3651        ]
3652    }
3653
3654    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3655        vec!["id".into(), "description".into(), "display_name".into()]
3656    }
3657}
3658
3659#[doc = "JobCode."]
3660#[derive(
3661    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3662)]
3663pub struct JobCode {
3664    #[doc = "Identifier field"]
3665    pub id: String,
3666    #[doc = "Record creation date"]
3667    pub created_at: String,
3668    #[doc = "Record update date"]
3669    pub updated_at: String,
3670    #[doc = "The name of the job dimension."]
3671    pub name: String,
3672    #[doc = "The ID of the job dimension this job code belongs to."]
3673    pub job_dimension_id: String,
3674    #[doc = "The job dimension this job code belongs to.\n\nExpandable field"]
3675    #[serde(default, skip_serializing_if = "Option::is_none")]
3676    pub job_dimension: Option<JobDimension>,
3677    #[doc = "The unique identifier of the job code in an outside system."]
3678    #[serde(default, skip_serializing_if = "Option::is_none")]
3679    pub external_id: Option<String>,
3680    #[doc = "The ID of the job roster group."]
3681    #[serde(default, skip_serializing_if = "Option::is_none")]
3682    pub group_id: Option<String>,
3683}
3684
3685impl std::fmt::Display for JobCode {
3686    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3687        write!(
3688            f,
3689            "{}",
3690            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3691        )
3692    }
3693}
3694
3695#[cfg(feature = "tabled")]
3696impl tabled::Tabled for JobCode {
3697    const LENGTH: usize = 8;
3698    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3699        vec![
3700            self.id.clone().into(),
3701            self.created_at.clone().into(),
3702            self.updated_at.clone().into(),
3703            self.name.clone().into(),
3704            self.job_dimension_id.clone().into(),
3705            if let Some(job_dimension) = &self.job_dimension {
3706                format!("{:?}", job_dimension).into()
3707            } else {
3708                String::new().into()
3709            },
3710            if let Some(external_id) = &self.external_id {
3711                format!("{:?}", external_id).into()
3712            } else {
3713                String::new().into()
3714            },
3715            if let Some(group_id) = &self.group_id {
3716                format!("{:?}", group_id).into()
3717            } else {
3718                String::new().into()
3719            },
3720        ]
3721    }
3722
3723    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3724        vec![
3725            "id".into(),
3726            "created_at".into(),
3727            "updated_at".into(),
3728            "name".into(),
3729            "job_dimension_id".into(),
3730            "job_dimension".into(),
3731            "external_id".into(),
3732            "group_id".into(),
3733        ]
3734    }
3735}
3736
3737#[doc = "JobCodeRequest."]
3738#[derive(
3739    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3740)]
3741pub struct JobCodeRequest {
3742    #[doc = "The name of the job dimension."]
3743    pub name: String,
3744    #[doc = "The ID of the job dimension this job code belongs to."]
3745    pub job_dimension_id: String,
3746    #[doc = "The unique identifier of the job code in an outside system."]
3747    #[serde(default, skip_serializing_if = "Option::is_none")]
3748    pub external_id: Option<String>,
3749}
3750
3751impl std::fmt::Display for JobCodeRequest {
3752    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3753        write!(
3754            f,
3755            "{}",
3756            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3757        )
3758    }
3759}
3760
3761#[cfg(feature = "tabled")]
3762impl tabled::Tabled for JobCodeRequest {
3763    const LENGTH: usize = 3;
3764    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3765        vec![
3766            self.name.clone().into(),
3767            self.job_dimension_id.clone().into(),
3768            if let Some(external_id) = &self.external_id {
3769                format!("{:?}", external_id).into()
3770            } else {
3771                String::new().into()
3772            },
3773        ]
3774    }
3775
3776    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3777        vec![
3778            "name".into(),
3779            "job_dimension_id".into(),
3780            "external_id".into(),
3781        ]
3782    }
3783}
3784
3785#[doc = "JobCodeSummary."]
3786#[derive(
3787    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3788)]
3789pub struct JobCodeSummary {
3790    #[doc = "List of job code ids that this summary is tracking hours for."]
3791    #[serde(default, skip_serializing_if = "Option::is_none")]
3792    pub job_codes_id: Option<Vec<String>>,
3793    #[doc = "The total hours worked for the job codes."]
3794    #[serde(default, skip_serializing_if = "Option::is_none")]
3795    pub hours_worked: Option<f64>,
3796}
3797
3798impl std::fmt::Display for JobCodeSummary {
3799    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3800        write!(
3801            f,
3802            "{}",
3803            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3804        )
3805    }
3806}
3807
3808#[cfg(feature = "tabled")]
3809impl tabled::Tabled for JobCodeSummary {
3810    const LENGTH: usize = 2;
3811    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3812        vec![
3813            if let Some(job_codes_id) = &self.job_codes_id {
3814                format!("{:?}", job_codes_id).into()
3815            } else {
3816                String::new().into()
3817            },
3818            if let Some(hours_worked) = &self.hours_worked {
3819                format!("{:?}", hours_worked).into()
3820            } else {
3821                String::new().into()
3822            },
3823        ]
3824    }
3825
3826    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3827        vec!["job_codes_id".into(), "hours_worked".into()]
3828    }
3829}
3830
3831#[doc = "JobDimension."]
3832#[derive(
3833    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3834)]
3835pub struct JobDimension {
3836    #[doc = "Identifier field"]
3837    pub id: String,
3838    #[doc = "Record creation date"]
3839    pub created_at: String,
3840    #[doc = "Record update date"]
3841    pub updated_at: String,
3842    #[doc = "The name of the job dimension"]
3843    pub name: String,
3844    #[doc = "The unique identifier of the job dimension in a third party system"]
3845    #[serde(default, skip_serializing_if = "Option::is_none")]
3846    pub external_id: Option<String>,
3847}
3848
3849impl std::fmt::Display for JobDimension {
3850    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3851        write!(
3852            f,
3853            "{}",
3854            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3855        )
3856    }
3857}
3858
3859#[cfg(feature = "tabled")]
3860impl tabled::Tabled for JobDimension {
3861    const LENGTH: usize = 5;
3862    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3863        vec![
3864            self.id.clone().into(),
3865            self.created_at.clone().into(),
3866            self.updated_at.clone().into(),
3867            self.name.clone().into(),
3868            if let Some(external_id) = &self.external_id {
3869                format!("{:?}", external_id).into()
3870            } else {
3871                String::new().into()
3872            },
3873        ]
3874    }
3875
3876    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3877        vec![
3878            "id".into(),
3879            "created_at".into(),
3880            "updated_at".into(),
3881            "name".into(),
3882            "external_id".into(),
3883        ]
3884    }
3885}
3886
3887#[doc = "JobDimensionRequest."]
3888#[derive(
3889    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3890)]
3891pub struct JobDimensionRequest {
3892    #[doc = "The name of the job dimension"]
3893    pub name: String,
3894    #[doc = "The unique identifier of the job dimension in a third party system"]
3895    #[serde(default, skip_serializing_if = "Option::is_none")]
3896    pub external_id: Option<String>,
3897}
3898
3899impl std::fmt::Display for JobDimensionRequest {
3900    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3901        write!(
3902            f,
3903            "{}",
3904            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3905        )
3906    }
3907}
3908
3909#[cfg(feature = "tabled")]
3910impl tabled::Tabled for JobDimensionRequest {
3911    const LENGTH: usize = 2;
3912    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3913        vec![
3914            self.name.clone().into(),
3915            if let Some(external_id) = &self.external_id {
3916                format!("{:?}", external_id).into()
3917            } else {
3918                String::new().into()
3919            },
3920        ]
3921    }
3922
3923    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3924        vec!["name".into(), "external_id".into()]
3925    }
3926}
3927
3928#[doc = "Job requisition status"]
3929#[derive(
3930    serde :: Serialize,
3931    serde :: Deserialize,
3932    PartialEq,
3933    Hash,
3934    Debug,
3935    Clone,
3936    schemars :: JsonSchema,
3937    parse_display :: FromStr,
3938    parse_display :: Display,
3939)]
3940#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
3941#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
3942pub enum JobRequisitionStatus {
3943    #[serde(rename = "OPEN")]
3944    #[display("OPEN")]
3945    Open,
3946    #[serde(rename = "CLOSED")]
3947    #[display("CLOSED")]
3948    Closed,
3949    #[serde(rename = "PUBLISHED")]
3950    #[display("PUBLISHED")]
3951    Published,
3952    #[serde(rename = "DRAFT")]
3953    #[display("DRAFT")]
3954    Draft,
3955    #[serde(rename = "ARCHIVED")]
3956    #[display("ARCHIVED")]
3957    Archived,
3958}
3959
3960#[doc = "JobRequisition."]
3961#[derive(
3962    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3963)]
3964pub struct JobRequisition {
3965    #[doc = "Identifier field"]
3966    pub id: String,
3967    #[doc = "Record creation date"]
3968    pub created_at: String,
3969    #[doc = "Record update date"]
3970    pub updated_at: String,
3971    #[doc = "Job requisition name"]
3972    pub name: String,
3973    #[doc = "Job requisition status"]
3974    pub status: JobRequisitionStatus,
3975}
3976
3977impl std::fmt::Display for JobRequisition {
3978    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3979        write!(
3980            f,
3981            "{}",
3982            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3983        )
3984    }
3985}
3986
3987#[cfg(feature = "tabled")]
3988impl tabled::Tabled for JobRequisition {
3989    const LENGTH: usize = 5;
3990    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3991        vec![
3992            self.id.clone().into(),
3993            self.created_at.clone().into(),
3994            self.updated_at.clone().into(),
3995            self.name.clone().into(),
3996            format!("{:?}", self.status).into(),
3997        ]
3998    }
3999
4000    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4001        vec![
4002            "id".into(),
4003            "created_at".into(),
4004            "updated_at".into(),
4005            "name".into(),
4006            "status".into(),
4007        ]
4008    }
4009}
4010
4011#[doc = "JobShift."]
4012#[derive(
4013    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4014)]
4015pub struct JobShift {
4016    #[doc = "The start time of the job shift."]
4017    #[serde(default, skip_serializing_if = "Option::is_none")]
4018    pub start_time: Option<String>,
4019    #[doc = "The end time of the job shift."]
4020    #[serde(default, skip_serializing_if = "Option::is_none")]
4021    pub end_time: Option<String>,
4022    #[doc = "The original start time of the job shift. If the startTime field has been rounded \
4023             then this contain the start time before the rounding occured."]
4024    #[serde(default, skip_serializing_if = "Option::is_none")]
4025    pub original_start_time: Option<String>,
4026    #[doc = "The original end time of the job shift. If the endTime field has been rounded then \
4027             this contain the end time before the rounding occured."]
4028    #[serde(default, skip_serializing_if = "Option::is_none")]
4029    pub original_end_time: Option<String>,
4030    #[doc = "The IDs of the job codes associated with the job shift."]
4031    #[serde(default, skip_serializing_if = "Option::is_none")]
4032    pub job_codes_id: Option<Vec<String>>,
4033    #[doc = "Whether the job shift was entered as a duration in hours table"]
4034    #[serde(default, skip_serializing_if = "Option::is_none")]
4035    pub is_hours_only_input: Option<bool>,
4036}
4037
4038impl std::fmt::Display for JobShift {
4039    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4040        write!(
4041            f,
4042            "{}",
4043            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4044        )
4045    }
4046}
4047
4048#[cfg(feature = "tabled")]
4049impl tabled::Tabled for JobShift {
4050    const LENGTH: usize = 6;
4051    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4052        vec![
4053            if let Some(start_time) = &self.start_time {
4054                format!("{:?}", start_time).into()
4055            } else {
4056                String::new().into()
4057            },
4058            if let Some(end_time) = &self.end_time {
4059                format!("{:?}", end_time).into()
4060            } else {
4061                String::new().into()
4062            },
4063            if let Some(original_start_time) = &self.original_start_time {
4064                format!("{:?}", original_start_time).into()
4065            } else {
4066                String::new().into()
4067            },
4068            if let Some(original_end_time) = &self.original_end_time {
4069                format!("{:?}", original_end_time).into()
4070            } else {
4071                String::new().into()
4072            },
4073            if let Some(job_codes_id) = &self.job_codes_id {
4074                format!("{:?}", job_codes_id).into()
4075            } else {
4076                String::new().into()
4077            },
4078            if let Some(is_hours_only_input) = &self.is_hours_only_input {
4079                format!("{:?}", is_hours_only_input).into()
4080            } else {
4081                String::new().into()
4082            },
4083        ]
4084    }
4085
4086    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4087        vec![
4088            "start_time".into(),
4089            "end_time".into(),
4090            "original_start_time".into(),
4091            "original_end_time".into(),
4092            "job_codes_id".into(),
4093            "is_hours_only_input".into(),
4094        ]
4095    }
4096}
4097
4098#[doc = "JobShiftRequest."]
4099#[derive(
4100    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4101)]
4102pub struct JobShiftRequest {
4103    #[doc = "The start time of the job shift."]
4104    #[serde(default, skip_serializing_if = "Option::is_none")]
4105    pub start_time: Option<String>,
4106    #[doc = "The end time of the job shift."]
4107    #[serde(default, skip_serializing_if = "Option::is_none")]
4108    pub end_time: Option<String>,
4109    #[doc = "The duration of the job shift."]
4110    #[serde(default, skip_serializing_if = "Option::is_none")]
4111    pub duration: Option<f64>,
4112    #[doc = "The date of the job shift if using duration."]
4113    #[serde(default, skip_serializing_if = "Option::is_none")]
4114    pub start_date: Option<String>,
4115    #[doc = "The original start time of the job shift. If the startTime field has been rounded \
4116             then this contain the start time before the rounding occured."]
4117    #[serde(default, skip_serializing_if = "Option::is_none")]
4118    pub original_start_time: Option<String>,
4119    #[doc = "The original end time of the job shift. If the endTime field has been rounded then \
4120             this contain the end time before the rounding occured."]
4121    #[serde(default, skip_serializing_if = "Option::is_none")]
4122    pub original_end_time: Option<String>,
4123    #[doc = "The IDs of the job codes associated with the job shift."]
4124    #[serde(default, skip_serializing_if = "Option::is_none")]
4125    pub job_codes_id: Option<Vec<String>>,
4126    #[doc = "Whether the job shift was entered as a duration in hours table"]
4127    #[serde(default, skip_serializing_if = "Option::is_none")]
4128    pub is_hours_only_input: Option<bool>,
4129}
4130
4131impl std::fmt::Display for JobShiftRequest {
4132    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4133        write!(
4134            f,
4135            "{}",
4136            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4137        )
4138    }
4139}
4140
4141#[cfg(feature = "tabled")]
4142impl tabled::Tabled for JobShiftRequest {
4143    const LENGTH: usize = 8;
4144    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4145        vec![
4146            if let Some(start_time) = &self.start_time {
4147                format!("{:?}", start_time).into()
4148            } else {
4149                String::new().into()
4150            },
4151            if let Some(end_time) = &self.end_time {
4152                format!("{:?}", end_time).into()
4153            } else {
4154                String::new().into()
4155            },
4156            if let Some(duration) = &self.duration {
4157                format!("{:?}", duration).into()
4158            } else {
4159                String::new().into()
4160            },
4161            if let Some(start_date) = &self.start_date {
4162                format!("{:?}", start_date).into()
4163            } else {
4164                String::new().into()
4165            },
4166            if let Some(original_start_time) = &self.original_start_time {
4167                format!("{:?}", original_start_time).into()
4168            } else {
4169                String::new().into()
4170            },
4171            if let Some(original_end_time) = &self.original_end_time {
4172                format!("{:?}", original_end_time).into()
4173            } else {
4174                String::new().into()
4175            },
4176            if let Some(job_codes_id) = &self.job_codes_id {
4177                format!("{:?}", job_codes_id).into()
4178            } else {
4179                String::new().into()
4180            },
4181            if let Some(is_hours_only_input) = &self.is_hours_only_input {
4182                format!("{:?}", is_hours_only_input).into()
4183            } else {
4184                String::new().into()
4185            },
4186        ]
4187    }
4188
4189    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4190        vec![
4191            "start_time".into(),
4192            "end_time".into(),
4193            "duration".into(),
4194            "start_date".into(),
4195            "original_start_time".into(),
4196            "original_end_time".into(),
4197            "job_codes_id".into(),
4198            "is_hours_only_input".into(),
4199        ]
4200    }
4201}
4202
4203#[doc = "LeaveBalance."]
4204#[derive(
4205    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4206)]
4207pub struct LeaveBalance {
4208    #[doc = "Identifier field"]
4209    pub id: String,
4210    #[doc = "Record creation date"]
4211    pub created_at: String,
4212    #[doc = "Record update date"]
4213    pub updated_at: String,
4214    #[doc = "The ID of the worker associated with the leave balance."]
4215    pub worker_id: String,
4216    #[doc = "The worker associated with the leave balance.\n\nExpandable field"]
4217    #[serde(default, skip_serializing_if = "Option::is_none")]
4218    pub worker: Option<Worker>,
4219    #[doc = "The ID of the leave type associated with the leave balance."]
4220    #[serde(default, skip_serializing_if = "Option::is_none")]
4221    pub leave_type_id: Option<String>,
4222    #[doc = "The leave type associated with the leave balance.\n\nExpandable field"]
4223    #[serde(default, skip_serializing_if = "Option::is_none")]
4224    pub leave_type: Option<LeaveType>,
4225    #[doc = "Indicates if the leave balance is unlimited."]
4226    #[serde(default, skip_serializing_if = "Option::is_none")]
4227    pub is_balance_unlimited: Option<bool>,
4228    #[doc = "The worker's leave balance including future leave requests. If the leave balance is \
4229             unlimited, this field will be null."]
4230    #[serde(default, skip_serializing_if = "Option::is_none")]
4231    pub balance_including_future_requests: Option<f64>,
4232    #[doc = "The worker's leave balance excluding future leave requests. If the leave balance is \
4233             unlimited, this field will be null."]
4234    #[serde(default, skip_serializing_if = "Option::is_none")]
4235    pub balance_excluding_future_requests: Option<f64>,
4236}
4237
4238impl std::fmt::Display for LeaveBalance {
4239    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4240        write!(
4241            f,
4242            "{}",
4243            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4244        )
4245    }
4246}
4247
4248#[cfg(feature = "tabled")]
4249impl tabled::Tabled for LeaveBalance {
4250    const LENGTH: usize = 10;
4251    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4252        vec![
4253            self.id.clone().into(),
4254            self.created_at.clone().into(),
4255            self.updated_at.clone().into(),
4256            self.worker_id.clone().into(),
4257            if let Some(worker) = &self.worker {
4258                format!("{:?}", worker).into()
4259            } else {
4260                String::new().into()
4261            },
4262            if let Some(leave_type_id) = &self.leave_type_id {
4263                format!("{:?}", leave_type_id).into()
4264            } else {
4265                String::new().into()
4266            },
4267            if let Some(leave_type) = &self.leave_type {
4268                format!("{:?}", leave_type).into()
4269            } else {
4270                String::new().into()
4271            },
4272            if let Some(is_balance_unlimited) = &self.is_balance_unlimited {
4273                format!("{:?}", is_balance_unlimited).into()
4274            } else {
4275                String::new().into()
4276            },
4277            if let Some(balance_including_future_requests) = &self.balance_including_future_requests
4278            {
4279                format!("{:?}", balance_including_future_requests).into()
4280            } else {
4281                String::new().into()
4282            },
4283            if let Some(balance_excluding_future_requests) = &self.balance_excluding_future_requests
4284            {
4285                format!("{:?}", balance_excluding_future_requests).into()
4286            } else {
4287                String::new().into()
4288            },
4289        ]
4290    }
4291
4292    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4293        vec![
4294            "id".into(),
4295            "created_at".into(),
4296            "updated_at".into(),
4297            "worker_id".into(),
4298            "worker".into(),
4299            "leave_type_id".into(),
4300            "leave_type".into(),
4301            "is_balance_unlimited".into(),
4302            "balance_including_future_requests".into(),
4303            "balance_excluding_future_requests".into(),
4304        ]
4305    }
4306}
4307
4308#[doc = "The status of the leave request."]
4309#[derive(
4310    serde :: Serialize,
4311    serde :: Deserialize,
4312    PartialEq,
4313    Hash,
4314    Debug,
4315    Clone,
4316    schemars :: JsonSchema,
4317    parse_display :: FromStr,
4318    parse_display :: Display,
4319)]
4320#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
4321#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
4322pub enum LeaveRequestStatus {
4323    #[serde(rename = "PENDING")]
4324    #[display("PENDING")]
4325    Pending,
4326    #[serde(rename = "APPROVED")]
4327    #[display("APPROVED")]
4328    Approved,
4329    #[serde(rename = "REJECTED")]
4330    #[display("REJECTED")]
4331    Rejected,
4332    #[serde(rename = "CANCELED")]
4333    #[display("CANCELED")]
4334    Canceled,
4335}
4336
4337#[doc = "LeaveRequest."]
4338#[derive(
4339    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4340)]
4341pub struct LeaveRequest {
4342    #[doc = "Identifier field"]
4343    pub id: String,
4344    #[doc = "Record creation date"]
4345    pub created_at: String,
4346    #[doc = "Record update date"]
4347    pub updated_at: String,
4348    #[doc = "The ID of the worker associated with the leave request."]
4349    pub worker_id: String,
4350    #[doc = "The worker associated with the leave request.\n\nExpandable field"]
4351    #[serde(default, skip_serializing_if = "Option::is_none")]
4352    pub worker: Option<Worker>,
4353    #[doc = "The ID of the worker who requested the leave request."]
4354    #[serde(default, skip_serializing_if = "Option::is_none")]
4355    pub requester_id: Option<String>,
4356    #[doc = "The worker who requested the leave request.\n\nExpandable field"]
4357    #[serde(default, skip_serializing_if = "Option::is_none")]
4358    pub requester: Option<Worker>,
4359    #[doc = "The status of the leave request."]
4360    pub status: LeaveRequestStatus,
4361    #[doc = "The start date of the leave request."]
4362    pub start_date: String,
4363    #[doc = "The start time of the leave request."]
4364    #[serde(default, skip_serializing_if = "Option::is_none")]
4365    pub start_time: Option<String>,
4366    #[doc = "The end date of the leave request."]
4367    pub end_date: String,
4368    #[doc = "The end time of the leave request."]
4369    #[serde(default, skip_serializing_if = "Option::is_none")]
4370    pub end_time: Option<String>,
4371    #[doc = "The comments associated with the leave request."]
4372    #[serde(default, skip_serializing_if = "Option::is_none")]
4373    pub comments: Option<String>,
4374    #[doc = "The number of minutes requested for the leave request."]
4375    #[serde(default, skip_serializing_if = "Option::is_none")]
4376    pub number_of_minutes_requested: Option<f64>,
4377    #[doc = "The ID of the leave policy associated with the leave request."]
4378    pub leave_policy_id: String,
4379    #[doc = "The ID of the leave type associated with the leave request."]
4380    #[serde(default, skip_serializing_if = "Option::is_none")]
4381    pub leave_type_id: Option<String>,
4382    #[doc = "The leave type associated with the leave request.\n\nExpandable field"]
4383    #[serde(default, skip_serializing_if = "Option::is_none")]
4384    pub leave_type: Option<LeaveType>,
4385    #[doc = "The reason for the leave request."]
4386    #[serde(default, skip_serializing_if = "Option::is_none")]
4387    pub reason_for_leave: Option<String>,
4388    #[doc = "The ID of the worker who reviewed the leave request."]
4389    #[serde(default, skip_serializing_if = "Option::is_none")]
4390    pub reviewer_id: Option<String>,
4391    #[doc = "The worker who reviewed the leave request.\n\nExpandable field"]
4392    #[serde(default, skip_serializing_if = "Option::is_none")]
4393    pub reviewer: Option<Worker>,
4394    #[doc = "The timestamp the leave request was reviewed."]
4395    #[serde(default, skip_serializing_if = "Option::is_none")]
4396    pub reviewed_at: Option<String>,
4397    #[doc = "The specific dates taken off and the amount of time taken off for each one."]
4398    #[serde(default, skip_serializing_if = "Option::is_none")]
4399    pub days_take_off: Option<Vec<DayOff>>,
4400    #[doc = "Whether the leave request is managed by an external system."]
4401    #[serde(default, skip_serializing_if = "Option::is_none")]
4402    pub is_managed_by_external_system: Option<bool>,
4403}
4404
4405impl std::fmt::Display for LeaveRequest {
4406    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4407        write!(
4408            f,
4409            "{}",
4410            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4411        )
4412    }
4413}
4414
4415#[cfg(feature = "tabled")]
4416impl tabled::Tabled for LeaveRequest {
4417    const LENGTH: usize = 23;
4418    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4419        vec![
4420            self.id.clone().into(),
4421            self.created_at.clone().into(),
4422            self.updated_at.clone().into(),
4423            self.worker_id.clone().into(),
4424            if let Some(worker) = &self.worker {
4425                format!("{:?}", worker).into()
4426            } else {
4427                String::new().into()
4428            },
4429            if let Some(requester_id) = &self.requester_id {
4430                format!("{:?}", requester_id).into()
4431            } else {
4432                String::new().into()
4433            },
4434            if let Some(requester) = &self.requester {
4435                format!("{:?}", requester).into()
4436            } else {
4437                String::new().into()
4438            },
4439            format!("{:?}", self.status).into(),
4440            self.start_date.clone().into(),
4441            if let Some(start_time) = &self.start_time {
4442                format!("{:?}", start_time).into()
4443            } else {
4444                String::new().into()
4445            },
4446            self.end_date.clone().into(),
4447            if let Some(end_time) = &self.end_time {
4448                format!("{:?}", end_time).into()
4449            } else {
4450                String::new().into()
4451            },
4452            if let Some(comments) = &self.comments {
4453                format!("{:?}", comments).into()
4454            } else {
4455                String::new().into()
4456            },
4457            if let Some(number_of_minutes_requested) = &self.number_of_minutes_requested {
4458                format!("{:?}", number_of_minutes_requested).into()
4459            } else {
4460                String::new().into()
4461            },
4462            self.leave_policy_id.clone().into(),
4463            if let Some(leave_type_id) = &self.leave_type_id {
4464                format!("{:?}", leave_type_id).into()
4465            } else {
4466                String::new().into()
4467            },
4468            if let Some(leave_type) = &self.leave_type {
4469                format!("{:?}", leave_type).into()
4470            } else {
4471                String::new().into()
4472            },
4473            if let Some(reason_for_leave) = &self.reason_for_leave {
4474                format!("{:?}", reason_for_leave).into()
4475            } else {
4476                String::new().into()
4477            },
4478            if let Some(reviewer_id) = &self.reviewer_id {
4479                format!("{:?}", reviewer_id).into()
4480            } else {
4481                String::new().into()
4482            },
4483            if let Some(reviewer) = &self.reviewer {
4484                format!("{:?}", reviewer).into()
4485            } else {
4486                String::new().into()
4487            },
4488            if let Some(reviewed_at) = &self.reviewed_at {
4489                format!("{:?}", reviewed_at).into()
4490            } else {
4491                String::new().into()
4492            },
4493            if let Some(days_take_off) = &self.days_take_off {
4494                format!("{:?}", days_take_off).into()
4495            } else {
4496                String::new().into()
4497            },
4498            if let Some(is_managed_by_external_system) = &self.is_managed_by_external_system {
4499                format!("{:?}", is_managed_by_external_system).into()
4500            } else {
4501                String::new().into()
4502            },
4503        ]
4504    }
4505
4506    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4507        vec![
4508            "id".into(),
4509            "created_at".into(),
4510            "updated_at".into(),
4511            "worker_id".into(),
4512            "worker".into(),
4513            "requester_id".into(),
4514            "requester".into(),
4515            "status".into(),
4516            "start_date".into(),
4517            "start_time".into(),
4518            "end_date".into(),
4519            "end_time".into(),
4520            "comments".into(),
4521            "number_of_minutes_requested".into(),
4522            "leave_policy_id".into(),
4523            "leave_type_id".into(),
4524            "leave_type".into(),
4525            "reason_for_leave".into(),
4526            "reviewer_id".into(),
4527            "reviewer".into(),
4528            "reviewed_at".into(),
4529            "days_take_off".into(),
4530            "is_managed_by_external_system".into(),
4531        ]
4532    }
4533}
4534
4535#[doc = "The status of the leave request."]
4536#[derive(
4537    serde :: Serialize,
4538    serde :: Deserialize,
4539    PartialEq,
4540    Hash,
4541    Debug,
4542    Clone,
4543    schemars :: JsonSchema,
4544    parse_display :: FromStr,
4545    parse_display :: Display,
4546)]
4547#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
4548#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
4549pub enum LeaveRequestRequestStatus {
4550    #[serde(rename = "PENDING")]
4551    #[display("PENDING")]
4552    Pending,
4553    #[serde(rename = "APPROVED")]
4554    #[display("APPROVED")]
4555    Approved,
4556    #[serde(rename = "REJECTED")]
4557    #[display("REJECTED")]
4558    Rejected,
4559    #[serde(rename = "CANCELED")]
4560    #[display("CANCELED")]
4561    Canceled,
4562}
4563
4564#[doc = "LeaveRequestRequest."]
4565#[derive(
4566    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4567)]
4568pub struct LeaveRequestRequest {
4569    #[doc = "The ID of the worker associated with the leave request."]
4570    pub worker_id: String,
4571    #[doc = "The ID of the worker who requested the leave request."]
4572    #[serde(default, skip_serializing_if = "Option::is_none")]
4573    pub requester_id: Option<String>,
4574    #[doc = "The status of the leave request."]
4575    pub status: LeaveRequestRequestStatus,
4576    #[doc = "The start date of the leave request."]
4577    pub start_date: String,
4578    #[doc = "The start time of the leave request."]
4579    #[serde(default, skip_serializing_if = "Option::is_none")]
4580    pub start_time: Option<String>,
4581    #[doc = "The end date of the leave request."]
4582    pub end_date: String,
4583    #[doc = "The end time of the leave request."]
4584    #[serde(default, skip_serializing_if = "Option::is_none")]
4585    pub end_time: Option<String>,
4586    #[doc = "The number of hours to take off on the start date."]
4587    #[serde(default, skip_serializing_if = "Option::is_none")]
4588    pub start_date_custom_hours: Option<f64>,
4589    #[doc = "The number of hours to take off on the end date."]
4590    #[serde(default, skip_serializing_if = "Option::is_none")]
4591    pub end_date_custom_hours: Option<f64>,
4592    #[doc = "The comments associated with the leave request."]
4593    #[serde(default, skip_serializing_if = "Option::is_none")]
4594    pub comments: Option<String>,
4595    #[doc = "The ID of the leave policy associated with the leave request."]
4596    pub leave_policy_id: String,
4597    #[doc = "The ID of the leave type associated with the leave request."]
4598    #[serde(default, skip_serializing_if = "Option::is_none")]
4599    pub leave_type_id: Option<String>,
4600    #[doc = "The reason for the leave request."]
4601    #[serde(default, skip_serializing_if = "Option::is_none")]
4602    pub reason_for_leave: Option<String>,
4603    #[doc = "The ID of the worker who reviewed the leave request."]
4604    #[serde(default, skip_serializing_if = "Option::is_none")]
4605    pub reviewer_id: Option<String>,
4606    #[doc = "The timestamp the leave request was reviewed."]
4607    #[serde(default, skip_serializing_if = "Option::is_none")]
4608    pub reviewed_at: Option<String>,
4609}
4610
4611impl std::fmt::Display for LeaveRequestRequest {
4612    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4613        write!(
4614            f,
4615            "{}",
4616            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4617        )
4618    }
4619}
4620
4621#[cfg(feature = "tabled")]
4622impl tabled::Tabled for LeaveRequestRequest {
4623    const LENGTH: usize = 15;
4624    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4625        vec![
4626            self.worker_id.clone().into(),
4627            if let Some(requester_id) = &self.requester_id {
4628                format!("{:?}", requester_id).into()
4629            } else {
4630                String::new().into()
4631            },
4632            format!("{:?}", self.status).into(),
4633            self.start_date.clone().into(),
4634            if let Some(start_time) = &self.start_time {
4635                format!("{:?}", start_time).into()
4636            } else {
4637                String::new().into()
4638            },
4639            self.end_date.clone().into(),
4640            if let Some(end_time) = &self.end_time {
4641                format!("{:?}", end_time).into()
4642            } else {
4643                String::new().into()
4644            },
4645            if let Some(start_date_custom_hours) = &self.start_date_custom_hours {
4646                format!("{:?}", start_date_custom_hours).into()
4647            } else {
4648                String::new().into()
4649            },
4650            if let Some(end_date_custom_hours) = &self.end_date_custom_hours {
4651                format!("{:?}", end_date_custom_hours).into()
4652            } else {
4653                String::new().into()
4654            },
4655            if let Some(comments) = &self.comments {
4656                format!("{:?}", comments).into()
4657            } else {
4658                String::new().into()
4659            },
4660            self.leave_policy_id.clone().into(),
4661            if let Some(leave_type_id) = &self.leave_type_id {
4662                format!("{:?}", leave_type_id).into()
4663            } else {
4664                String::new().into()
4665            },
4666            if let Some(reason_for_leave) = &self.reason_for_leave {
4667                format!("{:?}", reason_for_leave).into()
4668            } else {
4669                String::new().into()
4670            },
4671            if let Some(reviewer_id) = &self.reviewer_id {
4672                format!("{:?}", reviewer_id).into()
4673            } else {
4674                String::new().into()
4675            },
4676            if let Some(reviewed_at) = &self.reviewed_at {
4677                format!("{:?}", reviewed_at).into()
4678            } else {
4679                String::new().into()
4680            },
4681        ]
4682    }
4683
4684    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4685        vec![
4686            "worker_id".into(),
4687            "requester_id".into(),
4688            "status".into(),
4689            "start_date".into(),
4690            "start_time".into(),
4691            "end_date".into(),
4692            "end_time".into(),
4693            "start_date_custom_hours".into(),
4694            "end_date_custom_hours".into(),
4695            "comments".into(),
4696            "leave_policy_id".into(),
4697            "leave_type_id".into(),
4698            "reason_for_leave".into(),
4699            "reviewer_id".into(),
4700            "reviewed_at".into(),
4701        ]
4702    }
4703}
4704
4705#[doc = "LeaveType."]
4706#[derive(
4707    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4708)]
4709pub struct LeaveType {
4710    #[doc = "Identifier field"]
4711    pub id: String,
4712    #[doc = "Record creation date"]
4713    pub created_at: String,
4714    #[doc = "Record update date"]
4715    pub updated_at: String,
4716    #[doc = "The type of leave."]
4717    #[serde(rename = "type")]
4718    pub type_: String,
4719    #[doc = "The name of the leave type."]
4720    pub name: String,
4721    #[doc = "The description of the leave type."]
4722    #[serde(default, skip_serializing_if = "Option::is_none")]
4723    pub description: Option<String>,
4724    #[doc = "Whether the leave is paid."]
4725    pub is_paid: bool,
4726    #[doc = "Whether the leave is managed by an external system."]
4727    pub is_managed_by_external_system: bool,
4728}
4729
4730impl std::fmt::Display for LeaveType {
4731    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4732        write!(
4733            f,
4734            "{}",
4735            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4736        )
4737    }
4738}
4739
4740#[cfg(feature = "tabled")]
4741impl tabled::Tabled for LeaveType {
4742    const LENGTH: usize = 8;
4743    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4744        vec![
4745            self.id.clone().into(),
4746            self.created_at.clone().into(),
4747            self.updated_at.clone().into(),
4748            self.type_.clone().into(),
4749            self.name.clone().into(),
4750            if let Some(description) = &self.description {
4751                format!("{:?}", description).into()
4752            } else {
4753                String::new().into()
4754            },
4755            format!("{:?}", self.is_paid).into(),
4756            format!("{:?}", self.is_managed_by_external_system).into(),
4757        ]
4758    }
4759
4760    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4761        vec![
4762            "id".into(),
4763            "created_at".into(),
4764            "updated_at".into(),
4765            "type_".into(),
4766            "name".into(),
4767            "description".into(),
4768            "is_paid".into(),
4769            "is_managed_by_external_system".into(),
4770        ]
4771    }
4772}
4773
4774#[doc = "The legal entity's level in a hierarchy. * `PARENT`: The legal entity is considered the \
4775         ultimate holding entity. * `SUBSIDIARY`: The legal entity is considered a subsidiary, \
4776         fully or partially held by another. * `BRANCH`: The legal entity is considered a branch, \
4777         associated with a parent legal entity."]
4778#[derive(
4779    serde :: Serialize,
4780    serde :: Deserialize,
4781    PartialEq,
4782    Hash,
4783    Debug,
4784    Clone,
4785    schemars :: JsonSchema,
4786    parse_display :: FromStr,
4787    parse_display :: Display,
4788)]
4789#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
4790#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
4791pub enum EntityLevel {
4792    #[serde(rename = "PARENT")]
4793    #[display("PARENT")]
4794    Parent,
4795    #[serde(rename = "SUBSIDIARY")]
4796    #[display("SUBSIDIARY")]
4797    Subsidiary,
4798    #[serde(rename = "BRANCH")]
4799    #[display("BRANCH")]
4800    Branch,
4801}
4802
4803#[doc = "The legal entity management type in the case of an employer of record (EOR) or \
4804         professional employment organization (PEO). * `PEO`: The legal entity is considered a \
4805         Professional Employment Organization (PEO). * `EOR`: The legal entity is considered an \
4806         Employer of Record (EOR)."]
4807#[derive(
4808    serde :: Serialize,
4809    serde :: Deserialize,
4810    PartialEq,
4811    Hash,
4812    Debug,
4813    Clone,
4814    schemars :: JsonSchema,
4815    parse_display :: FromStr,
4816    parse_display :: Display,
4817)]
4818#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
4819#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
4820pub enum ManagementType {
4821    #[serde(rename = "PEO")]
4822    #[display("PEO")]
4823    Peo,
4824    #[serde(rename = "EOR")]
4825    #[display("EOR")]
4826    Eor,
4827}
4828
4829#[doc = "LegalEntity."]
4830#[derive(
4831    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4832)]
4833pub struct LegalEntity {
4834    #[doc = "Identifier field"]
4835    pub id: String,
4836    #[doc = "Record creation date"]
4837    pub created_at: String,
4838    #[doc = "Record update date"]
4839    pub updated_at: String,
4840    #[doc = "The tax identifier for the legal entity."]
4841    #[serde(default, skip_serializing_if = "Option::is_none")]
4842    pub tax_identifier: Option<String>,
4843    #[doc = "The country the legal entity is based in."]
4844    #[serde(default, skip_serializing_if = "Option::is_none")]
4845    pub country: Option<Country>,
4846    #[doc = "The legal name of the legal entity."]
4847    #[serde(default, skip_serializing_if = "Option::is_none")]
4848    pub legal_name: Option<String>,
4849    #[doc = "The legal entity's level in a hierarchy. * `PARENT`: The legal entity is considered \
4850             the ultimate holding entity. * `SUBSIDIARY`: The legal entity is considered a \
4851             subsidiary, fully or partially held by another. * `BRANCH`: The legal entity is \
4852             considered a branch, associated with a parent legal entity."]
4853    #[serde(default, skip_serializing_if = "Option::is_none")]
4854    pub entity_level: Option<EntityLevel>,
4855    #[doc = "The registration date of the entity."]
4856    #[serde(default, skip_serializing_if = "Option::is_none")]
4857    pub registration_date: Option<String>,
4858    #[doc = "The mailing address of the legal entity."]
4859    #[serde(default, skip_serializing_if = "Option::is_none")]
4860    pub mailing_address: Option<Address>,
4861    #[doc = "The physical address of the legal entity, if it differs from the mailing address."]
4862    #[serde(default, skip_serializing_if = "Option::is_none")]
4863    pub physical_address: Option<Address>,
4864    #[doc = "The parent legal entity."]
4865    #[serde(default, skip_serializing_if = "Option::is_none")]
4866    pub parent_id: Option<String>,
4867    #[doc = "The parent legal entity.\n\nExpandable field"]
4868    #[serde(default, skip_serializing_if = "Option::is_none")]
4869    pub parent: Option<Box<LegalEntity>>,
4870    #[doc = "The legal entity management type in the case of an employer of record (EOR) or \
4871             professional employment organization (PEO). * `PEO`: The legal entity is considered \
4872             a Professional Employment Organization (PEO). * `EOR`: The legal entity is \
4873             considered an Employer of Record (EOR)."]
4874    #[serde(default, skip_serializing_if = "Option::is_none")]
4875    pub management_type: Option<ManagementType>,
4876    #[doc = "The company or organization associated with the legal entity"]
4877    #[serde(default, skip_serializing_if = "Option::is_none")]
4878    pub company_id: Option<String>,
4879    #[doc = "The company or organization associated with the legal entity\n\nExpandable field"]
4880    #[serde(default, skip_serializing_if = "Option::is_none")]
4881    pub company: Option<Company>,
4882}
4883
4884impl std::fmt::Display for LegalEntity {
4885    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4886        write!(
4887            f,
4888            "{}",
4889            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4890        )
4891    }
4892}
4893
4894#[cfg(feature = "tabled")]
4895impl tabled::Tabled for LegalEntity {
4896    const LENGTH: usize = 15;
4897    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4898        vec![
4899            self.id.clone().into(),
4900            self.created_at.clone().into(),
4901            self.updated_at.clone().into(),
4902            if let Some(tax_identifier) = &self.tax_identifier {
4903                format!("{:?}", tax_identifier).into()
4904            } else {
4905                String::new().into()
4906            },
4907            if let Some(country) = &self.country {
4908                format!("{:?}", country).into()
4909            } else {
4910                String::new().into()
4911            },
4912            if let Some(legal_name) = &self.legal_name {
4913                format!("{:?}", legal_name).into()
4914            } else {
4915                String::new().into()
4916            },
4917            if let Some(entity_level) = &self.entity_level {
4918                format!("{:?}", entity_level).into()
4919            } else {
4920                String::new().into()
4921            },
4922            if let Some(registration_date) = &self.registration_date {
4923                format!("{:?}", registration_date).into()
4924            } else {
4925                String::new().into()
4926            },
4927            if let Some(mailing_address) = &self.mailing_address {
4928                format!("{:?}", mailing_address).into()
4929            } else {
4930                String::new().into()
4931            },
4932            if let Some(physical_address) = &self.physical_address {
4933                format!("{:?}", physical_address).into()
4934            } else {
4935                String::new().into()
4936            },
4937            if let Some(parent_id) = &self.parent_id {
4938                format!("{:?}", parent_id).into()
4939            } else {
4940                String::new().into()
4941            },
4942            if let Some(parent) = &self.parent {
4943                format!("{:?}", parent).into()
4944            } else {
4945                String::new().into()
4946            },
4947            if let Some(management_type) = &self.management_type {
4948                format!("{:?}", management_type).into()
4949            } else {
4950                String::new().into()
4951            },
4952            if let Some(company_id) = &self.company_id {
4953                format!("{:?}", company_id).into()
4954            } else {
4955                String::new().into()
4956            },
4957            if let Some(company) = &self.company {
4958                format!("{:?}", company).into()
4959            } else {
4960                String::new().into()
4961            },
4962        ]
4963    }
4964
4965    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4966        vec![
4967            "id".into(),
4968            "created_at".into(),
4969            "updated_at".into(),
4970            "tax_identifier".into(),
4971            "country".into(),
4972            "legal_name".into(),
4973            "entity_level".into(),
4974            "registration_date".into(),
4975            "mailing_address".into(),
4976            "physical_address".into(),
4977            "parent_id".into(),
4978            "parent".into(),
4979            "management_type".into(),
4980            "company_id".into(),
4981            "company".into(),
4982        ]
4983    }
4984}
4985
4986#[doc = "Level."]
4987#[derive(
4988    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4989)]
4990pub struct Level {
4991    #[doc = "Identifier field"]
4992    pub id: String,
4993    #[doc = "Record creation date"]
4994    pub created_at: String,
4995    #[doc = "Record update date"]
4996    pub updated_at: String,
4997    #[doc = "The name of the level. Must be unique within the company or organization."]
4998    pub name: String,
4999    #[doc = "The parent level."]
5000    #[serde(default, skip_serializing_if = "Option::is_none")]
5001    pub parent_id: Option<String>,
5002    #[doc = "The parent level.\n\nExpandable field"]
5003    #[serde(default, skip_serializing_if = "Option::is_none")]
5004    pub parent: Option<Box<Level>>,
5005    #[doc = "Global level is used to track the seniority of levels. The higher up a level is \
5006             placed on the page, the more senior and higher-ranked the level. Global level is \
5007             used in workflows, policies, and reports that use the level attribute (e.g., you can \
5008             use Level Lookup to set up a workflow that notifies the nearest person in an \
5009             worker's management chain at or above the specified level)."]
5010    #[serde(default, skip_serializing_if = "Option::is_none")]
5011    pub global_level: Option<i64>,
5012    #[doc = "The description of the level."]
5013    #[serde(default, skip_serializing_if = "Option::is_none")]
5014    pub description: Option<String>,
5015    #[doc = "The rank of the level within its track."]
5016    #[serde(default, skip_serializing_if = "Option::is_none")]
5017    pub rank: Option<i64>,
5018    #[doc = "The track associated with the level, if it's not a global level."]
5019    #[serde(default, skip_serializing_if = "Option::is_none")]
5020    pub track_id: Option<String>,
5021    #[doc = "The track associated with the level, if it's not a global level.\n\nExpandable field"]
5022    #[serde(default, skip_serializing_if = "Option::is_none")]
5023    pub track: Option<Track>,
5024}
5025
5026impl std::fmt::Display for Level {
5027    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5028        write!(
5029            f,
5030            "{}",
5031            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5032        )
5033    }
5034}
5035
5036#[cfg(feature = "tabled")]
5037impl tabled::Tabled for Level {
5038    const LENGTH: usize = 11;
5039    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5040        vec![
5041            self.id.clone().into(),
5042            self.created_at.clone().into(),
5043            self.updated_at.clone().into(),
5044            self.name.clone().into(),
5045            if let Some(parent_id) = &self.parent_id {
5046                format!("{:?}", parent_id).into()
5047            } else {
5048                String::new().into()
5049            },
5050            if let Some(parent) = &self.parent {
5051                format!("{:?}", parent).into()
5052            } else {
5053                String::new().into()
5054            },
5055            if let Some(global_level) = &self.global_level {
5056                format!("{:?}", global_level).into()
5057            } else {
5058                String::new().into()
5059            },
5060            if let Some(description) = &self.description {
5061                format!("{:?}", description).into()
5062            } else {
5063                String::new().into()
5064            },
5065            if let Some(rank) = &self.rank {
5066                format!("{:?}", rank).into()
5067            } else {
5068                String::new().into()
5069            },
5070            if let Some(track_id) = &self.track_id {
5071                format!("{:?}", track_id).into()
5072            } else {
5073                String::new().into()
5074            },
5075            if let Some(track) = &self.track {
5076                format!("{:?}", track).into()
5077            } else {
5078                String::new().into()
5079            },
5080        ]
5081    }
5082
5083    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5084        vec![
5085            "id".into(),
5086            "created_at".into(),
5087            "updated_at".into(),
5088            "name".into(),
5089            "parent_id".into(),
5090            "parent".into(),
5091            "global_level".into(),
5092            "description".into(),
5093            "rank".into(),
5094            "track_id".into(),
5095            "track".into(),
5096        ]
5097    }
5098}
5099
5100#[derive(
5101    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5102)]
5103pub struct Meta {
5104    #[serde(default, skip_serializing_if = "Option::is_none")]
5105    pub redacted_fields: Option<Vec<RedactedField>>,
5106}
5107
5108impl std::fmt::Display for Meta {
5109    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5110        write!(
5111            f,
5112            "{}",
5113            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5114        )
5115    }
5116}
5117
5118#[cfg(feature = "tabled")]
5119impl tabled::Tabled for Meta {
5120    const LENGTH: usize = 1;
5121    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5122        vec![if let Some(redacted_fields) = &self.redacted_fields {
5123            format!("{:?}", redacted_fields).into()
5124        } else {
5125            String::new().into()
5126        }]
5127    }
5128
5129    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5130        vec!["redacted_fields".into()]
5131    }
5132}
5133
5134#[doc = "Meta information for the response."]
5135#[derive(
5136    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5137)]
5138pub struct MetaResponse {
5139    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
5140    pub meta: Option<Meta>,
5141}
5142
5143impl std::fmt::Display for MetaResponse {
5144    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5145        write!(
5146            f,
5147            "{}",
5148            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5149        )
5150    }
5151}
5152
5153#[cfg(feature = "tabled")]
5154impl tabled::Tabled for MetaResponse {
5155    const LENGTH: usize = 1;
5156    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5157        vec![if let Some(meta) = &self.meta {
5158            format!("{:?}", meta).into()
5159        } else {
5160            String::new().into()
5161        }]
5162    }
5163
5164    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5165        vec!["meta".into()]
5166    }
5167}
5168
5169#[doc = "ObjectCategory."]
5170#[derive(
5171    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5172)]
5173pub struct ObjectCategory {
5174    #[doc = "Identifier field"]
5175    pub id: String,
5176    #[doc = "Record creation date"]
5177    pub created_at: String,
5178    #[doc = "Record update date"]
5179    pub updated_at: String,
5180    #[doc = "The name of the Custom Category"]
5181    pub name: String,
5182    #[doc = "The description of the Custom Category"]
5183    #[serde(default, skip_serializing_if = "Option::is_none")]
5184    pub description: Option<String>,
5185}
5186
5187impl std::fmt::Display for ObjectCategory {
5188    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5189        write!(
5190            f,
5191            "{}",
5192            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5193        )
5194    }
5195}
5196
5197#[cfg(feature = "tabled")]
5198impl tabled::Tabled for ObjectCategory {
5199    const LENGTH: usize = 5;
5200    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5201        vec![
5202            self.id.clone().into(),
5203            self.created_at.clone().into(),
5204            self.updated_at.clone().into(),
5205            self.name.clone().into(),
5206            if let Some(description) = &self.description {
5207                format!("{:?}", description).into()
5208            } else {
5209                String::new().into()
5210            },
5211        ]
5212    }
5213
5214    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5215        vec![
5216            "id".into(),
5217            "created_at".into(),
5218            "updated_at".into(),
5219            "name".into(),
5220            "description".into(),
5221        ]
5222    }
5223}
5224
5225#[doc = "PayPeriod."]
5226#[derive(
5227    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5228)]
5229pub struct PayPeriod {
5230    #[doc = "The start date of the pay period."]
5231    #[serde(default, skip_serializing_if = "Option::is_none")]
5232    pub start_date: Option<String>,
5233    #[doc = "The end date of the pay period."]
5234    #[serde(default, skip_serializing_if = "Option::is_none")]
5235    pub end_date: Option<String>,
5236    #[doc = "The ID of the pay schedule associated with the pay period."]
5237    #[serde(default, skip_serializing_if = "Option::is_none")]
5238    pub pay_schedule_id: Option<String>,
5239}
5240
5241impl std::fmt::Display for PayPeriod {
5242    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5243        write!(
5244            f,
5245            "{}",
5246            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5247        )
5248    }
5249}
5250
5251#[cfg(feature = "tabled")]
5252impl tabled::Tabled for PayPeriod {
5253    const LENGTH: usize = 3;
5254    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5255        vec![
5256            if let Some(start_date) = &self.start_date {
5257                format!("{:?}", start_date).into()
5258            } else {
5259                String::new().into()
5260            },
5261            if let Some(end_date) = &self.end_date {
5262                format!("{:?}", end_date).into()
5263            } else {
5264                String::new().into()
5265            },
5266            if let Some(pay_schedule_id) = &self.pay_schedule_id {
5267                format!("{:?}", pay_schedule_id).into()
5268            } else {
5269                String::new().into()
5270            },
5271        ]
5272    }
5273
5274    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5275        vec![
5276            "start_date".into(),
5277            "end_date".into(),
5278            "pay_schedule_id".into(),
5279        ]
5280    }
5281}
5282
5283#[doc = "PayPeriodRequest."]
5284#[derive(
5285    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5286)]
5287pub struct PayPeriodRequest {
5288    #[doc = "The start date of the pay period."]
5289    #[serde(default, skip_serializing_if = "Option::is_none")]
5290    pub start_date: Option<String>,
5291    #[doc = "The end date of the pay period."]
5292    #[serde(default, skip_serializing_if = "Option::is_none")]
5293    pub end_date: Option<String>,
5294    #[doc = "The ID of the pay schedule associated with the pay period."]
5295    #[serde(default, skip_serializing_if = "Option::is_none")]
5296    pub pay_schedule_id: Option<String>,
5297}
5298
5299impl std::fmt::Display for PayPeriodRequest {
5300    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5301        write!(
5302            f,
5303            "{}",
5304            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5305        )
5306    }
5307}
5308
5309#[cfg(feature = "tabled")]
5310impl tabled::Tabled for PayPeriodRequest {
5311    const LENGTH: usize = 3;
5312    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5313        vec![
5314            if let Some(start_date) = &self.start_date {
5315                format!("{:?}", start_date).into()
5316            } else {
5317                String::new().into()
5318            },
5319            if let Some(end_date) = &self.end_date {
5320                format!("{:?}", end_date).into()
5321            } else {
5322                String::new().into()
5323            },
5324            if let Some(pay_schedule_id) = &self.pay_schedule_id {
5325                format!("{:?}", pay_schedule_id).into()
5326            } else {
5327                String::new().into()
5328            },
5329        ]
5330    }
5331
5332    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5333        vec![
5334            "start_date".into(),
5335            "end_date".into(),
5336            "pay_schedule_id".into(),
5337        ]
5338    }
5339}
5340
5341#[doc = "PieceRatePremiums."]
5342#[derive(
5343    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5344)]
5345pub struct PieceRatePremiums {
5346    #[doc = "The pay rate for this piece rate premium."]
5347    #[serde(default, skip_serializing_if = "Option::is_none")]
5348    pub premium_rate: Option<f64>,
5349    #[doc = "The total units produced at the premium rate."]
5350    #[serde(default, skip_serializing_if = "Option::is_none")]
5351    pub premium_units: Option<f64>,
5352}
5353
5354impl std::fmt::Display for PieceRatePremiums {
5355    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5356        write!(
5357            f,
5358            "{}",
5359            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5360        )
5361    }
5362}
5363
5364#[cfg(feature = "tabled")]
5365impl tabled::Tabled for PieceRatePremiums {
5366    const LENGTH: usize = 2;
5367    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5368        vec![
5369            if let Some(premium_rate) = &self.premium_rate {
5370                format!("{:?}", premium_rate).into()
5371            } else {
5372                String::new().into()
5373            },
5374            if let Some(premium_units) = &self.premium_units {
5375                format!("{:?}", premium_units).into()
5376            } else {
5377                String::new().into()
5378            },
5379        ]
5380    }
5381
5382    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5383        vec!["premium_rate".into(), "premium_units".into()]
5384    }
5385}
5386
5387#[doc = "Premiums."]
5388#[derive(
5389    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5390)]
5391pub struct Premiums {
5392    #[doc = "The pay rate for this premium."]
5393    #[serde(default, skip_serializing_if = "Option::is_none")]
5394    pub premium_rate: Option<f64>,
5395    #[doc = "The total hours worked for at the premium rate."]
5396    #[serde(default, skip_serializing_if = "Option::is_none")]
5397    pub premium_hours: Option<f64>,
5398}
5399
5400impl std::fmt::Display for Premiums {
5401    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5402        write!(
5403            f,
5404            "{}",
5405            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5406        )
5407    }
5408}
5409
5410#[cfg(feature = "tabled")]
5411impl tabled::Tabled for Premiums {
5412    const LENGTH: usize = 2;
5413    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5414        vec![
5415            if let Some(premium_rate) = &self.premium_rate {
5416                format!("{:?}", premium_rate).into()
5417            } else {
5418                String::new().into()
5419            },
5420            if let Some(premium_hours) = &self.premium_hours {
5421                format!("{:?}", premium_hours).into()
5422            } else {
5423                String::new().into()
5424            },
5425        ]
5426    }
5427
5428    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5429        vec!["premium_rate".into(), "premium_hours".into()]
5430    }
5431}
5432
5433#[doc = "Prototype."]
5434#[derive(
5435    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5436)]
5437pub struct Prototype {}
5438
5439impl std::fmt::Display for Prototype {
5440    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5441        write!(
5442            f,
5443            "{}",
5444            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5445        )
5446    }
5447}
5448
5449#[cfg(feature = "tabled")]
5450impl tabled::Tabled for Prototype {
5451    const LENGTH: usize = 0;
5452    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5453        vec![]
5454    }
5455
5456    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5457        vec![]
5458    }
5459}
5460
5461#[doc = "PrototypeJob."]
5462#[derive(
5463    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5464)]
5465pub struct PrototypeJob {
5466    #[doc = "Identifier field"]
5467    pub id: String,
5468    #[doc = "Record creation date"]
5469    pub created_at: String,
5470    #[doc = "Record update date"]
5471    pub updated_at: String,
5472    #[doc = "The worker's ID."]
5473    #[serde(default, skip_serializing_if = "Option::is_none")]
5474    pub prototype_id: Option<String>,
5475    #[doc = "Job title"]
5476    #[serde(default, skip_serializing_if = "Option::is_none")]
5477    pub title: Option<String>,
5478    #[doc = "Work location for the job\n\nExpandable field"]
5479    #[serde(default, skip_serializing_if = "Option::is_none")]
5480    pub work_location: Option<PrototypeWorkLocation>,
5481}
5482
5483impl std::fmt::Display for PrototypeJob {
5484    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5485        write!(
5486            f,
5487            "{}",
5488            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5489        )
5490    }
5491}
5492
5493#[cfg(feature = "tabled")]
5494impl tabled::Tabled for PrototypeJob {
5495    const LENGTH: usize = 6;
5496    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5497        vec![
5498            self.id.clone().into(),
5499            self.created_at.clone().into(),
5500            self.updated_at.clone().into(),
5501            if let Some(prototype_id) = &self.prototype_id {
5502                format!("{:?}", prototype_id).into()
5503            } else {
5504                String::new().into()
5505            },
5506            if let Some(title) = &self.title {
5507                format!("{:?}", title).into()
5508            } else {
5509                String::new().into()
5510            },
5511            if let Some(work_location) = &self.work_location {
5512                format!("{:?}", work_location).into()
5513            } else {
5514                String::new().into()
5515            },
5516        ]
5517    }
5518
5519    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5520        vec![
5521            "id".into(),
5522            "created_at".into(),
5523            "updated_at".into(),
5524            "prototype_id".into(),
5525            "title".into(),
5526            "work_location".into(),
5527        ]
5528    }
5529}
5530
5531#[doc = "PrototypeWorkLocation."]
5532#[derive(
5533    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5534)]
5535pub struct PrototypeWorkLocation {
5536    #[doc = "Identifier field"]
5537    pub id: String,
5538    #[doc = "Record creation date"]
5539    pub created_at: String,
5540    #[doc = "Record update date"]
5541    pub updated_at: String,
5542    #[doc = "Address for the work location"]
5543    #[serde(default, skip_serializing_if = "Option::is_none")]
5544    pub address: Option<String>,
5545    #[doc = "Whether the work location is remote"]
5546    #[serde(default, skip_serializing_if = "Option::is_none")]
5547    pub is_remote: Option<bool>,
5548}
5549
5550impl std::fmt::Display for PrototypeWorkLocation {
5551    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5552        write!(
5553            f,
5554            "{}",
5555            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5556        )
5557    }
5558}
5559
5560#[cfg(feature = "tabled")]
5561impl tabled::Tabled for PrototypeWorkLocation {
5562    const LENGTH: usize = 5;
5563    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5564        vec![
5565            self.id.clone().into(),
5566            self.created_at.clone().into(),
5567            self.updated_at.clone().into(),
5568            if let Some(address) = &self.address {
5569                format!("{:?}", address).into()
5570            } else {
5571                String::new().into()
5572            },
5573            if let Some(is_remote) = &self.is_remote {
5574                format!("{:?}", is_remote).into()
5575            } else {
5576                String::new().into()
5577            },
5578        ]
5579    }
5580
5581    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5582        vec![
5583            "id".into(),
5584            "created_at".into(),
5585            "updated_at".into(),
5586            "address".into(),
5587            "is_remote".into(),
5588        ]
5589    }
5590}
5591
5592#[doc = "Info about the redacted fields."]
5593#[derive(
5594    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5595)]
5596pub struct RedactedField {
5597    #[doc = "The name for the redacted field"]
5598    #[serde(default, skip_serializing_if = "Option::is_none")]
5599    pub name: Option<String>,
5600    #[doc = "The reason for the redaction"]
5601    #[serde(default, skip_serializing_if = "Option::is_none")]
5602    pub reason: Option<String>,
5603}
5604
5605impl std::fmt::Display for RedactedField {
5606    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5607        write!(
5608            f,
5609            "{}",
5610            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5611        )
5612    }
5613}
5614
5615#[cfg(feature = "tabled")]
5616impl tabled::Tabled for RedactedField {
5617    const LENGTH: usize = 2;
5618    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5619        vec![
5620            if let Some(name) = &self.name {
5621                format!("{:?}", name).into()
5622            } else {
5623                String::new().into()
5624            },
5625            if let Some(reason) = &self.reason {
5626                format!("{:?}", reason).into()
5627            } else {
5628                String::new().into()
5629            },
5630        ]
5631    }
5632
5633    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5634        vec!["name".into(), "reason".into()]
5635    }
5636}
5637
5638#[derive(
5639    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5640)]
5641pub struct RedactedFieldsRedactedFields {
5642    #[doc = "The name for the redacted field"]
5643    #[serde(default, skip_serializing_if = "Option::is_none")]
5644    pub name: Option<String>,
5645    #[doc = "The reason for the redaction"]
5646    #[serde(default, skip_serializing_if = "Option::is_none")]
5647    pub reason: Option<String>,
5648}
5649
5650impl std::fmt::Display for RedactedFieldsRedactedFields {
5651    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5652        write!(
5653            f,
5654            "{}",
5655            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5656        )
5657    }
5658}
5659
5660#[cfg(feature = "tabled")]
5661impl tabled::Tabled for RedactedFieldsRedactedFields {
5662    const LENGTH: usize = 2;
5663    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5664        vec![
5665            if let Some(name) = &self.name {
5666                format!("{:?}", name).into()
5667            } else {
5668                String::new().into()
5669            },
5670            if let Some(reason) = &self.reason {
5671                format!("{:?}", reason).into()
5672            } else {
5673                String::new().into()
5674            },
5675        ]
5676    }
5677
5678    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5679        vec!["name".into(), "reason".into()]
5680    }
5681}
5682
5683#[doc = "A list of redacted fields."]
5684#[derive(
5685    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5686)]
5687pub struct RedactedFields {
5688    #[serde(default, skip_serializing_if = "Option::is_none")]
5689    pub redacted_fields: Option<Vec<RedactedFieldsRedactedFields>>,
5690}
5691
5692impl std::fmt::Display for RedactedFields {
5693    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5694        write!(
5695            f,
5696            "{}",
5697            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5698        )
5699    }
5700}
5701
5702#[cfg(feature = "tabled")]
5703impl tabled::Tabled for RedactedFields {
5704    const LENGTH: usize = 1;
5705    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5706        vec![if let Some(redacted_fields) = &self.redacted_fields {
5707            format!("{:?}", redacted_fields).into()
5708        } else {
5709            String::new().into()
5710        }]
5711    }
5712
5713    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5714        vec!["redacted_fields".into()]
5715    }
5716}
5717
5718#[doc = "Ssome."]
5719#[derive(
5720    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5721)]
5722pub struct Ssome {
5723    #[doc = "Identifier field"]
5724    pub id: String,
5725    #[doc = "Record creation date"]
5726    pub created_at: String,
5727    #[doc = "Record update date"]
5728    pub updated_at: String,
5729    #[doc = "The user's work email address."]
5730    #[serde(default, skip_serializing_if = "Option::is_none")]
5731    pub work_email: Option<String>,
5732    #[doc = "The company ID of the user."]
5733    #[serde(default, skip_serializing_if = "Option::is_none")]
5734    pub company_id: Option<String>,
5735    #[doc = "The company of the user.\n\nExpandable field"]
5736    #[serde(default, skip_serializing_if = "Option::is_none")]
5737    pub company: Option<Company>,
5738}
5739
5740impl std::fmt::Display for Ssome {
5741    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5742        write!(
5743            f,
5744            "{}",
5745            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5746        )
5747    }
5748}
5749
5750#[cfg(feature = "tabled")]
5751impl tabled::Tabled for Ssome {
5752    const LENGTH: usize = 6;
5753    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5754        vec![
5755            self.id.clone().into(),
5756            self.created_at.clone().into(),
5757            self.updated_at.clone().into(),
5758            if let Some(work_email) = &self.work_email {
5759                format!("{:?}", work_email).into()
5760            } else {
5761                String::new().into()
5762            },
5763            if let Some(company_id) = &self.company_id {
5764                format!("{:?}", company_id).into()
5765            } else {
5766                String::new().into()
5767            },
5768            if let Some(company) = &self.company {
5769                format!("{:?}", company).into()
5770            } else {
5771                String::new().into()
5772            },
5773        ]
5774    }
5775
5776    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5777        vec![
5778            "id".into(),
5779            "created_at".into(),
5780            "updated_at".into(),
5781            "work_email".into(),
5782            "company_id".into(),
5783            "company".into(),
5784        ]
5785    }
5786}
5787
5788#[doc = "Segments."]
5789#[derive(
5790    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5791)]
5792pub struct Segments {
5793    #[doc = "The start time of the segment."]
5794    #[serde(default, skip_serializing_if = "Option::is_none")]
5795    pub start_time: Option<String>,
5796    #[doc = "The end time of the segment."]
5797    #[serde(default, skip_serializing_if = "Option::is_none")]
5798    pub end_time: Option<String>,
5799    #[doc = "The IDs of the job codes associated with the segment."]
5800    #[serde(default, skip_serializing_if = "Option::is_none")]
5801    pub job_codes_id: Option<Vec<String>>,
5802    #[doc = "The multiplier for overtime hours in this segment."]
5803    #[serde(default, skip_serializing_if = "Option::is_none")]
5804    pub ot_multiplier: Option<f64>,
5805    #[doc = "Name of the final earning for the segment."]
5806    #[serde(default, skip_serializing_if = "Option::is_none")]
5807    pub display_name: Option<String>,
5808    #[doc = "The ID of the break type."]
5809    #[serde(default, skip_serializing_if = "Option::is_none")]
5810    pub break_type_id: Option<String>,
5811    #[doc = "The pay rate for this segment."]
5812    #[serde(default, skip_serializing_if = "Option::is_none")]
5813    pub pay_rate: Option<f64>,
5814}
5815
5816impl std::fmt::Display for Segments {
5817    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5818        write!(
5819            f,
5820            "{}",
5821            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5822        )
5823    }
5824}
5825
5826#[cfg(feature = "tabled")]
5827impl tabled::Tabled for Segments {
5828    const LENGTH: usize = 7;
5829    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5830        vec![
5831            if let Some(start_time) = &self.start_time {
5832                format!("{:?}", start_time).into()
5833            } else {
5834                String::new().into()
5835            },
5836            if let Some(end_time) = &self.end_time {
5837                format!("{:?}", end_time).into()
5838            } else {
5839                String::new().into()
5840            },
5841            if let Some(job_codes_id) = &self.job_codes_id {
5842                format!("{:?}", job_codes_id).into()
5843            } else {
5844                String::new().into()
5845            },
5846            if let Some(ot_multiplier) = &self.ot_multiplier {
5847                format!("{:?}", ot_multiplier).into()
5848            } else {
5849                String::new().into()
5850            },
5851            if let Some(display_name) = &self.display_name {
5852                format!("{:?}", display_name).into()
5853            } else {
5854                String::new().into()
5855            },
5856            if let Some(break_type_id) = &self.break_type_id {
5857                format!("{:?}", break_type_id).into()
5858            } else {
5859                String::new().into()
5860            },
5861            if let Some(pay_rate) = &self.pay_rate {
5862                format!("{:?}", pay_rate).into()
5863            } else {
5864                String::new().into()
5865            },
5866        ]
5867    }
5868
5869    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5870        vec![
5871            "start_time".into(),
5872            "end_time".into(),
5873            "job_codes_id".into(),
5874            "ot_multiplier".into(),
5875            "display_name".into(),
5876            "break_type_id".into(),
5877            "pay_rate".into(),
5878        ]
5879    }
5880}
5881
5882#[doc = "ShiftInput."]
5883#[derive(
5884    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5885)]
5886pub struct ShiftInput {
5887    #[doc = "Identifier field"]
5888    pub id: String,
5889    #[doc = "Record creation date"]
5890    pub created_at: String,
5891    #[doc = "Record update date"]
5892    pub updated_at: String,
5893    #[doc = "The creator id associated with the shift input."]
5894    #[serde(default, skip_serializing_if = "Option::is_none")]
5895    pub creator_id: Option<String>,
5896    #[doc = "The creator associated with the shift input.\n\nExpandable field"]
5897    #[serde(default, skip_serializing_if = "Option::is_none")]
5898    pub creator: Option<Worker>,
5899    #[doc = "Name of the shift unit."]
5900    pub name: String,
5901    #[doc = "Prompt for the shift unit."]
5902    pub prompt: String,
5903    #[doc = "Type of shift unit."]
5904    #[serde(rename = "type")]
5905    pub type_: String,
5906    #[doc = "Two letter string designating country code which the shift input is associated."]
5907    pub country_code: String,
5908    #[doc = "The party that manages this shift input"]
5909    #[serde(default, skip_serializing_if = "Option::is_none")]
5910    pub managed_by: Option<String>,
5911}
5912
5913impl std::fmt::Display for ShiftInput {
5914    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5915        write!(
5916            f,
5917            "{}",
5918            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5919        )
5920    }
5921}
5922
5923#[cfg(feature = "tabled")]
5924impl tabled::Tabled for ShiftInput {
5925    const LENGTH: usize = 10;
5926    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5927        vec![
5928            self.id.clone().into(),
5929            self.created_at.clone().into(),
5930            self.updated_at.clone().into(),
5931            if let Some(creator_id) = &self.creator_id {
5932                format!("{:?}", creator_id).into()
5933            } else {
5934                String::new().into()
5935            },
5936            if let Some(creator) = &self.creator {
5937                format!("{:?}", creator).into()
5938            } else {
5939                String::new().into()
5940            },
5941            self.name.clone().into(),
5942            self.prompt.clone().into(),
5943            self.type_.clone().into(),
5944            self.country_code.clone().into(),
5945            if let Some(managed_by) = &self.managed_by {
5946                format!("{:?}", managed_by).into()
5947            } else {
5948                String::new().into()
5949            },
5950        ]
5951    }
5952
5953    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5954        vec![
5955            "id".into(),
5956            "created_at".into(),
5957            "updated_at".into(),
5958            "creator_id".into(),
5959            "creator".into(),
5960            "name".into(),
5961            "prompt".into(),
5962            "type_".into(),
5963            "country_code".into(),
5964            "managed_by".into(),
5965        ]
5966    }
5967}
5968
5969#[doc = "ShiftInputRequest."]
5970#[derive(
5971    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5972)]
5973pub struct ShiftInputRequest {
5974    #[doc = "The creator id associated with the shift input."]
5975    #[serde(default, skip_serializing_if = "Option::is_none")]
5976    pub creator_id: Option<String>,
5977    #[doc = "Name of the shift unit."]
5978    pub name: String,
5979    #[doc = "Prompt for the shift unit."]
5980    pub prompt: String,
5981    #[doc = "Type of shift unit."]
5982    #[serde(rename = "type")]
5983    pub type_: String,
5984    #[doc = "Two letter string designating country code which the shift input is associated."]
5985    pub country_code: String,
5986}
5987
5988impl std::fmt::Display for ShiftInputRequest {
5989    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5990        write!(
5991            f,
5992            "{}",
5993            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5994        )
5995    }
5996}
5997
5998#[cfg(feature = "tabled")]
5999impl tabled::Tabled for ShiftInputRequest {
6000    const LENGTH: usize = 5;
6001    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6002        vec![
6003            if let Some(creator_id) = &self.creator_id {
6004                format!("{:?}", creator_id).into()
6005            } else {
6006                String::new().into()
6007            },
6008            self.name.clone().into(),
6009            self.prompt.clone().into(),
6010            self.type_.clone().into(),
6011            self.country_code.clone().into(),
6012        ]
6013    }
6014
6015    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6016        vec![
6017            "creator_id".into(),
6018            "name".into(),
6019            "prompt".into(),
6020            "type_".into(),
6021            "country_code".into(),
6022        ]
6023    }
6024}
6025
6026#[doc = "ShiftInputValue."]
6027#[derive(
6028    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6029)]
6030pub struct ShiftInputValue {
6031    #[doc = "The id of the relevant shift input"]
6032    pub shift_input_id: String,
6033    #[doc = "The id of the role that last added/updated this input."]
6034    #[serde(default, skip_serializing_if = "Option::is_none")]
6035    pub author_id: Option<String>,
6036}
6037
6038impl std::fmt::Display for ShiftInputValue {
6039    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6040        write!(
6041            f,
6042            "{}",
6043            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6044        )
6045    }
6046}
6047
6048#[cfg(feature = "tabled")]
6049impl tabled::Tabled for ShiftInputValue {
6050    const LENGTH: usize = 2;
6051    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6052        vec![
6053            self.shift_input_id.clone().into(),
6054            if let Some(author_id) = &self.author_id {
6055                format!("{:?}", author_id).into()
6056            } else {
6057                String::new().into()
6058            },
6059        ]
6060    }
6061
6062    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6063        vec!["shift_input_id".into(), "author_id".into()]
6064    }
6065}
6066
6067#[doc = "ShiftInputValueRequest."]
6068#[derive(
6069    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6070)]
6071pub struct ShiftInputValueRequest {
6072    #[doc = "The id of the relevant shift input"]
6073    pub shift_input_id: String,
6074    #[doc = "The id of the role that last added/updated this input."]
6075    #[serde(default, skip_serializing_if = "Option::is_none")]
6076    pub author_id: Option<String>,
6077}
6078
6079impl std::fmt::Display for ShiftInputValueRequest {
6080    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6081        write!(
6082            f,
6083            "{}",
6084            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6085        )
6086    }
6087}
6088
6089#[cfg(feature = "tabled")]
6090impl tabled::Tabled for ShiftInputValueRequest {
6091    const LENGTH: usize = 2;
6092    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6093        vec![
6094            self.shift_input_id.clone().into(),
6095            if let Some(author_id) = &self.author_id {
6096                format!("{:?}", author_id).into()
6097            } else {
6098                String::new().into()
6099            },
6100        ]
6101    }
6102
6103    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6104        vec!["shift_input_id".into(), "author_id".into()]
6105    }
6106}
6107
6108#[doc = "Team."]
6109#[derive(
6110    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6111)]
6112pub struct Team {
6113    #[doc = "Identifier field"]
6114    pub id: String,
6115    #[doc = "Record creation date"]
6116    pub created_at: String,
6117    #[doc = "Record update date"]
6118    pub updated_at: String,
6119    #[doc = "The parent team"]
6120    #[serde(default, skip_serializing_if = "Option::is_none")]
6121    pub parent_id: Option<String>,
6122    #[doc = "The parent team\n\nExpandable field"]
6123    #[serde(default, skip_serializing_if = "Option::is_none")]
6124    pub parent: Option<Box<Team>>,
6125    #[doc = "The name of the team."]
6126    pub name: String,
6127}
6128
6129impl std::fmt::Display for Team {
6130    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6131        write!(
6132            f,
6133            "{}",
6134            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6135        )
6136    }
6137}
6138
6139#[cfg(feature = "tabled")]
6140impl tabled::Tabled for Team {
6141    const LENGTH: usize = 6;
6142    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6143        vec![
6144            self.id.clone().into(),
6145            self.created_at.clone().into(),
6146            self.updated_at.clone().into(),
6147            if let Some(parent_id) = &self.parent_id {
6148                format!("{:?}", parent_id).into()
6149            } else {
6150                String::new().into()
6151            },
6152            if let Some(parent) = &self.parent {
6153                format!("{:?}", parent).into()
6154            } else {
6155                String::new().into()
6156            },
6157            self.name.clone().into(),
6158        ]
6159    }
6160
6161    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6162        vec![
6163            "id".into(),
6164            "created_at".into(),
6165            "updated_at".into(),
6166            "parent_id".into(),
6167            "parent".into(),
6168            "name".into(),
6169        ]
6170    }
6171}
6172
6173#[doc = "The termination type indicates whether the termination was voluntary or involuntary."]
6174#[derive(
6175    serde :: Serialize,
6176    serde :: Deserialize,
6177    PartialEq,
6178    Hash,
6179    Debug,
6180    Clone,
6181    schemars :: JsonSchema,
6182    parse_display :: FromStr,
6183    parse_display :: Display,
6184)]
6185#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
6186#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
6187pub enum TerminationDetailsType {
6188    #[serde(rename = "VOLUNTARY")]
6189    #[display("VOLUNTARY")]
6190    Voluntary,
6191    #[serde(rename = "INVOLUNTARY")]
6192    #[display("INVOLUNTARY")]
6193    Involuntary,
6194    #[serde(rename = "RETIREMENT")]
6195    #[display("RETIREMENT")]
6196    Retirement,
6197    #[serde(rename = "DEATH")]
6198    #[display("DEATH")]
6199    Death,
6200    #[serde(rename = "ABANDONMENT")]
6201    #[display("ABANDONMENT")]
6202    Abandonment,
6203    #[serde(rename = "OFFER_DECLINED")]
6204    #[display("OFFER_DECLINED")]
6205    OfferDeclined,
6206    #[serde(rename = "RESCIND")]
6207    #[display("RESCIND")]
6208    Rescind,
6209    #[serde(rename = "RENEGE")]
6210    #[display("RENEGE")]
6211    Renege,
6212}
6213
6214#[doc = "TerminationDetails."]
6215#[derive(
6216    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6217)]
6218pub struct TerminationDetails {
6219    #[doc = "The termination type indicates whether the termination was voluntary or involuntary."]
6220    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
6221    pub type_: Option<TerminationDetailsType>,
6222    #[doc = "This is a description that will be custom to each Rippling company."]
6223    #[serde(default, skip_serializing_if = "Option::is_none")]
6224    pub reason: Option<String>,
6225}
6226
6227impl std::fmt::Display for TerminationDetails {
6228    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6229        write!(
6230            f,
6231            "{}",
6232            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6233        )
6234    }
6235}
6236
6237#[cfg(feature = "tabled")]
6238impl tabled::Tabled for TerminationDetails {
6239    const LENGTH: usize = 2;
6240    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6241        vec![
6242            if let Some(type_) = &self.type_ {
6243                format!("{:?}", type_).into()
6244            } else {
6245                String::new().into()
6246            },
6247            if let Some(reason) = &self.reason {
6248                format!("{:?}", reason).into()
6249            } else {
6250                String::new().into()
6251            },
6252        ]
6253    }
6254
6255    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6256        vec!["type_".into(), "reason".into()]
6257    }
6258}
6259
6260#[doc = "TimeCard."]
6261#[derive(
6262    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6263)]
6264pub struct TimeCard {
6265    #[doc = "Identifier field"]
6266    pub id: String,
6267    #[doc = "Record creation date"]
6268    pub created_at: String,
6269    #[doc = "Record update date"]
6270    pub updated_at: String,
6271    #[doc = "The ID of the worker associated with the time card."]
6272    pub worker_id: String,
6273    #[doc = "The worker associated with the time card.\n\nExpandable field"]
6274    #[serde(default, skip_serializing_if = "Option::is_none")]
6275    pub worker: Option<Worker>,
6276    #[doc = "The pay period associated with the time card."]
6277    #[serde(default, skip_serializing_if = "Option::is_none")]
6278    pub pay_period: Option<PayPeriod>,
6279    #[doc = "The summary of the time card."]
6280    #[serde(default, skip_serializing_if = "Option::is_none")]
6281    pub summary: Option<TimeCardSummary>,
6282}
6283
6284impl std::fmt::Display for TimeCard {
6285    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6286        write!(
6287            f,
6288            "{}",
6289            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6290        )
6291    }
6292}
6293
6294#[cfg(feature = "tabled")]
6295impl tabled::Tabled for TimeCard {
6296    const LENGTH: usize = 7;
6297    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6298        vec![
6299            self.id.clone().into(),
6300            self.created_at.clone().into(),
6301            self.updated_at.clone().into(),
6302            self.worker_id.clone().into(),
6303            if let Some(worker) = &self.worker {
6304                format!("{:?}", worker).into()
6305            } else {
6306                String::new().into()
6307            },
6308            if let Some(pay_period) = &self.pay_period {
6309                format!("{:?}", pay_period).into()
6310            } else {
6311                String::new().into()
6312            },
6313            if let Some(summary) = &self.summary {
6314                format!("{:?}", summary).into()
6315            } else {
6316                String::new().into()
6317            },
6318        ]
6319    }
6320
6321    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6322        vec![
6323            "id".into(),
6324            "created_at".into(),
6325            "updated_at".into(),
6326            "worker_id".into(),
6327            "worker".into(),
6328            "pay_period".into(),
6329            "summary".into(),
6330        ]
6331    }
6332}
6333
6334#[doc = "TimeCardSummary."]
6335#[derive(
6336    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6337)]
6338pub struct TimeCardSummary {
6339    #[doc = "The earnings for the pay period."]
6340    #[serde(default, skip_serializing_if = "Option::is_none")]
6341    pub earnings: Option<f64>,
6342    #[doc = "The amount of hours worked for each job code for the pay period."]
6343    #[serde(default, skip_serializing_if = "Option::is_none")]
6344    pub hours_worked_by_job_code: Option<Vec<JobCodeSummary>>,
6345    #[doc = "The premiums for the pay period."]
6346    #[serde(default, skip_serializing_if = "Option::is_none")]
6347    pub premiums: Option<f64>,
6348    #[doc = "The approved hours for the pay period."]
6349    #[serde(default, skip_serializing_if = "Option::is_none")]
6350    pub approved_hours: Option<f64>,
6351    #[doc = "The paid hours for the pay period."]
6352    #[serde(default, skip_serializing_if = "Option::is_none")]
6353    pub paid_hours: Option<f64>,
6354    #[doc = "The total hours for the pay period."]
6355    #[serde(default, skip_serializing_if = "Option::is_none")]
6356    pub total_hours: Option<f64>,
6357    #[doc = "The total paid time off hours for the pay period."]
6358    #[serde(default, skip_serializing_if = "Option::is_none")]
6359    pub total_paid_time_off_hours: Option<f64>,
6360    #[doc = "The total holiday hours for the pay period."]
6361    #[serde(default, skip_serializing_if = "Option::is_none")]
6362    pub total_holiday_hours: Option<f64>,
6363    #[doc = "The total unpaid time off hours for the pay period."]
6364    #[serde(default, skip_serializing_if = "Option::is_none")]
6365    pub total_unpaid_time_off_hours: Option<f64>,
6366    #[doc = "The total number of regular hours worked during the pay period."]
6367    #[serde(default, skip_serializing_if = "Option::is_none")]
6368    pub regular_hours: Option<f64>,
6369    #[doc = "The total number of overtime hours worked during the pay period."]
6370    #[serde(default, skip_serializing_if = "Option::is_none")]
6371    pub overtime_hours: Option<f64>,
6372    #[doc = "The total number of doubletime hours worked during the pay period."]
6373    #[serde(default, skip_serializing_if = "Option::is_none")]
6374    pub double_overtime_hours: Option<f64>,
6375    #[doc = "The map of time entry to unpaidBreakHours in seconds"]
6376    #[serde(default, skip_serializing_if = "Option::is_none")]
6377    pub unpaid_break_hours_by_entry: Option<f64>,
6378}
6379
6380impl std::fmt::Display for TimeCardSummary {
6381    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6382        write!(
6383            f,
6384            "{}",
6385            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6386        )
6387    }
6388}
6389
6390#[cfg(feature = "tabled")]
6391impl tabled::Tabled for TimeCardSummary {
6392    const LENGTH: usize = 13;
6393    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6394        vec![
6395            if let Some(earnings) = &self.earnings {
6396                format!("{:?}", earnings).into()
6397            } else {
6398                String::new().into()
6399            },
6400            if let Some(hours_worked_by_job_code) = &self.hours_worked_by_job_code {
6401                format!("{:?}", hours_worked_by_job_code).into()
6402            } else {
6403                String::new().into()
6404            },
6405            if let Some(premiums) = &self.premiums {
6406                format!("{:?}", premiums).into()
6407            } else {
6408                String::new().into()
6409            },
6410            if let Some(approved_hours) = &self.approved_hours {
6411                format!("{:?}", approved_hours).into()
6412            } else {
6413                String::new().into()
6414            },
6415            if let Some(paid_hours) = &self.paid_hours {
6416                format!("{:?}", paid_hours).into()
6417            } else {
6418                String::new().into()
6419            },
6420            if let Some(total_hours) = &self.total_hours {
6421                format!("{:?}", total_hours).into()
6422            } else {
6423                String::new().into()
6424            },
6425            if let Some(total_paid_time_off_hours) = &self.total_paid_time_off_hours {
6426                format!("{:?}", total_paid_time_off_hours).into()
6427            } else {
6428                String::new().into()
6429            },
6430            if let Some(total_holiday_hours) = &self.total_holiday_hours {
6431                format!("{:?}", total_holiday_hours).into()
6432            } else {
6433                String::new().into()
6434            },
6435            if let Some(total_unpaid_time_off_hours) = &self.total_unpaid_time_off_hours {
6436                format!("{:?}", total_unpaid_time_off_hours).into()
6437            } else {
6438                String::new().into()
6439            },
6440            if let Some(regular_hours) = &self.regular_hours {
6441                format!("{:?}", regular_hours).into()
6442            } else {
6443                String::new().into()
6444            },
6445            if let Some(overtime_hours) = &self.overtime_hours {
6446                format!("{:?}", overtime_hours).into()
6447            } else {
6448                String::new().into()
6449            },
6450            if let Some(double_overtime_hours) = &self.double_overtime_hours {
6451                format!("{:?}", double_overtime_hours).into()
6452            } else {
6453                String::new().into()
6454            },
6455            if let Some(unpaid_break_hours_by_entry) = &self.unpaid_break_hours_by_entry {
6456                format!("{:?}", unpaid_break_hours_by_entry).into()
6457            } else {
6458                String::new().into()
6459            },
6460        ]
6461    }
6462
6463    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6464        vec![
6465            "earnings".into(),
6466            "hours_worked_by_job_code".into(),
6467            "premiums".into(),
6468            "approved_hours".into(),
6469            "paid_hours".into(),
6470            "total_hours".into(),
6471            "total_paid_time_off_hours".into(),
6472            "total_holiday_hours".into(),
6473            "total_unpaid_time_off_hours".into(),
6474            "regular_hours".into(),
6475            "overtime_hours".into(),
6476            "double_overtime_hours".into(),
6477            "unpaid_break_hours_by_entry".into(),
6478        ]
6479    }
6480}
6481
6482#[doc = "The status of the time entry."]
6483#[derive(
6484    serde :: Serialize,
6485    serde :: Deserialize,
6486    PartialEq,
6487    Hash,
6488    Debug,
6489    Clone,
6490    schemars :: JsonSchema,
6491    parse_display :: FromStr,
6492    parse_display :: Display,
6493)]
6494#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
6495#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
6496pub enum TimeEntryStatus {
6497    #[serde(rename = "DRAFT")]
6498    #[display("DRAFT")]
6499    Draft,
6500    #[serde(rename = "APPROVED")]
6501    #[display("APPROVED")]
6502    Approved,
6503    #[serde(rename = "PAID")]
6504    #[display("PAID")]
6505    Paid,
6506    #[serde(rename = "FINALIZED")]
6507    #[display("FINALIZED")]
6508    Finalized,
6509}
6510
6511#[doc = "TimeEntry."]
6512#[derive(
6513    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6514)]
6515pub struct TimeEntry {
6516    #[doc = "Identifier field"]
6517    pub id: String,
6518    #[doc = "Record creation date"]
6519    pub created_at: String,
6520    #[doc = "Record update date"]
6521    pub updated_at: String,
6522    #[doc = "The ID of the worker associated with the time entry."]
6523    pub worker_id: String,
6524    #[doc = "The worker associated with the time entry.\n\nExpandable field"]
6525    #[serde(default, skip_serializing_if = "Option::is_none")]
6526    pub worker: Option<Worker>,
6527    #[doc = "The start time of the time entry."]
6528    #[serde(default, skip_serializing_if = "Option::is_none")]
6529    pub start_time: Option<String>,
6530    #[doc = "The end time of the time entry."]
6531    #[serde(default, skip_serializing_if = "Option::is_none")]
6532    pub end_time: Option<String>,
6533    #[doc = "The comments associated with the time entry."]
6534    #[serde(default, skip_serializing_if = "Option::is_none")]
6535    pub comments: Option<Vec<TimeEntryComment>>,
6536    #[doc = "The job shifts worked during the time entry."]
6537    #[serde(default, skip_serializing_if = "Option::is_none")]
6538    pub job_shifts: Option<Vec<JobShift>>,
6539    #[doc = "The breaks taken during the time entry."]
6540    #[serde(default, skip_serializing_if = "Option::is_none")]
6541    pub breaks: Option<Vec<Break>>,
6542    #[doc = "The premiums earned during the time entry."]
6543    #[serde(default, skip_serializing_if = "Option::is_none")]
6544    pub premiums: Option<Vec<Premiums>>,
6545    #[doc = "The piece-rate premiums earned during the time entry."]
6546    #[serde(default, skip_serializing_if = "Option::is_none")]
6547    pub piece_rate_premiums: Option<Vec<PieceRatePremiums>>,
6548    #[doc = "The pay rates for each segment of the time entry."]
6549    #[serde(default, skip_serializing_if = "Option::is_none")]
6550    pub segments: Option<Vec<Segments>>,
6551    #[doc = "A summary of the time entry."]
6552    #[serde(default, skip_serializing_if = "Option::is_none")]
6553    pub time_entry_summary: Option<TimeEntrySummary>,
6554    #[doc = "The ID of the time card associated with the time entry."]
6555    #[serde(default, skip_serializing_if = "Option::is_none")]
6556    pub time_card_id: Option<String>,
6557    #[doc = "The time card associated with the time entry.\n\nExpandable field"]
6558    #[serde(default, skip_serializing_if = "Option::is_none")]
6559    pub time_card: Option<TimeCard>,
6560    #[doc = "The tags associated with the time entry."]
6561    #[serde(default, skip_serializing_if = "Option::is_none")]
6562    pub tags: Option<Vec<String>>,
6563    #[doc = "The unique key of the time entry in an outside system. If set, no other time entry \
6564             with the same key can be created."]
6565    #[serde(default, skip_serializing_if = "Option::is_none")]
6566    pub idempotency_key: Option<String>,
6567    #[doc = "Whether the time entry should create an extra hours run."]
6568    #[serde(default, skip_serializing_if = "Option::is_none")]
6569    pub create_extra_hours_run: Option<bool>,
6570    #[doc = "The status of the time entry."]
6571    #[serde(default, skip_serializing_if = "Option::is_none")]
6572    pub status: Option<TimeEntryStatus>,
6573    #[doc = "The pay period associated with the time card."]
6574    #[serde(default, skip_serializing_if = "Option::is_none")]
6575    pub pay_period: Option<PayPeriod>,
6576    #[doc = "Arbitrary shift inputs collected on the time entry"]
6577    #[serde(default, skip_serializing_if = "Option::is_none")]
6578    pub shift_input_values: Option<Vec<ShiftInputValue>>,
6579}
6580
6581impl std::fmt::Display for TimeEntry {
6582    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6583        write!(
6584            f,
6585            "{}",
6586            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6587        )
6588    }
6589}
6590
6591#[cfg(feature = "tabled")]
6592impl tabled::Tabled for TimeEntry {
6593    const LENGTH: usize = 22;
6594    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6595        vec![
6596            self.id.clone().into(),
6597            self.created_at.clone().into(),
6598            self.updated_at.clone().into(),
6599            self.worker_id.clone().into(),
6600            if let Some(worker) = &self.worker {
6601                format!("{:?}", worker).into()
6602            } else {
6603                String::new().into()
6604            },
6605            if let Some(start_time) = &self.start_time {
6606                format!("{:?}", start_time).into()
6607            } else {
6608                String::new().into()
6609            },
6610            if let Some(end_time) = &self.end_time {
6611                format!("{:?}", end_time).into()
6612            } else {
6613                String::new().into()
6614            },
6615            if let Some(comments) = &self.comments {
6616                format!("{:?}", comments).into()
6617            } else {
6618                String::new().into()
6619            },
6620            if let Some(job_shifts) = &self.job_shifts {
6621                format!("{:?}", job_shifts).into()
6622            } else {
6623                String::new().into()
6624            },
6625            if let Some(breaks) = &self.breaks {
6626                format!("{:?}", breaks).into()
6627            } else {
6628                String::new().into()
6629            },
6630            if let Some(premiums) = &self.premiums {
6631                format!("{:?}", premiums).into()
6632            } else {
6633                String::new().into()
6634            },
6635            if let Some(piece_rate_premiums) = &self.piece_rate_premiums {
6636                format!("{:?}", piece_rate_premiums).into()
6637            } else {
6638                String::new().into()
6639            },
6640            if let Some(segments) = &self.segments {
6641                format!("{:?}", segments).into()
6642            } else {
6643                String::new().into()
6644            },
6645            if let Some(time_entry_summary) = &self.time_entry_summary {
6646                format!("{:?}", time_entry_summary).into()
6647            } else {
6648                String::new().into()
6649            },
6650            if let Some(time_card_id) = &self.time_card_id {
6651                format!("{:?}", time_card_id).into()
6652            } else {
6653                String::new().into()
6654            },
6655            if let Some(time_card) = &self.time_card {
6656                format!("{:?}", time_card).into()
6657            } else {
6658                String::new().into()
6659            },
6660            if let Some(tags) = &self.tags {
6661                format!("{:?}", tags).into()
6662            } else {
6663                String::new().into()
6664            },
6665            if let Some(idempotency_key) = &self.idempotency_key {
6666                format!("{:?}", idempotency_key).into()
6667            } else {
6668                String::new().into()
6669            },
6670            if let Some(create_extra_hours_run) = &self.create_extra_hours_run {
6671                format!("{:?}", create_extra_hours_run).into()
6672            } else {
6673                String::new().into()
6674            },
6675            if let Some(status) = &self.status {
6676                format!("{:?}", status).into()
6677            } else {
6678                String::new().into()
6679            },
6680            if let Some(pay_period) = &self.pay_period {
6681                format!("{:?}", pay_period).into()
6682            } else {
6683                String::new().into()
6684            },
6685            if let Some(shift_input_values) = &self.shift_input_values {
6686                format!("{:?}", shift_input_values).into()
6687            } else {
6688                String::new().into()
6689            },
6690        ]
6691    }
6692
6693    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6694        vec![
6695            "id".into(),
6696            "created_at".into(),
6697            "updated_at".into(),
6698            "worker_id".into(),
6699            "worker".into(),
6700            "start_time".into(),
6701            "end_time".into(),
6702            "comments".into(),
6703            "job_shifts".into(),
6704            "breaks".into(),
6705            "premiums".into(),
6706            "piece_rate_premiums".into(),
6707            "segments".into(),
6708            "time_entry_summary".into(),
6709            "time_card_id".into(),
6710            "time_card".into(),
6711            "tags".into(),
6712            "idempotency_key".into(),
6713            "create_extra_hours_run".into(),
6714            "status".into(),
6715            "pay_period".into(),
6716            "shift_input_values".into(),
6717        ]
6718    }
6719}
6720
6721#[doc = "TimeEntryComment."]
6722#[derive(
6723    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6724)]
6725pub struct TimeEntryComment {
6726    #[doc = "The time the comment was created."]
6727    #[serde(default, skip_serializing_if = "Option::is_none")]
6728    pub created_at: Option<String>,
6729    #[doc = "The ID of the worker who made of the comment."]
6730    #[serde(default, skip_serializing_if = "Option::is_none")]
6731    pub author_id: Option<String>,
6732    #[doc = "The text of the comment."]
6733    #[serde(default, skip_serializing_if = "Option::is_none")]
6734    pub text: Option<String>,
6735}
6736
6737impl std::fmt::Display for TimeEntryComment {
6738    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6739        write!(
6740            f,
6741            "{}",
6742            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6743        )
6744    }
6745}
6746
6747#[cfg(feature = "tabled")]
6748impl tabled::Tabled for TimeEntryComment {
6749    const LENGTH: usize = 3;
6750    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6751        vec![
6752            if let Some(created_at) = &self.created_at {
6753                format!("{:?}", created_at).into()
6754            } else {
6755                String::new().into()
6756            },
6757            if let Some(author_id) = &self.author_id {
6758                format!("{:?}", author_id).into()
6759            } else {
6760                String::new().into()
6761            },
6762            if let Some(text) = &self.text {
6763                format!("{:?}", text).into()
6764            } else {
6765                String::new().into()
6766            },
6767        ]
6768    }
6769
6770    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6771        vec!["created_at".into(), "author_id".into(), "text".into()]
6772    }
6773}
6774
6775#[doc = "TimeEntryCommentRequest."]
6776#[derive(
6777    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6778)]
6779pub struct TimeEntryCommentRequest {
6780    #[doc = "The text of the comment."]
6781    #[serde(default, skip_serializing_if = "Option::is_none")]
6782    pub text: Option<String>,
6783}
6784
6785impl std::fmt::Display for TimeEntryCommentRequest {
6786    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6787        write!(
6788            f,
6789            "{}",
6790            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6791        )
6792    }
6793}
6794
6795#[cfg(feature = "tabled")]
6796impl tabled::Tabled for TimeEntryCommentRequest {
6797    const LENGTH: usize = 1;
6798    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6799        vec![if let Some(text) = &self.text {
6800            format!("{:?}", text).into()
6801        } else {
6802            String::new().into()
6803        }]
6804    }
6805
6806    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6807        vec!["text".into()]
6808    }
6809}
6810
6811#[doc = "The status of the time entry."]
6812#[derive(
6813    serde :: Serialize,
6814    serde :: Deserialize,
6815    PartialEq,
6816    Hash,
6817    Debug,
6818    Clone,
6819    schemars :: JsonSchema,
6820    parse_display :: FromStr,
6821    parse_display :: Display,
6822)]
6823#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
6824#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
6825pub enum TimeEntryRequestStatus {
6826    #[serde(rename = "DRAFT")]
6827    #[display("DRAFT")]
6828    Draft,
6829    #[serde(rename = "APPROVED")]
6830    #[display("APPROVED")]
6831    Approved,
6832    #[serde(rename = "PAID")]
6833    #[display("PAID")]
6834    Paid,
6835    #[serde(rename = "FINALIZED")]
6836    #[display("FINALIZED")]
6837    Finalized,
6838}
6839
6840#[doc = "TimeEntryRequest."]
6841#[derive(
6842    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6843)]
6844pub struct TimeEntryRequest {
6845    #[doc = "The ID of the worker associated with the time entry."]
6846    pub worker_id: String,
6847    #[doc = "The duration of the time entry."]
6848    #[serde(default, skip_serializing_if = "Option::is_none")]
6849    pub duration: Option<f64>,
6850    #[doc = "The comments associated with the time entry."]
6851    #[serde(default, skip_serializing_if = "Option::is_none")]
6852    pub comments: Option<Vec<TimeEntryCommentRequest>>,
6853    #[doc = "The job shifts worked during the time entry."]
6854    #[serde(default, skip_serializing_if = "Option::is_none")]
6855    pub job_shifts: Option<Vec<JobShiftRequest>>,
6856    #[doc = "The breaks taken during the time entry."]
6857    #[serde(default, skip_serializing_if = "Option::is_none")]
6858    pub breaks: Option<Vec<BreakRequest>>,
6859    #[doc = "The tags associated with the time entry."]
6860    #[serde(default, skip_serializing_if = "Option::is_none")]
6861    pub tags: Option<Vec<String>>,
6862    #[doc = "The unique key of the time entry in an outside system. If set, no other time entry \
6863             with the same key can be created."]
6864    #[serde(default, skip_serializing_if = "Option::is_none")]
6865    pub idempotency_key: Option<String>,
6866    #[doc = "Whether the time entry should create an extra hours run."]
6867    #[serde(default, skip_serializing_if = "Option::is_none")]
6868    pub create_extra_hours_run: Option<bool>,
6869    #[doc = "The status of the time entry."]
6870    #[serde(default, skip_serializing_if = "Option::is_none")]
6871    pub status: Option<TimeEntryRequestStatus>,
6872    #[doc = "The pay period associated with the time card."]
6873    #[serde(default, skip_serializing_if = "Option::is_none")]
6874    pub pay_period: Option<PayPeriodRequest>,
6875    #[doc = "Arbitrary shift inputs collected on the time entry"]
6876    #[serde(default, skip_serializing_if = "Option::is_none")]
6877    pub shift_input_values: Option<Vec<ShiftInputValueRequest>>,
6878}
6879
6880impl std::fmt::Display for TimeEntryRequest {
6881    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6882        write!(
6883            f,
6884            "{}",
6885            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6886        )
6887    }
6888}
6889
6890#[cfg(feature = "tabled")]
6891impl tabled::Tabled for TimeEntryRequest {
6892    const LENGTH: usize = 11;
6893    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6894        vec![
6895            self.worker_id.clone().into(),
6896            if let Some(duration) = &self.duration {
6897                format!("{:?}", duration).into()
6898            } else {
6899                String::new().into()
6900            },
6901            if let Some(comments) = &self.comments {
6902                format!("{:?}", comments).into()
6903            } else {
6904                String::new().into()
6905            },
6906            if let Some(job_shifts) = &self.job_shifts {
6907                format!("{:?}", job_shifts).into()
6908            } else {
6909                String::new().into()
6910            },
6911            if let Some(breaks) = &self.breaks {
6912                format!("{:?}", breaks).into()
6913            } else {
6914                String::new().into()
6915            },
6916            if let Some(tags) = &self.tags {
6917                format!("{:?}", tags).into()
6918            } else {
6919                String::new().into()
6920            },
6921            if let Some(idempotency_key) = &self.idempotency_key {
6922                format!("{:?}", idempotency_key).into()
6923            } else {
6924                String::new().into()
6925            },
6926            if let Some(create_extra_hours_run) = &self.create_extra_hours_run {
6927                format!("{:?}", create_extra_hours_run).into()
6928            } else {
6929                String::new().into()
6930            },
6931            if let Some(status) = &self.status {
6932                format!("{:?}", status).into()
6933            } else {
6934                String::new().into()
6935            },
6936            if let Some(pay_period) = &self.pay_period {
6937                format!("{:?}", pay_period).into()
6938            } else {
6939                String::new().into()
6940            },
6941            if let Some(shift_input_values) = &self.shift_input_values {
6942                format!("{:?}", shift_input_values).into()
6943            } else {
6944                String::new().into()
6945            },
6946        ]
6947    }
6948
6949    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6950        vec![
6951            "worker_id".into(),
6952            "duration".into(),
6953            "comments".into(),
6954            "job_shifts".into(),
6955            "breaks".into(),
6956            "tags".into(),
6957            "idempotency_key".into(),
6958            "create_extra_hours_run".into(),
6959            "status".into(),
6960            "pay_period".into(),
6961            "shift_input_values".into(),
6962        ]
6963    }
6964}
6965
6966#[doc = "\nDTO used to store the summary of a TimeEntry\n"]
6967#[derive(
6968    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6969)]
6970pub struct TimeEntrySummary {
6971    #[doc = "The number of overtime hours worked during this time entry."]
6972    #[serde(default, skip_serializing_if = "Option::is_none")]
6973    pub over_time_hours: Option<f64>,
6974    #[doc = "The number of double overtime hours worked during this time entry."]
6975    #[serde(default, skip_serializing_if = "Option::is_none")]
6976    pub double_over_time_hours: Option<f64>,
6977    #[doc = "The number of regular hours worked during this time entry."]
6978    #[serde(default, skip_serializing_if = "Option::is_none")]
6979    pub regular_hours: Option<f64>,
6980    #[doc = "The duration of the time entry."]
6981    #[serde(default, skip_serializing_if = "Option::is_none")]
6982    pub duration: Option<f64>,
6983}
6984
6985impl std::fmt::Display for TimeEntrySummary {
6986    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6987        write!(
6988            f,
6989            "{}",
6990            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6991        )
6992    }
6993}
6994
6995#[cfg(feature = "tabled")]
6996impl tabled::Tabled for TimeEntrySummary {
6997    const LENGTH: usize = 4;
6998    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6999        vec![
7000            if let Some(over_time_hours) = &self.over_time_hours {
7001                format!("{:?}", over_time_hours).into()
7002            } else {
7003                String::new().into()
7004            },
7005            if let Some(double_over_time_hours) = &self.double_over_time_hours {
7006                format!("{:?}", double_over_time_hours).into()
7007            } else {
7008                String::new().into()
7009            },
7010            if let Some(regular_hours) = &self.regular_hours {
7011                format!("{:?}", regular_hours).into()
7012            } else {
7013                String::new().into()
7014            },
7015            if let Some(duration) = &self.duration {
7016                format!("{:?}", duration).into()
7017            } else {
7018                String::new().into()
7019            },
7020        ]
7021    }
7022
7023    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
7024        vec![
7025            "over_time_hours".into(),
7026            "double_over_time_hours".into(),
7027            "regular_hours".into(),
7028            "duration".into(),
7029        ]
7030    }
7031}
7032
7033#[doc = "Track."]
7034#[derive(
7035    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
7036)]
7037pub struct Track {
7038    #[doc = "Identifier field"]
7039    pub id: String,
7040    #[doc = "Record creation date"]
7041    pub created_at: String,
7042    #[doc = "Record update date"]
7043    pub updated_at: String,
7044    #[doc = "The name of the track. Must be unique within the company or organization."]
7045    pub name: String,
7046}
7047
7048impl std::fmt::Display for Track {
7049    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7050        write!(
7051            f,
7052            "{}",
7053            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7054        )
7055    }
7056}
7057
7058#[cfg(feature = "tabled")]
7059impl tabled::Tabled for Track {
7060    const LENGTH: usize = 4;
7061    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
7062        vec![
7063            self.id.clone().into(),
7064            self.created_at.clone().into(),
7065            self.updated_at.clone().into(),
7066            self.name.clone().into(),
7067        ]
7068    }
7069
7070    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
7071        vec![
7072            "id".into(),
7073            "created_at".into(),
7074            "updated_at".into(),
7075            "name".into(),
7076        ]
7077    }
7078}
7079
7080#[doc = "User."]
7081#[derive(
7082    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
7083)]
7084pub struct User {
7085    #[doc = "Identifier field"]
7086    pub id: String,
7087    #[doc = "Record creation date"]
7088    pub created_at: String,
7089    #[doc = "Record update date"]
7090    pub updated_at: String,
7091    #[doc = "Whether the user is able to access company resources, typically when they are in \
7092             actively engaged with the company and not after off-boarding."]
7093    #[serde(default, skip_serializing_if = "Option::is_none")]
7094    pub active: Option<bool>,
7095    #[doc = "The unique identifier across Rippling used by the User for direct authentication \
7096             into their associated company. Globally unique."]
7097    #[serde(default, skip_serializing_if = "Option::is_none")]
7098    pub username: Option<String>,
7099    #[doc = "The user's name."]
7100    #[serde(default, skip_serializing_if = "Option::is_none")]
7101    pub name: Option<UserName>,
7102    #[doc = "The display name of the user using either the concatenated preferred given and \
7103             family name or username depending on availability."]
7104    #[serde(default, skip_serializing_if = "Option::is_none")]
7105    pub display_name: Option<String>,
7106    #[doc = "The user's email addresses."]
7107    #[serde(default, skip_serializing_if = "Option::is_none")]
7108    pub emails: Option<Vec<Email>>,
7109    #[doc = "The user's phone numbers."]
7110    #[serde(default, skip_serializing_if = "Option::is_none")]
7111    pub phone_numbers: Option<Vec<UserPhoneNumber>>,
7112    #[doc = "The user's addresses."]
7113    #[serde(default, skip_serializing_if = "Option::is_none")]
7114    pub addresses: Option<Vec<UserAddress>>,
7115    #[doc = "The user's photos."]
7116    #[serde(default, skip_serializing_if = "Option::is_none")]
7117    pub photos: Option<Vec<UserPhoto>>,
7118    #[doc = "The User's preferred written or spoken language in the same format of the HTTP \
7119             Accept-Language header, pursuant to Section 5.3.5 of RFC7231."]
7120    #[serde(default, skip_serializing_if = "Option::is_none")]
7121    pub preferred_language: Option<String>,
7122    #[doc = "The User's default location for purposes of localization of currency, date time \
7123             format, or numerical representations pursuant to RFC5646."]
7124    #[serde(default, skip_serializing_if = "Option::is_none")]
7125    pub locale: Option<String>,
7126    #[doc = "The User's current time zone in IANA database Olson format"]
7127    #[serde(default, skip_serializing_if = "Option::is_none")]
7128    pub timezone: Option<String>,
7129}
7130
7131impl std::fmt::Display for User {
7132    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7133        write!(
7134            f,
7135            "{}",
7136            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7137        )
7138    }
7139}
7140
7141#[cfg(feature = "tabled")]
7142impl tabled::Tabled for User {
7143    const LENGTH: usize = 14;
7144    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
7145        vec![
7146            self.id.clone().into(),
7147            self.created_at.clone().into(),
7148            self.updated_at.clone().into(),
7149            if let Some(active) = &self.active {
7150                format!("{:?}", active).into()
7151            } else {
7152                String::new().into()
7153            },
7154            if let Some(username) = &self.username {
7155                format!("{:?}", username).into()
7156            } else {
7157                String::new().into()
7158            },
7159            if let Some(name) = &self.name {
7160                format!("{:?}", name).into()
7161            } else {
7162                String::new().into()
7163            },
7164            if let Some(display_name) = &self.display_name {
7165                format!("{:?}", display_name).into()
7166            } else {
7167                String::new().into()
7168            },
7169            if let Some(emails) = &self.emails {
7170                format!("{:?}", emails).into()
7171            } else {
7172                String::new().into()
7173            },
7174            if let Some(phone_numbers) = &self.phone_numbers {
7175                format!("{:?}", phone_numbers).into()
7176            } else {
7177                String::new().into()
7178            },
7179            if let Some(addresses) = &self.addresses {
7180                format!("{:?}", addresses).into()
7181            } else {
7182                String::new().into()
7183            },
7184            if let Some(photos) = &self.photos {
7185                format!("{:?}", photos).into()
7186            } else {
7187                String::new().into()
7188            },
7189            if let Some(preferred_language) = &self.preferred_language {
7190                format!("{:?}", preferred_language).into()
7191            } else {
7192                String::new().into()
7193            },
7194            if let Some(locale) = &self.locale {
7195                format!("{:?}", locale).into()
7196            } else {
7197                String::new().into()
7198            },
7199            if let Some(timezone) = &self.timezone {
7200                format!("{:?}", timezone).into()
7201            } else {
7202                String::new().into()
7203            },
7204        ]
7205    }
7206
7207    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
7208        vec![
7209            "id".into(),
7210            "created_at".into(),
7211            "updated_at".into(),
7212            "active".into(),
7213            "username".into(),
7214            "name".into(),
7215            "display_name".into(),
7216            "emails".into(),
7217            "phone_numbers".into(),
7218            "addresses".into(),
7219            "photos".into(),
7220            "preferred_language".into(),
7221            "locale".into(),
7222            "timezone".into(),
7223        ]
7224    }
7225}
7226
7227#[doc = "The country component, pursuant to SCIM RFC 7643 4.1.2."]
7228#[derive(
7229    serde :: Serialize,
7230    serde :: Deserialize,
7231    PartialEq,
7232    Hash,
7233    Debug,
7234    Clone,
7235    schemars :: JsonSchema,
7236    parse_display :: FromStr,
7237    parse_display :: Display,
7238)]
7239#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
7240#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
7241pub enum UserAddressCountry {
7242    #[serde(rename = "AF")]
7243    #[display("AF")]
7244    Af,
7245    #[serde(rename = "AX")]
7246    #[display("AX")]
7247    Ax,
7248    #[serde(rename = "AL")]
7249    #[display("AL")]
7250    Al,
7251    #[serde(rename = "DZ")]
7252    #[display("DZ")]
7253    Dz,
7254    #[serde(rename = "AS")]
7255    #[display("AS")]
7256    As,
7257    #[serde(rename = "AD")]
7258    #[display("AD")]
7259    Ad,
7260    #[serde(rename = "AO")]
7261    #[display("AO")]
7262    Ao,
7263    #[serde(rename = "AI")]
7264    #[display("AI")]
7265    Ai,
7266    #[serde(rename = "AQ")]
7267    #[display("AQ")]
7268    Aq,
7269    #[serde(rename = "AG")]
7270    #[display("AG")]
7271    Ag,
7272    #[serde(rename = "AR")]
7273    #[display("AR")]
7274    Ar,
7275    #[serde(rename = "AM")]
7276    #[display("AM")]
7277    Am,
7278    #[serde(rename = "AW")]
7279    #[display("AW")]
7280    Aw,
7281    #[serde(rename = "AU")]
7282    #[display("AU")]
7283    Au,
7284    #[serde(rename = "AT")]
7285    #[display("AT")]
7286    At,
7287    #[serde(rename = "AZ")]
7288    #[display("AZ")]
7289    Az,
7290    #[serde(rename = "BS")]
7291    #[display("BS")]
7292    Bs,
7293    #[serde(rename = "BH")]
7294    #[display("BH")]
7295    Bh,
7296    #[serde(rename = "BD")]
7297    #[display("BD")]
7298    Bd,
7299    #[serde(rename = "BB")]
7300    #[display("BB")]
7301    Bb,
7302    #[serde(rename = "BY")]
7303    #[display("BY")]
7304    By,
7305    #[serde(rename = "BE")]
7306    #[display("BE")]
7307    Be,
7308    #[serde(rename = "BZ")]
7309    #[display("BZ")]
7310    Bz,
7311    #[serde(rename = "BJ")]
7312    #[display("BJ")]
7313    Bj,
7314    #[serde(rename = "BM")]
7315    #[display("BM")]
7316    Bm,
7317    #[serde(rename = "BT")]
7318    #[display("BT")]
7319    Bt,
7320    #[serde(rename = "BO")]
7321    #[display("BO")]
7322    Bo,
7323    #[serde(rename = "BQ")]
7324    #[display("BQ")]
7325    Bq,
7326    #[serde(rename = "BA")]
7327    #[display("BA")]
7328    Ba,
7329    #[serde(rename = "BW")]
7330    #[display("BW")]
7331    Bw,
7332    #[serde(rename = "BV")]
7333    #[display("BV")]
7334    Bv,
7335    #[serde(rename = "BR")]
7336    #[display("BR")]
7337    Br,
7338    #[serde(rename = "IO")]
7339    #[display("IO")]
7340    Io,
7341    #[serde(rename = "BN")]
7342    #[display("BN")]
7343    Bn,
7344    #[serde(rename = "BG")]
7345    #[display("BG")]
7346    Bg,
7347    #[serde(rename = "BF")]
7348    #[display("BF")]
7349    Bf,
7350    #[serde(rename = "BI")]
7351    #[display("BI")]
7352    Bi,
7353    #[serde(rename = "CV")]
7354    #[display("CV")]
7355    Cv,
7356    #[serde(rename = "KH")]
7357    #[display("KH")]
7358    Kh,
7359    #[serde(rename = "CM")]
7360    #[display("CM")]
7361    Cm,
7362    #[serde(rename = "CA")]
7363    #[display("CA")]
7364    Ca,
7365    #[serde(rename = "KY")]
7366    #[display("KY")]
7367    Ky,
7368    #[serde(rename = "CF")]
7369    #[display("CF")]
7370    Cf,
7371    #[serde(rename = "TD")]
7372    #[display("TD")]
7373    Td,
7374    #[serde(rename = "CL")]
7375    #[display("CL")]
7376    Cl,
7377    #[serde(rename = "CN")]
7378    #[display("CN")]
7379    Cn,
7380    #[serde(rename = "CX")]
7381    #[display("CX")]
7382    Cx,
7383    #[serde(rename = "CC")]
7384    #[display("CC")]
7385    Cc,
7386    #[serde(rename = "CO")]
7387    #[display("CO")]
7388    Co,
7389    #[serde(rename = "KM")]
7390    #[display("KM")]
7391    Km,
7392    #[serde(rename = "CG")]
7393    #[display("CG")]
7394    Cg,
7395    #[serde(rename = "CD")]
7396    #[display("CD")]
7397    Cd,
7398    #[serde(rename = "CK")]
7399    #[display("CK")]
7400    Ck,
7401    #[serde(rename = "CR")]
7402    #[display("CR")]
7403    Cr,
7404    #[serde(rename = "CI")]
7405    #[display("CI")]
7406    Ci,
7407    #[serde(rename = "HR")]
7408    #[display("HR")]
7409    Hr,
7410    #[serde(rename = "CW")]
7411    #[display("CW")]
7412    Cw,
7413    #[serde(rename = "CY")]
7414    #[display("CY")]
7415    Cy,
7416    #[serde(rename = "CZ")]
7417    #[display("CZ")]
7418    Cz,
7419    #[serde(rename = "DK")]
7420    #[display("DK")]
7421    Dk,
7422    #[serde(rename = "DJ")]
7423    #[display("DJ")]
7424    Dj,
7425    #[serde(rename = "DM")]
7426    #[display("DM")]
7427    Dm,
7428    #[serde(rename = "DO")]
7429    #[display("DO")]
7430    Do,
7431    #[serde(rename = "EC")]
7432    #[display("EC")]
7433    Ec,
7434    #[serde(rename = "EG")]
7435    #[display("EG")]
7436    Eg,
7437    #[serde(rename = "SV")]
7438    #[display("SV")]
7439    Sv,
7440    #[serde(rename = "GQ")]
7441    #[display("GQ")]
7442    Gq,
7443    #[serde(rename = "ER")]
7444    #[display("ER")]
7445    Er,
7446    #[serde(rename = "EE")]
7447    #[display("EE")]
7448    Ee,
7449    #[serde(rename = "SZ")]
7450    #[display("SZ")]
7451    Sz,
7452    #[serde(rename = "ET")]
7453    #[display("ET")]
7454    Et,
7455    #[serde(rename = "FK")]
7456    #[display("FK")]
7457    Fk,
7458    #[serde(rename = "FO")]
7459    #[display("FO")]
7460    Fo,
7461    #[serde(rename = "FJ")]
7462    #[display("FJ")]
7463    Fj,
7464    #[serde(rename = "FI")]
7465    #[display("FI")]
7466    Fi,
7467    #[serde(rename = "FR")]
7468    #[display("FR")]
7469    Fr,
7470    #[serde(rename = "GF")]
7471    #[display("GF")]
7472    Gf,
7473    #[serde(rename = "PF")]
7474    #[display("PF")]
7475    Pf,
7476    #[serde(rename = "TF")]
7477    #[display("TF")]
7478    Tf,
7479    #[serde(rename = "GA")]
7480    #[display("GA")]
7481    Ga,
7482    #[serde(rename = "GM")]
7483    #[display("GM")]
7484    Gm,
7485    #[serde(rename = "GE")]
7486    #[display("GE")]
7487    Ge,
7488    #[serde(rename = "DE")]
7489    #[display("DE")]
7490    De,
7491    #[serde(rename = "GH")]
7492    #[display("GH")]
7493    Gh,
7494    #[serde(rename = "GI")]
7495    #[display("GI")]
7496    Gi,
7497    #[serde(rename = "GR")]
7498    #[display("GR")]
7499    Gr,
7500    #[serde(rename = "GL")]
7501    #[display("GL")]
7502    Gl,
7503    #[serde(rename = "GD")]
7504    #[display("GD")]
7505    Gd,
7506    #[serde(rename = "GP")]
7507    #[display("GP")]
7508    Gp,
7509    #[serde(rename = "GU")]
7510    #[display("GU")]
7511    Gu,
7512    #[serde(rename = "GT")]
7513    #[display("GT")]
7514    Gt,
7515    #[serde(rename = "GG")]
7516    #[display("GG")]
7517    Gg,
7518    #[serde(rename = "GN")]
7519    #[display("GN")]
7520    Gn,
7521    #[serde(rename = "GW")]
7522    #[display("GW")]
7523    Gw,
7524    #[serde(rename = "GY")]
7525    #[display("GY")]
7526    Gy,
7527    #[serde(rename = "HT")]
7528    #[display("HT")]
7529    Ht,
7530    #[serde(rename = "HM")]
7531    #[display("HM")]
7532    Hm,
7533    #[serde(rename = "VA")]
7534    #[display("VA")]
7535    Va,
7536    #[serde(rename = "HN")]
7537    #[display("HN")]
7538    Hn,
7539    #[serde(rename = "HK")]
7540    #[display("HK")]
7541    Hk,
7542    #[serde(rename = "HU")]
7543    #[display("HU")]
7544    Hu,
7545    #[serde(rename = "IS")]
7546    #[display("IS")]
7547    Is,
7548    #[serde(rename = "IN")]
7549    #[display("IN")]
7550    In,
7551    #[serde(rename = "ID")]
7552    #[display("ID")]
7553    Id,
7554    #[serde(rename = "IQ")]
7555    #[display("IQ")]
7556    Iq,
7557    #[serde(rename = "IE")]
7558    #[display("IE")]
7559    Ie,
7560    #[serde(rename = "IM")]
7561    #[display("IM")]
7562    Im,
7563    #[serde(rename = "IL")]
7564    #[display("IL")]
7565    Il,
7566    #[serde(rename = "IT")]
7567    #[display("IT")]
7568    It,
7569    #[serde(rename = "JM")]
7570    #[display("JM")]
7571    Jm,
7572    #[serde(rename = "JP")]
7573    #[display("JP")]
7574    Jp,
7575    #[serde(rename = "JE")]
7576    #[display("JE")]
7577    Je,
7578    #[serde(rename = "JO")]
7579    #[display("JO")]
7580    Jo,
7581    #[serde(rename = "KZ")]
7582    #[display("KZ")]
7583    Kz,
7584    #[serde(rename = "KE")]
7585    #[display("KE")]
7586    Ke,
7587    #[serde(rename = "KI")]
7588    #[display("KI")]
7589    Ki,
7590    #[serde(rename = "KR")]
7591    #[display("KR")]
7592    Kr,
7593    #[serde(rename = "XK")]
7594    #[display("XK")]
7595    Xk,
7596    #[serde(rename = "KW")]
7597    #[display("KW")]
7598    Kw,
7599    #[serde(rename = "KG")]
7600    #[display("KG")]
7601    Kg,
7602    #[serde(rename = "LA")]
7603    #[display("LA")]
7604    La,
7605    #[serde(rename = "LV")]
7606    #[display("LV")]
7607    Lv,
7608    #[serde(rename = "LB")]
7609    #[display("LB")]
7610    Lb,
7611    #[serde(rename = "LS")]
7612    #[display("LS")]
7613    Ls,
7614    #[serde(rename = "LR")]
7615    #[display("LR")]
7616    Lr,
7617    #[serde(rename = "LY")]
7618    #[display("LY")]
7619    Ly,
7620    #[serde(rename = "LI")]
7621    #[display("LI")]
7622    Li,
7623    #[serde(rename = "LT")]
7624    #[display("LT")]
7625    Lt,
7626    #[serde(rename = "LU")]
7627    #[display("LU")]
7628    Lu,
7629    #[serde(rename = "MO")]
7630    #[display("MO")]
7631    Mo,
7632    #[serde(rename = "MG")]
7633    #[display("MG")]
7634    Mg,
7635    #[serde(rename = "MW")]
7636    #[display("MW")]
7637    Mw,
7638    #[serde(rename = "MY")]
7639    #[display("MY")]
7640    My,
7641    #[serde(rename = "MV")]
7642    #[display("MV")]
7643    Mv,
7644    #[serde(rename = "ML")]
7645    #[display("ML")]
7646    Ml,
7647    #[serde(rename = "MT")]
7648    #[display("MT")]
7649    Mt,
7650    #[serde(rename = "MH")]
7651    #[display("MH")]
7652    Mh,
7653    #[serde(rename = "MQ")]
7654    #[display("MQ")]
7655    Mq,
7656    #[serde(rename = "MR")]
7657    #[display("MR")]
7658    Mr,
7659    #[serde(rename = "MU")]
7660    #[display("MU")]
7661    Mu,
7662    #[serde(rename = "YT")]
7663    #[display("YT")]
7664    Yt,
7665    #[serde(rename = "MX")]
7666    #[display("MX")]
7667    Mx,
7668    #[serde(rename = "FM")]
7669    #[display("FM")]
7670    Fm,
7671    #[serde(rename = "MD")]
7672    #[display("MD")]
7673    Md,
7674    #[serde(rename = "MC")]
7675    #[display("MC")]
7676    Mc,
7677    #[serde(rename = "MN")]
7678    #[display("MN")]
7679    Mn,
7680    #[serde(rename = "ME")]
7681    #[display("ME")]
7682    Me,
7683    #[serde(rename = "MS")]
7684    #[display("MS")]
7685    Ms,
7686    #[serde(rename = "MA")]
7687    #[display("MA")]
7688    Ma,
7689    #[serde(rename = "MZ")]
7690    #[display("MZ")]
7691    Mz,
7692    #[serde(rename = "MM")]
7693    #[display("MM")]
7694    Mm,
7695    #[serde(rename = "NA")]
7696    #[display("NA")]
7697    Na,
7698    #[serde(rename = "NR")]
7699    #[display("NR")]
7700    Nr,
7701    #[serde(rename = "NP")]
7702    #[display("NP")]
7703    Np,
7704    #[serde(rename = "NL")]
7705    #[display("NL")]
7706    Nl,
7707    #[serde(rename = "AN")]
7708    #[display("AN")]
7709    An,
7710    #[serde(rename = "NC")]
7711    #[display("NC")]
7712    Nc,
7713    #[serde(rename = "NZ")]
7714    #[display("NZ")]
7715    Nz,
7716    #[serde(rename = "NI")]
7717    #[display("NI")]
7718    Ni,
7719    #[serde(rename = "NE")]
7720    #[display("NE")]
7721    Ne,
7722    #[serde(rename = "NG")]
7723    #[display("NG")]
7724    Ng,
7725    #[serde(rename = "NU")]
7726    #[display("NU")]
7727    Nu,
7728    #[serde(rename = "NF")]
7729    #[display("NF")]
7730    Nf,
7731    #[serde(rename = "MK")]
7732    #[display("MK")]
7733    Mk,
7734    #[serde(rename = "MP")]
7735    #[display("MP")]
7736    Mp,
7737    #[serde(rename = "NO")]
7738    #[display("NO")]
7739    No,
7740    #[serde(rename = "OM")]
7741    #[display("OM")]
7742    Om,
7743    #[serde(rename = "PK")]
7744    #[display("PK")]
7745    Pk,
7746    #[serde(rename = "PW")]
7747    #[display("PW")]
7748    Pw,
7749    #[serde(rename = "PS")]
7750    #[display("PS")]
7751    Ps,
7752    #[serde(rename = "PA")]
7753    #[display("PA")]
7754    Pa,
7755    #[serde(rename = "PG")]
7756    #[display("PG")]
7757    Pg,
7758    #[serde(rename = "PY")]
7759    #[display("PY")]
7760    Py,
7761    #[serde(rename = "PE")]
7762    #[display("PE")]
7763    Pe,
7764    #[serde(rename = "PH")]
7765    #[display("PH")]
7766    Ph,
7767    #[serde(rename = "PN")]
7768    #[display("PN")]
7769    Pn,
7770    #[serde(rename = "PL")]
7771    #[display("PL")]
7772    Pl,
7773    #[serde(rename = "PT")]
7774    #[display("PT")]
7775    Pt,
7776    #[serde(rename = "PR")]
7777    #[display("PR")]
7778    Pr,
7779    #[serde(rename = "QA")]
7780    #[display("QA")]
7781    Qa,
7782    #[serde(rename = "RO")]
7783    #[display("RO")]
7784    Ro,
7785    #[serde(rename = "RU")]
7786    #[display("RU")]
7787    Ru,
7788    #[serde(rename = "RW")]
7789    #[display("RW")]
7790    Rw,
7791    #[serde(rename = "RE")]
7792    #[display("RE")]
7793    Re,
7794    #[serde(rename = "BL")]
7795    #[display("BL")]
7796    Bl,
7797    #[serde(rename = "SH")]
7798    #[display("SH")]
7799    Sh,
7800    #[serde(rename = "KN")]
7801    #[display("KN")]
7802    Kn,
7803    #[serde(rename = "LC")]
7804    #[display("LC")]
7805    Lc,
7806    #[serde(rename = "MF")]
7807    #[display("MF")]
7808    Mf,
7809    #[serde(rename = "PM")]
7810    #[display("PM")]
7811    Pm,
7812    #[serde(rename = "VC")]
7813    #[display("VC")]
7814    Vc,
7815    #[serde(rename = "WS")]
7816    #[display("WS")]
7817    Ws,
7818    #[serde(rename = "SM")]
7819    #[display("SM")]
7820    Sm,
7821    #[serde(rename = "ST")]
7822    #[display("ST")]
7823    St,
7824    #[serde(rename = "SA")]
7825    #[display("SA")]
7826    Sa,
7827    #[serde(rename = "SN")]
7828    #[display("SN")]
7829    Sn,
7830    #[serde(rename = "RS")]
7831    #[display("RS")]
7832    Rs,
7833    #[serde(rename = "SC")]
7834    #[display("SC")]
7835    Sc,
7836    #[serde(rename = "SL")]
7837    #[display("SL")]
7838    Sl,
7839    #[serde(rename = "SG")]
7840    #[display("SG")]
7841    Sg,
7842    #[serde(rename = "SX")]
7843    #[display("SX")]
7844    Sx,
7845    #[serde(rename = "SK")]
7846    #[display("SK")]
7847    Sk,
7848    #[serde(rename = "SI")]
7849    #[display("SI")]
7850    Si,
7851    #[serde(rename = "SB")]
7852    #[display("SB")]
7853    Sb,
7854    #[serde(rename = "SO")]
7855    #[display("SO")]
7856    So,
7857    #[serde(rename = "ZA")]
7858    #[display("ZA")]
7859    Za,
7860    #[serde(rename = "GS")]
7861    #[display("GS")]
7862    Gs,
7863    #[serde(rename = "SS")]
7864    #[display("SS")]
7865    Ss,
7866    #[serde(rename = "ES")]
7867    #[display("ES")]
7868    Es,
7869    #[serde(rename = "LK")]
7870    #[display("LK")]
7871    Lk,
7872    #[serde(rename = "SD")]
7873    #[display("SD")]
7874    Sd,
7875    #[serde(rename = "SR")]
7876    #[display("SR")]
7877    Sr,
7878    #[serde(rename = "SJ")]
7879    #[display("SJ")]
7880    Sj,
7881    #[serde(rename = "SE")]
7882    #[display("SE")]
7883    Se,
7884    #[serde(rename = "CH")]
7885    #[display("CH")]
7886    Ch,
7887    #[serde(rename = "TW")]
7888    #[display("TW")]
7889    Tw,
7890    #[serde(rename = "TJ")]
7891    #[display("TJ")]
7892    Tj,
7893    #[serde(rename = "TZ")]
7894    #[display("TZ")]
7895    Tz,
7896    #[serde(rename = "TH")]
7897    #[display("TH")]
7898    Th,
7899    #[serde(rename = "TL")]
7900    #[display("TL")]
7901    Tl,
7902    #[serde(rename = "TG")]
7903    #[display("TG")]
7904    Tg,
7905    #[serde(rename = "TK")]
7906    #[display("TK")]
7907    Tk,
7908    #[serde(rename = "TO")]
7909    #[display("TO")]
7910    To,
7911    #[serde(rename = "TT")]
7912    #[display("TT")]
7913    Tt,
7914    #[serde(rename = "TN")]
7915    #[display("TN")]
7916    Tn,
7917    #[serde(rename = "TR")]
7918    #[display("TR")]
7919    Tr,
7920    #[serde(rename = "TM")]
7921    #[display("TM")]
7922    Tm,
7923    #[serde(rename = "TC")]
7924    #[display("TC")]
7925    Tc,
7926    #[serde(rename = "TV")]
7927    #[display("TV")]
7928    Tv,
7929    #[serde(rename = "UG")]
7930    #[display("UG")]
7931    Ug,
7932    #[serde(rename = "UA")]
7933    #[display("UA")]
7934    Ua,
7935    #[serde(rename = "AE")]
7936    #[display("AE")]
7937    Ae,
7938    #[serde(rename = "GB")]
7939    #[display("GB")]
7940    Gb,
7941    #[serde(rename = "US")]
7942    #[display("US")]
7943    Us,
7944    #[serde(rename = "UM")]
7945    #[display("UM")]
7946    Um,
7947    #[serde(rename = "UY")]
7948    #[display("UY")]
7949    Uy,
7950    #[serde(rename = "UZ")]
7951    #[display("UZ")]
7952    Uz,
7953    #[serde(rename = "VU")]
7954    #[display("VU")]
7955    Vu,
7956    #[serde(rename = "VE")]
7957    #[display("VE")]
7958    Ve,
7959    #[serde(rename = "VN")]
7960    #[display("VN")]
7961    Vn,
7962    #[serde(rename = "VG")]
7963    #[display("VG")]
7964    Vg,
7965    #[serde(rename = "VI")]
7966    #[display("VI")]
7967    Vi,
7968    #[serde(rename = "WF")]
7969    #[display("WF")]
7970    Wf,
7971    #[serde(rename = "EH")]
7972    #[display("EH")]
7973    Eh,
7974    #[serde(rename = "YE")]
7975    #[display("YE")]
7976    Ye,
7977    #[serde(rename = "ZM")]
7978    #[display("ZM")]
7979    Zm,
7980    #[serde(rename = "ZW")]
7981    #[display("ZW")]
7982    Zw,
7983}
7984
7985#[doc = "UserAddress."]
7986#[derive(
7987    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
7988)]
7989pub struct UserAddress {
7990    #[doc = "The classification of the address."]
7991    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
7992    pub type_: Option<Type>,
7993    #[doc = "The formatted mailing address."]
7994    #[serde(default, skip_serializing_if = "Option::is_none")]
7995    pub formatted: Option<String>,
7996    #[doc = "The full street address component, which may include house number, street name, P.O. \
7997             box, and multi-line extended street address information, pursuant to SCIM RFC 7643 \
7998             4.1.2.."]
7999    #[serde(default, skip_serializing_if = "Option::is_none")]
8000    pub street_address: Option<String>,
8001    #[doc = "The city or locality component."]
8002    #[serde(default, skip_serializing_if = "Option::is_none")]
8003    pub locality: Option<String>,
8004    #[doc = "The state or region component, pursuant to SCIM RFC 7643 4.1.2."]
8005    #[serde(default, skip_serializing_if = "Option::is_none")]
8006    pub region: Option<String>,
8007    #[doc = "The zip code or postal code component, pursuant to SCIM RFC 7643 4.1.2."]
8008    #[serde(default, skip_serializing_if = "Option::is_none")]
8009    pub postal_code: Option<String>,
8010    #[doc = "The country component, pursuant to SCIM RFC 7643 4.1.2."]
8011    #[serde(default, skip_serializing_if = "Option::is_none")]
8012    pub country: Option<UserAddressCountry>,
8013}
8014
8015impl std::fmt::Display for UserAddress {
8016    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8017        write!(
8018            f,
8019            "{}",
8020            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8021        )
8022    }
8023}
8024
8025#[cfg(feature = "tabled")]
8026impl tabled::Tabled for UserAddress {
8027    const LENGTH: usize = 7;
8028    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
8029        vec![
8030            if let Some(type_) = &self.type_ {
8031                format!("{:?}", type_).into()
8032            } else {
8033                String::new().into()
8034            },
8035            if let Some(formatted) = &self.formatted {
8036                format!("{:?}", formatted).into()
8037            } else {
8038                String::new().into()
8039            },
8040            if let Some(street_address) = &self.street_address {
8041                format!("{:?}", street_address).into()
8042            } else {
8043                String::new().into()
8044            },
8045            if let Some(locality) = &self.locality {
8046                format!("{:?}", locality).into()
8047            } else {
8048                String::new().into()
8049            },
8050            if let Some(region) = &self.region {
8051                format!("{:?}", region).into()
8052            } else {
8053                String::new().into()
8054            },
8055            if let Some(postal_code) = &self.postal_code {
8056                format!("{:?}", postal_code).into()
8057            } else {
8058                String::new().into()
8059            },
8060            if let Some(country) = &self.country {
8061                format!("{:?}", country).into()
8062            } else {
8063                String::new().into()
8064            },
8065        ]
8066    }
8067
8068    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
8069        vec![
8070            "type_".into(),
8071            "formatted".into(),
8072            "street_address".into(),
8073            "locality".into(),
8074            "region".into(),
8075            "postal_code".into(),
8076            "country".into(),
8077        ]
8078    }
8079}
8080
8081#[doc = "UserName."]
8082#[derive(
8083    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8084)]
8085pub struct UserName {
8086    #[doc = "The user's full name."]
8087    #[serde(default, skip_serializing_if = "Option::is_none")]
8088    pub formatted: Option<String>,
8089    #[doc = "The given legal name of the user, or first name in most Western languages."]
8090    #[serde(default, skip_serializing_if = "Option::is_none")]
8091    pub given_name: Option<String>,
8092    #[doc = "The middle name(s) of the user."]
8093    #[serde(default, skip_serializing_if = "Option::is_none")]
8094    pub middle_name: Option<String>,
8095    #[doc = "The legal family name of the user, or last name in most Western languages."]
8096    #[serde(default, skip_serializing_if = "Option::is_none")]
8097    pub family_name: Option<String>,
8098    #[doc = "The preferred given name, or first name in most Western languages, by the user."]
8099    #[serde(default, skip_serializing_if = "Option::is_none")]
8100    pub preferred_given_name: Option<String>,
8101    #[doc = "The preferred family name, or last name in most Western languages, by the user."]
8102    #[serde(default, skip_serializing_if = "Option::is_none")]
8103    pub preferred_family_name: Option<String>,
8104}
8105
8106impl std::fmt::Display for UserName {
8107    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8108        write!(
8109            f,
8110            "{}",
8111            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8112        )
8113    }
8114}
8115
8116#[cfg(feature = "tabled")]
8117impl tabled::Tabled for UserName {
8118    const LENGTH: usize = 6;
8119    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
8120        vec![
8121            if let Some(formatted) = &self.formatted {
8122                format!("{:?}", formatted).into()
8123            } else {
8124                String::new().into()
8125            },
8126            if let Some(given_name) = &self.given_name {
8127                format!("{:?}", given_name).into()
8128            } else {
8129                String::new().into()
8130            },
8131            if let Some(middle_name) = &self.middle_name {
8132                format!("{:?}", middle_name).into()
8133            } else {
8134                String::new().into()
8135            },
8136            if let Some(family_name) = &self.family_name {
8137                format!("{:?}", family_name).into()
8138            } else {
8139                String::new().into()
8140            },
8141            if let Some(preferred_given_name) = &self.preferred_given_name {
8142                format!("{:?}", preferred_given_name).into()
8143            } else {
8144                String::new().into()
8145            },
8146            if let Some(preferred_family_name) = &self.preferred_family_name {
8147                format!("{:?}", preferred_family_name).into()
8148            } else {
8149                String::new().into()
8150            },
8151        ]
8152    }
8153
8154    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
8155        vec![
8156            "formatted".into(),
8157            "given_name".into(),
8158            "middle_name".into(),
8159            "family_name".into(),
8160            "preferred_given_name".into(),
8161            "preferred_family_name".into(),
8162        ]
8163    }
8164}
8165
8166#[doc = "The classification of the phone number, pursuant to SCIM RFC 7643 4.1.2."]
8167#[derive(
8168    serde :: Serialize,
8169    serde :: Deserialize,
8170    PartialEq,
8171    Hash,
8172    Debug,
8173    Clone,
8174    schemars :: JsonSchema,
8175    parse_display :: FromStr,
8176    parse_display :: Display,
8177)]
8178#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
8179#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
8180pub enum UserPhoneNumberType {
8181    #[serde(rename = "HOME")]
8182    #[display("HOME")]
8183    Home,
8184    #[serde(rename = "WORK")]
8185    #[display("WORK")]
8186    Work,
8187    #[serde(rename = "MOBILE")]
8188    #[display("MOBILE")]
8189    Mobile,
8190    #[serde(rename = "FAX")]
8191    #[display("FAX")]
8192    Fax,
8193    #[serde(rename = "OTHER")]
8194    #[display("OTHER")]
8195    Other,
8196}
8197
8198#[doc = "UserPhoneNumber."]
8199#[derive(
8200    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8201)]
8202pub struct UserPhoneNumber {
8203    #[doc = "The canonical global phone number pursuant to RFC3966."]
8204    #[serde(default, skip_serializing_if = "Option::is_none")]
8205    pub value: Option<String>,
8206    #[doc = "The classification of the phone number, pursuant to SCIM RFC 7643 4.1.2."]
8207    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
8208    pub type_: Option<UserPhoneNumberType>,
8209    #[doc = "The display value of the phone number."]
8210    #[serde(default, skip_serializing_if = "Option::is_none")]
8211    pub display: Option<String>,
8212}
8213
8214impl std::fmt::Display for UserPhoneNumber {
8215    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8216        write!(
8217            f,
8218            "{}",
8219            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8220        )
8221    }
8222}
8223
8224#[cfg(feature = "tabled")]
8225impl tabled::Tabled for UserPhoneNumber {
8226    const LENGTH: usize = 3;
8227    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
8228        vec![
8229            if let Some(value) = &self.value {
8230                format!("{:?}", value).into()
8231            } else {
8232                String::new().into()
8233            },
8234            if let Some(type_) = &self.type_ {
8235                format!("{:?}", type_).into()
8236            } else {
8237                String::new().into()
8238            },
8239            if let Some(display) = &self.display {
8240                format!("{:?}", display).into()
8241            } else {
8242                String::new().into()
8243            },
8244        ]
8245    }
8246
8247    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
8248        vec!["value".into(), "type_".into(), "display".into()]
8249    }
8250}
8251
8252#[doc = "The classification of the photo."]
8253#[derive(
8254    serde :: Serialize,
8255    serde :: Deserialize,
8256    PartialEq,
8257    Hash,
8258    Debug,
8259    Clone,
8260    schemars :: JsonSchema,
8261    parse_display :: FromStr,
8262    parse_display :: Display,
8263)]
8264#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
8265#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
8266pub enum UserPhotoType {
8267    #[serde(rename = "PHOTO")]
8268    #[display("PHOTO")]
8269    Photo,
8270    #[serde(rename = "THUMBNAIL")]
8271    #[display("THUMBNAIL")]
8272    Thumbnail,
8273}
8274
8275#[doc = "UserPhoto."]
8276#[derive(
8277    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8278)]
8279pub struct UserPhoto {
8280    #[doc = "The URL of the photo."]
8281    #[serde(default, skip_serializing_if = "Option::is_none")]
8282    pub value: Option<String>,
8283    #[doc = "The classification of the photo."]
8284    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
8285    pub type_: Option<UserPhotoType>,
8286}
8287
8288impl std::fmt::Display for UserPhoto {
8289    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8290        write!(
8291            f,
8292            "{}",
8293            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8294        )
8295    }
8296}
8297
8298#[cfg(feature = "tabled")]
8299impl tabled::Tabled for UserPhoto {
8300    const LENGTH: usize = 2;
8301    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
8302        vec![
8303            if let Some(value) = &self.value {
8304                format!("{:?}", value).into()
8305            } else {
8306                String::new().into()
8307            },
8308            if let Some(type_) = &self.type_ {
8309                format!("{:?}", type_).into()
8310            } else {
8311                String::new().into()
8312            },
8313        ]
8314    }
8315
8316    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
8317        vec!["value".into(), "type_".into()]
8318    }
8319}
8320
8321#[doc = "WorkLocation."]
8322#[derive(
8323    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8324)]
8325pub struct WorkLocation {
8326    #[doc = "Identifier field"]
8327    pub id: String,
8328    #[doc = "Record creation date"]
8329    pub created_at: String,
8330    #[doc = "Record update date"]
8331    pub updated_at: String,
8332    #[doc = "The name of the work location."]
8333    pub name: String,
8334    #[doc = "The address for the work location."]
8335    pub address: Address,
8336}
8337
8338impl std::fmt::Display for WorkLocation {
8339    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8340        write!(
8341            f,
8342            "{}",
8343            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8344        )
8345    }
8346}
8347
8348#[cfg(feature = "tabled")]
8349impl tabled::Tabled for WorkLocation {
8350    const LENGTH: usize = 5;
8351    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
8352        vec![
8353            self.id.clone().into(),
8354            self.created_at.clone().into(),
8355            self.updated_at.clone().into(),
8356            self.name.clone().into(),
8357            format!("{:?}", self.address).into(),
8358        ]
8359    }
8360
8361    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
8362        vec![
8363            "id".into(),
8364            "created_at".into(),
8365            "updated_at".into(),
8366            "name".into(),
8367            "address".into(),
8368        ]
8369    }
8370}
8371
8372#[doc = "The worker's country."]
8373#[derive(
8374    serde :: Serialize,
8375    serde :: Deserialize,
8376    PartialEq,
8377    Hash,
8378    Debug,
8379    Clone,
8380    schemars :: JsonSchema,
8381    parse_display :: FromStr,
8382    parse_display :: Display,
8383)]
8384#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
8385#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
8386pub enum WorkerCountry {
8387    #[serde(rename = "AF")]
8388    #[display("AF")]
8389    Af,
8390    #[serde(rename = "AX")]
8391    #[display("AX")]
8392    Ax,
8393    #[serde(rename = "AL")]
8394    #[display("AL")]
8395    Al,
8396    #[serde(rename = "DZ")]
8397    #[display("DZ")]
8398    Dz,
8399    #[serde(rename = "AS")]
8400    #[display("AS")]
8401    As,
8402    #[serde(rename = "AD")]
8403    #[display("AD")]
8404    Ad,
8405    #[serde(rename = "AO")]
8406    #[display("AO")]
8407    Ao,
8408    #[serde(rename = "AI")]
8409    #[display("AI")]
8410    Ai,
8411    #[serde(rename = "AQ")]
8412    #[display("AQ")]
8413    Aq,
8414    #[serde(rename = "AG")]
8415    #[display("AG")]
8416    Ag,
8417    #[serde(rename = "AR")]
8418    #[display("AR")]
8419    Ar,
8420    #[serde(rename = "AM")]
8421    #[display("AM")]
8422    Am,
8423    #[serde(rename = "AW")]
8424    #[display("AW")]
8425    Aw,
8426    #[serde(rename = "AU")]
8427    #[display("AU")]
8428    Au,
8429    #[serde(rename = "AT")]
8430    #[display("AT")]
8431    At,
8432    #[serde(rename = "AZ")]
8433    #[display("AZ")]
8434    Az,
8435    #[serde(rename = "BS")]
8436    #[display("BS")]
8437    Bs,
8438    #[serde(rename = "BH")]
8439    #[display("BH")]
8440    Bh,
8441    #[serde(rename = "BD")]
8442    #[display("BD")]
8443    Bd,
8444    #[serde(rename = "BB")]
8445    #[display("BB")]
8446    Bb,
8447    #[serde(rename = "BY")]
8448    #[display("BY")]
8449    By,
8450    #[serde(rename = "BE")]
8451    #[display("BE")]
8452    Be,
8453    #[serde(rename = "BZ")]
8454    #[display("BZ")]
8455    Bz,
8456    #[serde(rename = "BJ")]
8457    #[display("BJ")]
8458    Bj,
8459    #[serde(rename = "BM")]
8460    #[display("BM")]
8461    Bm,
8462    #[serde(rename = "BT")]
8463    #[display("BT")]
8464    Bt,
8465    #[serde(rename = "BO")]
8466    #[display("BO")]
8467    Bo,
8468    #[serde(rename = "BQ")]
8469    #[display("BQ")]
8470    Bq,
8471    #[serde(rename = "BA")]
8472    #[display("BA")]
8473    Ba,
8474    #[serde(rename = "BW")]
8475    #[display("BW")]
8476    Bw,
8477    #[serde(rename = "BV")]
8478    #[display("BV")]
8479    Bv,
8480    #[serde(rename = "BR")]
8481    #[display("BR")]
8482    Br,
8483    #[serde(rename = "IO")]
8484    #[display("IO")]
8485    Io,
8486    #[serde(rename = "BN")]
8487    #[display("BN")]
8488    Bn,
8489    #[serde(rename = "BG")]
8490    #[display("BG")]
8491    Bg,
8492    #[serde(rename = "BF")]
8493    #[display("BF")]
8494    Bf,
8495    #[serde(rename = "BI")]
8496    #[display("BI")]
8497    Bi,
8498    #[serde(rename = "CV")]
8499    #[display("CV")]
8500    Cv,
8501    #[serde(rename = "KH")]
8502    #[display("KH")]
8503    Kh,
8504    #[serde(rename = "CM")]
8505    #[display("CM")]
8506    Cm,
8507    #[serde(rename = "CA")]
8508    #[display("CA")]
8509    Ca,
8510    #[serde(rename = "KY")]
8511    #[display("KY")]
8512    Ky,
8513    #[serde(rename = "CF")]
8514    #[display("CF")]
8515    Cf,
8516    #[serde(rename = "TD")]
8517    #[display("TD")]
8518    Td,
8519    #[serde(rename = "CL")]
8520    #[display("CL")]
8521    Cl,
8522    #[serde(rename = "CN")]
8523    #[display("CN")]
8524    Cn,
8525    #[serde(rename = "CX")]
8526    #[display("CX")]
8527    Cx,
8528    #[serde(rename = "CC")]
8529    #[display("CC")]
8530    Cc,
8531    #[serde(rename = "CO")]
8532    #[display("CO")]
8533    Co,
8534    #[serde(rename = "KM")]
8535    #[display("KM")]
8536    Km,
8537    #[serde(rename = "CG")]
8538    #[display("CG")]
8539    Cg,
8540    #[serde(rename = "CD")]
8541    #[display("CD")]
8542    Cd,
8543    #[serde(rename = "CK")]
8544    #[display("CK")]
8545    Ck,
8546    #[serde(rename = "CR")]
8547    #[display("CR")]
8548    Cr,
8549    #[serde(rename = "CI")]
8550    #[display("CI")]
8551    Ci,
8552    #[serde(rename = "HR")]
8553    #[display("HR")]
8554    Hr,
8555    #[serde(rename = "CW")]
8556    #[display("CW")]
8557    Cw,
8558    #[serde(rename = "CY")]
8559    #[display("CY")]
8560    Cy,
8561    #[serde(rename = "CZ")]
8562    #[display("CZ")]
8563    Cz,
8564    #[serde(rename = "DK")]
8565    #[display("DK")]
8566    Dk,
8567    #[serde(rename = "DJ")]
8568    #[display("DJ")]
8569    Dj,
8570    #[serde(rename = "DM")]
8571    #[display("DM")]
8572    Dm,
8573    #[serde(rename = "DO")]
8574    #[display("DO")]
8575    Do,
8576    #[serde(rename = "EC")]
8577    #[display("EC")]
8578    Ec,
8579    #[serde(rename = "EG")]
8580    #[display("EG")]
8581    Eg,
8582    #[serde(rename = "SV")]
8583    #[display("SV")]
8584    Sv,
8585    #[serde(rename = "GQ")]
8586    #[display("GQ")]
8587    Gq,
8588    #[serde(rename = "ER")]
8589    #[display("ER")]
8590    Er,
8591    #[serde(rename = "EE")]
8592    #[display("EE")]
8593    Ee,
8594    #[serde(rename = "SZ")]
8595    #[display("SZ")]
8596    Sz,
8597    #[serde(rename = "ET")]
8598    #[display("ET")]
8599    Et,
8600    #[serde(rename = "FK")]
8601    #[display("FK")]
8602    Fk,
8603    #[serde(rename = "FO")]
8604    #[display("FO")]
8605    Fo,
8606    #[serde(rename = "FJ")]
8607    #[display("FJ")]
8608    Fj,
8609    #[serde(rename = "FI")]
8610    #[display("FI")]
8611    Fi,
8612    #[serde(rename = "FR")]
8613    #[display("FR")]
8614    Fr,
8615    #[serde(rename = "GF")]
8616    #[display("GF")]
8617    Gf,
8618    #[serde(rename = "PF")]
8619    #[display("PF")]
8620    Pf,
8621    #[serde(rename = "TF")]
8622    #[display("TF")]
8623    Tf,
8624    #[serde(rename = "GA")]
8625    #[display("GA")]
8626    Ga,
8627    #[serde(rename = "GM")]
8628    #[display("GM")]
8629    Gm,
8630    #[serde(rename = "GE")]
8631    #[display("GE")]
8632    Ge,
8633    #[serde(rename = "DE")]
8634    #[display("DE")]
8635    De,
8636    #[serde(rename = "GH")]
8637    #[display("GH")]
8638    Gh,
8639    #[serde(rename = "GI")]
8640    #[display("GI")]
8641    Gi,
8642    #[serde(rename = "GR")]
8643    #[display("GR")]
8644    Gr,
8645    #[serde(rename = "GL")]
8646    #[display("GL")]
8647    Gl,
8648    #[serde(rename = "GD")]
8649    #[display("GD")]
8650    Gd,
8651    #[serde(rename = "GP")]
8652    #[display("GP")]
8653    Gp,
8654    #[serde(rename = "GU")]
8655    #[display("GU")]
8656    Gu,
8657    #[serde(rename = "GT")]
8658    #[display("GT")]
8659    Gt,
8660    #[serde(rename = "GG")]
8661    #[display("GG")]
8662    Gg,
8663    #[serde(rename = "GN")]
8664    #[display("GN")]
8665    Gn,
8666    #[serde(rename = "GW")]
8667    #[display("GW")]
8668    Gw,
8669    #[serde(rename = "GY")]
8670    #[display("GY")]
8671    Gy,
8672    #[serde(rename = "HT")]
8673    #[display("HT")]
8674    Ht,
8675    #[serde(rename = "HM")]
8676    #[display("HM")]
8677    Hm,
8678    #[serde(rename = "VA")]
8679    #[display("VA")]
8680    Va,
8681    #[serde(rename = "HN")]
8682    #[display("HN")]
8683    Hn,
8684    #[serde(rename = "HK")]
8685    #[display("HK")]
8686    Hk,
8687    #[serde(rename = "HU")]
8688    #[display("HU")]
8689    Hu,
8690    #[serde(rename = "IS")]
8691    #[display("IS")]
8692    Is,
8693    #[serde(rename = "IN")]
8694    #[display("IN")]
8695    In,
8696    #[serde(rename = "ID")]
8697    #[display("ID")]
8698    Id,
8699    #[serde(rename = "IQ")]
8700    #[display("IQ")]
8701    Iq,
8702    #[serde(rename = "IE")]
8703    #[display("IE")]
8704    Ie,
8705    #[serde(rename = "IM")]
8706    #[display("IM")]
8707    Im,
8708    #[serde(rename = "IL")]
8709    #[display("IL")]
8710    Il,
8711    #[serde(rename = "IT")]
8712    #[display("IT")]
8713    It,
8714    #[serde(rename = "JM")]
8715    #[display("JM")]
8716    Jm,
8717    #[serde(rename = "JP")]
8718    #[display("JP")]
8719    Jp,
8720    #[serde(rename = "JE")]
8721    #[display("JE")]
8722    Je,
8723    #[serde(rename = "JO")]
8724    #[display("JO")]
8725    Jo,
8726    #[serde(rename = "KZ")]
8727    #[display("KZ")]
8728    Kz,
8729    #[serde(rename = "KE")]
8730    #[display("KE")]
8731    Ke,
8732    #[serde(rename = "KI")]
8733    #[display("KI")]
8734    Ki,
8735    #[serde(rename = "KR")]
8736    #[display("KR")]
8737    Kr,
8738    #[serde(rename = "XK")]
8739    #[display("XK")]
8740    Xk,
8741    #[serde(rename = "KW")]
8742    #[display("KW")]
8743    Kw,
8744    #[serde(rename = "KG")]
8745    #[display("KG")]
8746    Kg,
8747    #[serde(rename = "LA")]
8748    #[display("LA")]
8749    La,
8750    #[serde(rename = "LV")]
8751    #[display("LV")]
8752    Lv,
8753    #[serde(rename = "LB")]
8754    #[display("LB")]
8755    Lb,
8756    #[serde(rename = "LS")]
8757    #[display("LS")]
8758    Ls,
8759    #[serde(rename = "LR")]
8760    #[display("LR")]
8761    Lr,
8762    #[serde(rename = "LY")]
8763    #[display("LY")]
8764    Ly,
8765    #[serde(rename = "LI")]
8766    #[display("LI")]
8767    Li,
8768    #[serde(rename = "LT")]
8769    #[display("LT")]
8770    Lt,
8771    #[serde(rename = "LU")]
8772    #[display("LU")]
8773    Lu,
8774    #[serde(rename = "MO")]
8775    #[display("MO")]
8776    Mo,
8777    #[serde(rename = "MG")]
8778    #[display("MG")]
8779    Mg,
8780    #[serde(rename = "MW")]
8781    #[display("MW")]
8782    Mw,
8783    #[serde(rename = "MY")]
8784    #[display("MY")]
8785    My,
8786    #[serde(rename = "MV")]
8787    #[display("MV")]
8788    Mv,
8789    #[serde(rename = "ML")]
8790    #[display("ML")]
8791    Ml,
8792    #[serde(rename = "MT")]
8793    #[display("MT")]
8794    Mt,
8795    #[serde(rename = "MH")]
8796    #[display("MH")]
8797    Mh,
8798    #[serde(rename = "MQ")]
8799    #[display("MQ")]
8800    Mq,
8801    #[serde(rename = "MR")]
8802    #[display("MR")]
8803    Mr,
8804    #[serde(rename = "MU")]
8805    #[display("MU")]
8806    Mu,
8807    #[serde(rename = "YT")]
8808    #[display("YT")]
8809    Yt,
8810    #[serde(rename = "MX")]
8811    #[display("MX")]
8812    Mx,
8813    #[serde(rename = "FM")]
8814    #[display("FM")]
8815    Fm,
8816    #[serde(rename = "MD")]
8817    #[display("MD")]
8818    Md,
8819    #[serde(rename = "MC")]
8820    #[display("MC")]
8821    Mc,
8822    #[serde(rename = "MN")]
8823    #[display("MN")]
8824    Mn,
8825    #[serde(rename = "ME")]
8826    #[display("ME")]
8827    Me,
8828    #[serde(rename = "MS")]
8829    #[display("MS")]
8830    Ms,
8831    #[serde(rename = "MA")]
8832    #[display("MA")]
8833    Ma,
8834    #[serde(rename = "MZ")]
8835    #[display("MZ")]
8836    Mz,
8837    #[serde(rename = "MM")]
8838    #[display("MM")]
8839    Mm,
8840    #[serde(rename = "NA")]
8841    #[display("NA")]
8842    Na,
8843    #[serde(rename = "NR")]
8844    #[display("NR")]
8845    Nr,
8846    #[serde(rename = "NP")]
8847    #[display("NP")]
8848    Np,
8849    #[serde(rename = "NL")]
8850    #[display("NL")]
8851    Nl,
8852    #[serde(rename = "AN")]
8853    #[display("AN")]
8854    An,
8855    #[serde(rename = "NC")]
8856    #[display("NC")]
8857    Nc,
8858    #[serde(rename = "NZ")]
8859    #[display("NZ")]
8860    Nz,
8861    #[serde(rename = "NI")]
8862    #[display("NI")]
8863    Ni,
8864    #[serde(rename = "NE")]
8865    #[display("NE")]
8866    Ne,
8867    #[serde(rename = "NG")]
8868    #[display("NG")]
8869    Ng,
8870    #[serde(rename = "NU")]
8871    #[display("NU")]
8872    Nu,
8873    #[serde(rename = "NF")]
8874    #[display("NF")]
8875    Nf,
8876    #[serde(rename = "MK")]
8877    #[display("MK")]
8878    Mk,
8879    #[serde(rename = "MP")]
8880    #[display("MP")]
8881    Mp,
8882    #[serde(rename = "NO")]
8883    #[display("NO")]
8884    No,
8885    #[serde(rename = "OM")]
8886    #[display("OM")]
8887    Om,
8888    #[serde(rename = "PK")]
8889    #[display("PK")]
8890    Pk,
8891    #[serde(rename = "PW")]
8892    #[display("PW")]
8893    Pw,
8894    #[serde(rename = "PS")]
8895    #[display("PS")]
8896    Ps,
8897    #[serde(rename = "PA")]
8898    #[display("PA")]
8899    Pa,
8900    #[serde(rename = "PG")]
8901    #[display("PG")]
8902    Pg,
8903    #[serde(rename = "PY")]
8904    #[display("PY")]
8905    Py,
8906    #[serde(rename = "PE")]
8907    #[display("PE")]
8908    Pe,
8909    #[serde(rename = "PH")]
8910    #[display("PH")]
8911    Ph,
8912    #[serde(rename = "PN")]
8913    #[display("PN")]
8914    Pn,
8915    #[serde(rename = "PL")]
8916    #[display("PL")]
8917    Pl,
8918    #[serde(rename = "PT")]
8919    #[display("PT")]
8920    Pt,
8921    #[serde(rename = "PR")]
8922    #[display("PR")]
8923    Pr,
8924    #[serde(rename = "QA")]
8925    #[display("QA")]
8926    Qa,
8927    #[serde(rename = "RO")]
8928    #[display("RO")]
8929    Ro,
8930    #[serde(rename = "RU")]
8931    #[display("RU")]
8932    Ru,
8933    #[serde(rename = "RW")]
8934    #[display("RW")]
8935    Rw,
8936    #[serde(rename = "RE")]
8937    #[display("RE")]
8938    Re,
8939    #[serde(rename = "BL")]
8940    #[display("BL")]
8941    Bl,
8942    #[serde(rename = "SH")]
8943    #[display("SH")]
8944    Sh,
8945    #[serde(rename = "KN")]
8946    #[display("KN")]
8947    Kn,
8948    #[serde(rename = "LC")]
8949    #[display("LC")]
8950    Lc,
8951    #[serde(rename = "MF")]
8952    #[display("MF")]
8953    Mf,
8954    #[serde(rename = "PM")]
8955    #[display("PM")]
8956    Pm,
8957    #[serde(rename = "VC")]
8958    #[display("VC")]
8959    Vc,
8960    #[serde(rename = "WS")]
8961    #[display("WS")]
8962    Ws,
8963    #[serde(rename = "SM")]
8964    #[display("SM")]
8965    Sm,
8966    #[serde(rename = "ST")]
8967    #[display("ST")]
8968    St,
8969    #[serde(rename = "SA")]
8970    #[display("SA")]
8971    Sa,
8972    #[serde(rename = "SN")]
8973    #[display("SN")]
8974    Sn,
8975    #[serde(rename = "RS")]
8976    #[display("RS")]
8977    Rs,
8978    #[serde(rename = "SC")]
8979    #[display("SC")]
8980    Sc,
8981    #[serde(rename = "SL")]
8982    #[display("SL")]
8983    Sl,
8984    #[serde(rename = "SG")]
8985    #[display("SG")]
8986    Sg,
8987    #[serde(rename = "SX")]
8988    #[display("SX")]
8989    Sx,
8990    #[serde(rename = "SK")]
8991    #[display("SK")]
8992    Sk,
8993    #[serde(rename = "SI")]
8994    #[display("SI")]
8995    Si,
8996    #[serde(rename = "SB")]
8997    #[display("SB")]
8998    Sb,
8999    #[serde(rename = "SO")]
9000    #[display("SO")]
9001    So,
9002    #[serde(rename = "ZA")]
9003    #[display("ZA")]
9004    Za,
9005    #[serde(rename = "GS")]
9006    #[display("GS")]
9007    Gs,
9008    #[serde(rename = "SS")]
9009    #[display("SS")]
9010    Ss,
9011    #[serde(rename = "ES")]
9012    #[display("ES")]
9013    Es,
9014    #[serde(rename = "LK")]
9015    #[display("LK")]
9016    Lk,
9017    #[serde(rename = "SD")]
9018    #[display("SD")]
9019    Sd,
9020    #[serde(rename = "SR")]
9021    #[display("SR")]
9022    Sr,
9023    #[serde(rename = "SJ")]
9024    #[display("SJ")]
9025    Sj,
9026    #[serde(rename = "SE")]
9027    #[display("SE")]
9028    Se,
9029    #[serde(rename = "CH")]
9030    #[display("CH")]
9031    Ch,
9032    #[serde(rename = "TW")]
9033    #[display("TW")]
9034    Tw,
9035    #[serde(rename = "TJ")]
9036    #[display("TJ")]
9037    Tj,
9038    #[serde(rename = "TZ")]
9039    #[display("TZ")]
9040    Tz,
9041    #[serde(rename = "TH")]
9042    #[display("TH")]
9043    Th,
9044    #[serde(rename = "TL")]
9045    #[display("TL")]
9046    Tl,
9047    #[serde(rename = "TG")]
9048    #[display("TG")]
9049    Tg,
9050    #[serde(rename = "TK")]
9051    #[display("TK")]
9052    Tk,
9053    #[serde(rename = "TO")]
9054    #[display("TO")]
9055    To,
9056    #[serde(rename = "TT")]
9057    #[display("TT")]
9058    Tt,
9059    #[serde(rename = "TN")]
9060    #[display("TN")]
9061    Tn,
9062    #[serde(rename = "TR")]
9063    #[display("TR")]
9064    Tr,
9065    #[serde(rename = "TM")]
9066    #[display("TM")]
9067    Tm,
9068    #[serde(rename = "TC")]
9069    #[display("TC")]
9070    Tc,
9071    #[serde(rename = "TV")]
9072    #[display("TV")]
9073    Tv,
9074    #[serde(rename = "UG")]
9075    #[display("UG")]
9076    Ug,
9077    #[serde(rename = "UA")]
9078    #[display("UA")]
9079    Ua,
9080    #[serde(rename = "AE")]
9081    #[display("AE")]
9082    Ae,
9083    #[serde(rename = "GB")]
9084    #[display("GB")]
9085    Gb,
9086    #[serde(rename = "US")]
9087    #[display("US")]
9088    Us,
9089    #[serde(rename = "UM")]
9090    #[display("UM")]
9091    Um,
9092    #[serde(rename = "UY")]
9093    #[display("UY")]
9094    Uy,
9095    #[serde(rename = "UZ")]
9096    #[display("UZ")]
9097    Uz,
9098    #[serde(rename = "VU")]
9099    #[display("VU")]
9100    Vu,
9101    #[serde(rename = "VE")]
9102    #[display("VE")]
9103    Ve,
9104    #[serde(rename = "VN")]
9105    #[display("VN")]
9106    Vn,
9107    #[serde(rename = "VG")]
9108    #[display("VG")]
9109    Vg,
9110    #[serde(rename = "VI")]
9111    #[display("VI")]
9112    Vi,
9113    #[serde(rename = "WF")]
9114    #[display("WF")]
9115    Wf,
9116    #[serde(rename = "EH")]
9117    #[display("EH")]
9118    Eh,
9119    #[serde(rename = "YE")]
9120    #[display("YE")]
9121    Ye,
9122    #[serde(rename = "ZM")]
9123    #[display("ZM")]
9124    Zm,
9125    #[serde(rename = "ZW")]
9126    #[display("ZW")]
9127    Zw,
9128}
9129
9130#[doc = "The worker's status within the organization."]
9131#[derive(
9132    serde :: Serialize,
9133    serde :: Deserialize,
9134    PartialEq,
9135    Hash,
9136    Debug,
9137    Clone,
9138    schemars :: JsonSchema,
9139    parse_display :: FromStr,
9140    parse_display :: Display,
9141)]
9142#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
9143#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
9144pub enum WorkerStatus {
9145    #[serde(rename = "HIRED")]
9146    #[display("HIRED")]
9147    Hired,
9148    #[serde(rename = "ACCEPTED")]
9149    #[display("ACCEPTED")]
9150    Accepted,
9151    #[serde(rename = "ACTIVE")]
9152    #[display("ACTIVE")]
9153    Active,
9154    #[serde(rename = "TERMINATED")]
9155    #[display("TERMINATED")]
9156    Terminated,
9157}
9158
9159#[doc = "The gender of the worker, if specified."]
9160#[derive(
9161    serde :: Serialize,
9162    serde :: Deserialize,
9163    PartialEq,
9164    Hash,
9165    Debug,
9166    Clone,
9167    schemars :: JsonSchema,
9168    parse_display :: FromStr,
9169    parse_display :: Display,
9170)]
9171#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
9172#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
9173pub enum Gender {
9174    #[serde(rename = "MALE")]
9175    #[display("MALE")]
9176    Male,
9177    #[serde(rename = "FEMALE")]
9178    #[display("FEMALE")]
9179    Female,
9180    #[serde(rename = "NONBINARY")]
9181    #[display("NONBINARY")]
9182    Nonbinary,
9183    #[serde(rename = "UNDETERMINED")]
9184    #[display("UNDETERMINED")]
9185    Undetermined,
9186    #[serde(rename = "DIVERSE")]
9187    #[display("DIVERSE")]
9188    Diverse,
9189    #[serde(rename = "DOES_NOT_APPLY")]
9190    #[display("DOES_NOT_APPLY")]
9191    DoesNotApply,
9192}
9193
9194#[doc = "The identified race of the worker, if specified."]
9195#[derive(
9196    serde :: Serialize,
9197    serde :: Deserialize,
9198    PartialEq,
9199    Hash,
9200    Debug,
9201    Clone,
9202    schemars :: JsonSchema,
9203    parse_display :: FromStr,
9204    parse_display :: Display,
9205)]
9206#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
9207#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
9208pub enum Race {
9209    #[serde(rename = "BLACK")]
9210    #[display("BLACK")]
9211    Black,
9212    #[serde(rename = "BROWN")]
9213    #[display("BROWN")]
9214    Brown,
9215    #[serde(rename = "CHINESE")]
9216    #[display("CHINESE")]
9217    Chinese,
9218    #[serde(rename = "EURASIAN")]
9219    #[display("EURASIAN")]
9220    Eurasian,
9221    #[serde(rename = "INDIAN")]
9222    #[display("INDIAN")]
9223    Indian,
9224    #[serde(rename = "INDIGENOUS")]
9225    #[display("INDIGENOUS")]
9226    Indigenous,
9227    #[serde(rename = "WHITE")]
9228    #[display("WHITE")]
9229    White,
9230    #[serde(rename = "YELLOW")]
9231    #[display("YELLOW")]
9232    Yellow,
9233    #[serde(rename = "NOT_INFORMED")]
9234    #[display("NOT_INFORMED")]
9235    NotInformed,
9236    #[serde(rename = "OTHER")]
9237    #[display("OTHER")]
9238    Other,
9239}
9240
9241#[doc = "The identified ethnicity of the worker, if specified."]
9242#[derive(
9243    serde :: Serialize,
9244    serde :: Deserialize,
9245    PartialEq,
9246    Hash,
9247    Debug,
9248    Clone,
9249    schemars :: JsonSchema,
9250    parse_display :: FromStr,
9251    parse_display :: Display,
9252)]
9253#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
9254#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
9255pub enum Ethnicity {
9256    #[serde(rename = "HISPANIC_OR_LATINO")]
9257    #[display("HISPANIC_OR_LATINO")]
9258    HispanicOrLatino,
9259    #[serde(rename = "WHITE")]
9260    #[display("WHITE")]
9261    White,
9262    #[serde(rename = "BLACK_OR_AFRICAN_AMERICAN")]
9263    #[display("BLACK_OR_AFRICAN_AMERICAN")]
9264    BlackOrAfricanAmerican,
9265    #[serde(rename = "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER")]
9266    #[display("NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER")]
9267    NativeHawaiianOrOtherPacificIslander,
9268    #[serde(rename = "ASIAN")]
9269    #[display("ASIAN")]
9270    Asian,
9271    #[serde(rename = "AMERICAN_INDIAN_OR_ALASKA_NATIVE")]
9272    #[display("AMERICAN_INDIAN_OR_ALASKA_NATIVE")]
9273    AmericanIndianOrAlaskaNative,
9274    #[serde(rename = "TWO_OR_MORE_RACES")]
9275    #[display("TWO_OR_MORE_RACES")]
9276    TwoOrMoreRaces,
9277    #[serde(rename = "DECLINE_TO_SELF_IDENTIFY")]
9278    #[display("DECLINE_TO_SELF_IDENTIFY")]
9279    DeclineToSelfIdentify,
9280}
9281
9282#[doc = "The countries that the worker has citizenship in."]
9283#[derive(
9284    serde :: Serialize,
9285    serde :: Deserialize,
9286    PartialEq,
9287    Hash,
9288    Debug,
9289    Clone,
9290    schemars :: JsonSchema,
9291    parse_display :: FromStr,
9292    parse_display :: Display,
9293)]
9294#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
9295#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
9296pub enum Citizenship {
9297    #[serde(rename = "AF")]
9298    #[display("AF")]
9299    Af,
9300    #[serde(rename = "AX")]
9301    #[display("AX")]
9302    Ax,
9303    #[serde(rename = "AL")]
9304    #[display("AL")]
9305    Al,
9306    #[serde(rename = "DZ")]
9307    #[display("DZ")]
9308    Dz,
9309    #[serde(rename = "AS")]
9310    #[display("AS")]
9311    As,
9312    #[serde(rename = "AD")]
9313    #[display("AD")]
9314    Ad,
9315    #[serde(rename = "AO")]
9316    #[display("AO")]
9317    Ao,
9318    #[serde(rename = "AI")]
9319    #[display("AI")]
9320    Ai,
9321    #[serde(rename = "AQ")]
9322    #[display("AQ")]
9323    Aq,
9324    #[serde(rename = "AG")]
9325    #[display("AG")]
9326    Ag,
9327    #[serde(rename = "AR")]
9328    #[display("AR")]
9329    Ar,
9330    #[serde(rename = "AM")]
9331    #[display("AM")]
9332    Am,
9333    #[serde(rename = "AW")]
9334    #[display("AW")]
9335    Aw,
9336    #[serde(rename = "AU")]
9337    #[display("AU")]
9338    Au,
9339    #[serde(rename = "AT")]
9340    #[display("AT")]
9341    At,
9342    #[serde(rename = "AZ")]
9343    #[display("AZ")]
9344    Az,
9345    #[serde(rename = "BS")]
9346    #[display("BS")]
9347    Bs,
9348    #[serde(rename = "BH")]
9349    #[display("BH")]
9350    Bh,
9351    #[serde(rename = "BD")]
9352    #[display("BD")]
9353    Bd,
9354    #[serde(rename = "BB")]
9355    #[display("BB")]
9356    Bb,
9357    #[serde(rename = "BY")]
9358    #[display("BY")]
9359    By,
9360    #[serde(rename = "BE")]
9361    #[display("BE")]
9362    Be,
9363    #[serde(rename = "BZ")]
9364    #[display("BZ")]
9365    Bz,
9366    #[serde(rename = "BJ")]
9367    #[display("BJ")]
9368    Bj,
9369    #[serde(rename = "BM")]
9370    #[display("BM")]
9371    Bm,
9372    #[serde(rename = "BT")]
9373    #[display("BT")]
9374    Bt,
9375    #[serde(rename = "BO")]
9376    #[display("BO")]
9377    Bo,
9378    #[serde(rename = "BQ")]
9379    #[display("BQ")]
9380    Bq,
9381    #[serde(rename = "BA")]
9382    #[display("BA")]
9383    Ba,
9384    #[serde(rename = "BW")]
9385    #[display("BW")]
9386    Bw,
9387    #[serde(rename = "BV")]
9388    #[display("BV")]
9389    Bv,
9390    #[serde(rename = "BR")]
9391    #[display("BR")]
9392    Br,
9393    #[serde(rename = "IO")]
9394    #[display("IO")]
9395    Io,
9396    #[serde(rename = "BN")]
9397    #[display("BN")]
9398    Bn,
9399    #[serde(rename = "BG")]
9400    #[display("BG")]
9401    Bg,
9402    #[serde(rename = "BF")]
9403    #[display("BF")]
9404    Bf,
9405    #[serde(rename = "BI")]
9406    #[display("BI")]
9407    Bi,
9408    #[serde(rename = "CV")]
9409    #[display("CV")]
9410    Cv,
9411    #[serde(rename = "KH")]
9412    #[display("KH")]
9413    Kh,
9414    #[serde(rename = "CM")]
9415    #[display("CM")]
9416    Cm,
9417    #[serde(rename = "CA")]
9418    #[display("CA")]
9419    Ca,
9420    #[serde(rename = "KY")]
9421    #[display("KY")]
9422    Ky,
9423    #[serde(rename = "CF")]
9424    #[display("CF")]
9425    Cf,
9426    #[serde(rename = "TD")]
9427    #[display("TD")]
9428    Td,
9429    #[serde(rename = "CL")]
9430    #[display("CL")]
9431    Cl,
9432    #[serde(rename = "CN")]
9433    #[display("CN")]
9434    Cn,
9435    #[serde(rename = "CX")]
9436    #[display("CX")]
9437    Cx,
9438    #[serde(rename = "CC")]
9439    #[display("CC")]
9440    Cc,
9441    #[serde(rename = "CO")]
9442    #[display("CO")]
9443    Co,
9444    #[serde(rename = "KM")]
9445    #[display("KM")]
9446    Km,
9447    #[serde(rename = "CG")]
9448    #[display("CG")]
9449    Cg,
9450    #[serde(rename = "CD")]
9451    #[display("CD")]
9452    Cd,
9453    #[serde(rename = "CK")]
9454    #[display("CK")]
9455    Ck,
9456    #[serde(rename = "CR")]
9457    #[display("CR")]
9458    Cr,
9459    #[serde(rename = "CI")]
9460    #[display("CI")]
9461    Ci,
9462    #[serde(rename = "HR")]
9463    #[display("HR")]
9464    Hr,
9465    #[serde(rename = "CW")]
9466    #[display("CW")]
9467    Cw,
9468    #[serde(rename = "CY")]
9469    #[display("CY")]
9470    Cy,
9471    #[serde(rename = "CZ")]
9472    #[display("CZ")]
9473    Cz,
9474    #[serde(rename = "DK")]
9475    #[display("DK")]
9476    Dk,
9477    #[serde(rename = "DJ")]
9478    #[display("DJ")]
9479    Dj,
9480    #[serde(rename = "DM")]
9481    #[display("DM")]
9482    Dm,
9483    #[serde(rename = "DO")]
9484    #[display("DO")]
9485    Do,
9486    #[serde(rename = "EC")]
9487    #[display("EC")]
9488    Ec,
9489    #[serde(rename = "EG")]
9490    #[display("EG")]
9491    Eg,
9492    #[serde(rename = "SV")]
9493    #[display("SV")]
9494    Sv,
9495    #[serde(rename = "GQ")]
9496    #[display("GQ")]
9497    Gq,
9498    #[serde(rename = "ER")]
9499    #[display("ER")]
9500    Er,
9501    #[serde(rename = "EE")]
9502    #[display("EE")]
9503    Ee,
9504    #[serde(rename = "SZ")]
9505    #[display("SZ")]
9506    Sz,
9507    #[serde(rename = "ET")]
9508    #[display("ET")]
9509    Et,
9510    #[serde(rename = "FK")]
9511    #[display("FK")]
9512    Fk,
9513    #[serde(rename = "FO")]
9514    #[display("FO")]
9515    Fo,
9516    #[serde(rename = "FJ")]
9517    #[display("FJ")]
9518    Fj,
9519    #[serde(rename = "FI")]
9520    #[display("FI")]
9521    Fi,
9522    #[serde(rename = "FR")]
9523    #[display("FR")]
9524    Fr,
9525    #[serde(rename = "GF")]
9526    #[display("GF")]
9527    Gf,
9528    #[serde(rename = "PF")]
9529    #[display("PF")]
9530    Pf,
9531    #[serde(rename = "TF")]
9532    #[display("TF")]
9533    Tf,
9534    #[serde(rename = "GA")]
9535    #[display("GA")]
9536    Ga,
9537    #[serde(rename = "GM")]
9538    #[display("GM")]
9539    Gm,
9540    #[serde(rename = "GE")]
9541    #[display("GE")]
9542    Ge,
9543    #[serde(rename = "DE")]
9544    #[display("DE")]
9545    De,
9546    #[serde(rename = "GH")]
9547    #[display("GH")]
9548    Gh,
9549    #[serde(rename = "GI")]
9550    #[display("GI")]
9551    Gi,
9552    #[serde(rename = "GR")]
9553    #[display("GR")]
9554    Gr,
9555    #[serde(rename = "GL")]
9556    #[display("GL")]
9557    Gl,
9558    #[serde(rename = "GD")]
9559    #[display("GD")]
9560    Gd,
9561    #[serde(rename = "GP")]
9562    #[display("GP")]
9563    Gp,
9564    #[serde(rename = "GU")]
9565    #[display("GU")]
9566    Gu,
9567    #[serde(rename = "GT")]
9568    #[display("GT")]
9569    Gt,
9570    #[serde(rename = "GG")]
9571    #[display("GG")]
9572    Gg,
9573    #[serde(rename = "GN")]
9574    #[display("GN")]
9575    Gn,
9576    #[serde(rename = "GW")]
9577    #[display("GW")]
9578    Gw,
9579    #[serde(rename = "GY")]
9580    #[display("GY")]
9581    Gy,
9582    #[serde(rename = "HT")]
9583    #[display("HT")]
9584    Ht,
9585    #[serde(rename = "HM")]
9586    #[display("HM")]
9587    Hm,
9588    #[serde(rename = "VA")]
9589    #[display("VA")]
9590    Va,
9591    #[serde(rename = "HN")]
9592    #[display("HN")]
9593    Hn,
9594    #[serde(rename = "HK")]
9595    #[display("HK")]
9596    Hk,
9597    #[serde(rename = "HU")]
9598    #[display("HU")]
9599    Hu,
9600    #[serde(rename = "IS")]
9601    #[display("IS")]
9602    Is,
9603    #[serde(rename = "IN")]
9604    #[display("IN")]
9605    In,
9606    #[serde(rename = "ID")]
9607    #[display("ID")]
9608    Id,
9609    #[serde(rename = "IQ")]
9610    #[display("IQ")]
9611    Iq,
9612    #[serde(rename = "IE")]
9613    #[display("IE")]
9614    Ie,
9615    #[serde(rename = "IM")]
9616    #[display("IM")]
9617    Im,
9618    #[serde(rename = "IL")]
9619    #[display("IL")]
9620    Il,
9621    #[serde(rename = "IT")]
9622    #[display("IT")]
9623    It,
9624    #[serde(rename = "JM")]
9625    #[display("JM")]
9626    Jm,
9627    #[serde(rename = "JP")]
9628    #[display("JP")]
9629    Jp,
9630    #[serde(rename = "JE")]
9631    #[display("JE")]
9632    Je,
9633    #[serde(rename = "JO")]
9634    #[display("JO")]
9635    Jo,
9636    #[serde(rename = "KZ")]
9637    #[display("KZ")]
9638    Kz,
9639    #[serde(rename = "KE")]
9640    #[display("KE")]
9641    Ke,
9642    #[serde(rename = "KI")]
9643    #[display("KI")]
9644    Ki,
9645    #[serde(rename = "KR")]
9646    #[display("KR")]
9647    Kr,
9648    #[serde(rename = "XK")]
9649    #[display("XK")]
9650    Xk,
9651    #[serde(rename = "KW")]
9652    #[display("KW")]
9653    Kw,
9654    #[serde(rename = "KG")]
9655    #[display("KG")]
9656    Kg,
9657    #[serde(rename = "LA")]
9658    #[display("LA")]
9659    La,
9660    #[serde(rename = "LV")]
9661    #[display("LV")]
9662    Lv,
9663    #[serde(rename = "LB")]
9664    #[display("LB")]
9665    Lb,
9666    #[serde(rename = "LS")]
9667    #[display("LS")]
9668    Ls,
9669    #[serde(rename = "LR")]
9670    #[display("LR")]
9671    Lr,
9672    #[serde(rename = "LY")]
9673    #[display("LY")]
9674    Ly,
9675    #[serde(rename = "LI")]
9676    #[display("LI")]
9677    Li,
9678    #[serde(rename = "LT")]
9679    #[display("LT")]
9680    Lt,
9681    #[serde(rename = "LU")]
9682    #[display("LU")]
9683    Lu,
9684    #[serde(rename = "MO")]
9685    #[display("MO")]
9686    Mo,
9687    #[serde(rename = "MG")]
9688    #[display("MG")]
9689    Mg,
9690    #[serde(rename = "MW")]
9691    #[display("MW")]
9692    Mw,
9693    #[serde(rename = "MY")]
9694    #[display("MY")]
9695    My,
9696    #[serde(rename = "MV")]
9697    #[display("MV")]
9698    Mv,
9699    #[serde(rename = "ML")]
9700    #[display("ML")]
9701    Ml,
9702    #[serde(rename = "MT")]
9703    #[display("MT")]
9704    Mt,
9705    #[serde(rename = "MH")]
9706    #[display("MH")]
9707    Mh,
9708    #[serde(rename = "MQ")]
9709    #[display("MQ")]
9710    Mq,
9711    #[serde(rename = "MR")]
9712    #[display("MR")]
9713    Mr,
9714    #[serde(rename = "MU")]
9715    #[display("MU")]
9716    Mu,
9717    #[serde(rename = "YT")]
9718    #[display("YT")]
9719    Yt,
9720    #[serde(rename = "MX")]
9721    #[display("MX")]
9722    Mx,
9723    #[serde(rename = "FM")]
9724    #[display("FM")]
9725    Fm,
9726    #[serde(rename = "MD")]
9727    #[display("MD")]
9728    Md,
9729    #[serde(rename = "MC")]
9730    #[display("MC")]
9731    Mc,
9732    #[serde(rename = "MN")]
9733    #[display("MN")]
9734    Mn,
9735    #[serde(rename = "ME")]
9736    #[display("ME")]
9737    Me,
9738    #[serde(rename = "MS")]
9739    #[display("MS")]
9740    Ms,
9741    #[serde(rename = "MA")]
9742    #[display("MA")]
9743    Ma,
9744    #[serde(rename = "MZ")]
9745    #[display("MZ")]
9746    Mz,
9747    #[serde(rename = "MM")]
9748    #[display("MM")]
9749    Mm,
9750    #[serde(rename = "NA")]
9751    #[display("NA")]
9752    Na,
9753    #[serde(rename = "NR")]
9754    #[display("NR")]
9755    Nr,
9756    #[serde(rename = "NP")]
9757    #[display("NP")]
9758    Np,
9759    #[serde(rename = "NL")]
9760    #[display("NL")]
9761    Nl,
9762    #[serde(rename = "AN")]
9763    #[display("AN")]
9764    An,
9765    #[serde(rename = "NC")]
9766    #[display("NC")]
9767    Nc,
9768    #[serde(rename = "NZ")]
9769    #[display("NZ")]
9770    Nz,
9771    #[serde(rename = "NI")]
9772    #[display("NI")]
9773    Ni,
9774    #[serde(rename = "NE")]
9775    #[display("NE")]
9776    Ne,
9777    #[serde(rename = "NG")]
9778    #[display("NG")]
9779    Ng,
9780    #[serde(rename = "NU")]
9781    #[display("NU")]
9782    Nu,
9783    #[serde(rename = "NF")]
9784    #[display("NF")]
9785    Nf,
9786    #[serde(rename = "MK")]
9787    #[display("MK")]
9788    Mk,
9789    #[serde(rename = "MP")]
9790    #[display("MP")]
9791    Mp,
9792    #[serde(rename = "NO")]
9793    #[display("NO")]
9794    No,
9795    #[serde(rename = "OM")]
9796    #[display("OM")]
9797    Om,
9798    #[serde(rename = "PK")]
9799    #[display("PK")]
9800    Pk,
9801    #[serde(rename = "PW")]
9802    #[display("PW")]
9803    Pw,
9804    #[serde(rename = "PS")]
9805    #[display("PS")]
9806    Ps,
9807    #[serde(rename = "PA")]
9808    #[display("PA")]
9809    Pa,
9810    #[serde(rename = "PG")]
9811    #[display("PG")]
9812    Pg,
9813    #[serde(rename = "PY")]
9814    #[display("PY")]
9815    Py,
9816    #[serde(rename = "PE")]
9817    #[display("PE")]
9818    Pe,
9819    #[serde(rename = "PH")]
9820    #[display("PH")]
9821    Ph,
9822    #[serde(rename = "PN")]
9823    #[display("PN")]
9824    Pn,
9825    #[serde(rename = "PL")]
9826    #[display("PL")]
9827    Pl,
9828    #[serde(rename = "PT")]
9829    #[display("PT")]
9830    Pt,
9831    #[serde(rename = "PR")]
9832    #[display("PR")]
9833    Pr,
9834    #[serde(rename = "QA")]
9835    #[display("QA")]
9836    Qa,
9837    #[serde(rename = "RO")]
9838    #[display("RO")]
9839    Ro,
9840    #[serde(rename = "RU")]
9841    #[display("RU")]
9842    Ru,
9843    #[serde(rename = "RW")]
9844    #[display("RW")]
9845    Rw,
9846    #[serde(rename = "RE")]
9847    #[display("RE")]
9848    Re,
9849    #[serde(rename = "BL")]
9850    #[display("BL")]
9851    Bl,
9852    #[serde(rename = "SH")]
9853    #[display("SH")]
9854    Sh,
9855    #[serde(rename = "KN")]
9856    #[display("KN")]
9857    Kn,
9858    #[serde(rename = "LC")]
9859    #[display("LC")]
9860    Lc,
9861    #[serde(rename = "MF")]
9862    #[display("MF")]
9863    Mf,
9864    #[serde(rename = "PM")]
9865    #[display("PM")]
9866    Pm,
9867    #[serde(rename = "VC")]
9868    #[display("VC")]
9869    Vc,
9870    #[serde(rename = "WS")]
9871    #[display("WS")]
9872    Ws,
9873    #[serde(rename = "SM")]
9874    #[display("SM")]
9875    Sm,
9876    #[serde(rename = "ST")]
9877    #[display("ST")]
9878    St,
9879    #[serde(rename = "SA")]
9880    #[display("SA")]
9881    Sa,
9882    #[serde(rename = "SN")]
9883    #[display("SN")]
9884    Sn,
9885    #[serde(rename = "RS")]
9886    #[display("RS")]
9887    Rs,
9888    #[serde(rename = "SC")]
9889    #[display("SC")]
9890    Sc,
9891    #[serde(rename = "SL")]
9892    #[display("SL")]
9893    Sl,
9894    #[serde(rename = "SG")]
9895    #[display("SG")]
9896    Sg,
9897    #[serde(rename = "SX")]
9898    #[display("SX")]
9899    Sx,
9900    #[serde(rename = "SK")]
9901    #[display("SK")]
9902    Sk,
9903    #[serde(rename = "SI")]
9904    #[display("SI")]
9905    Si,
9906    #[serde(rename = "SB")]
9907    #[display("SB")]
9908    Sb,
9909    #[serde(rename = "SO")]
9910    #[display("SO")]
9911    So,
9912    #[serde(rename = "ZA")]
9913    #[display("ZA")]
9914    Za,
9915    #[serde(rename = "GS")]
9916    #[display("GS")]
9917    Gs,
9918    #[serde(rename = "SS")]
9919    #[display("SS")]
9920    Ss,
9921    #[serde(rename = "ES")]
9922    #[display("ES")]
9923    Es,
9924    #[serde(rename = "LK")]
9925    #[display("LK")]
9926    Lk,
9927    #[serde(rename = "SD")]
9928    #[display("SD")]
9929    Sd,
9930    #[serde(rename = "SR")]
9931    #[display("SR")]
9932    Sr,
9933    #[serde(rename = "SJ")]
9934    #[display("SJ")]
9935    Sj,
9936    #[serde(rename = "SE")]
9937    #[display("SE")]
9938    Se,
9939    #[serde(rename = "CH")]
9940    #[display("CH")]
9941    Ch,
9942    #[serde(rename = "TW")]
9943    #[display("TW")]
9944    Tw,
9945    #[serde(rename = "TJ")]
9946    #[display("TJ")]
9947    Tj,
9948    #[serde(rename = "TZ")]
9949    #[display("TZ")]
9950    Tz,
9951    #[serde(rename = "TH")]
9952    #[display("TH")]
9953    Th,
9954    #[serde(rename = "TL")]
9955    #[display("TL")]
9956    Tl,
9957    #[serde(rename = "TG")]
9958    #[display("TG")]
9959    Tg,
9960    #[serde(rename = "TK")]
9961    #[display("TK")]
9962    Tk,
9963    #[serde(rename = "TO")]
9964    #[display("TO")]
9965    To,
9966    #[serde(rename = "TT")]
9967    #[display("TT")]
9968    Tt,
9969    #[serde(rename = "TN")]
9970    #[display("TN")]
9971    Tn,
9972    #[serde(rename = "TR")]
9973    #[display("TR")]
9974    Tr,
9975    #[serde(rename = "TM")]
9976    #[display("TM")]
9977    Tm,
9978    #[serde(rename = "TC")]
9979    #[display("TC")]
9980    Tc,
9981    #[serde(rename = "TV")]
9982    #[display("TV")]
9983    Tv,
9984    #[serde(rename = "UG")]
9985    #[display("UG")]
9986    Ug,
9987    #[serde(rename = "UA")]
9988    #[display("UA")]
9989    Ua,
9990    #[serde(rename = "AE")]
9991    #[display("AE")]
9992    Ae,
9993    #[serde(rename = "GB")]
9994    #[display("GB")]
9995    Gb,
9996    #[serde(rename = "US")]
9997    #[display("US")]
9998    Us,
9999    #[serde(rename = "UM")]
10000    #[display("UM")]
10001    Um,
10002    #[serde(rename = "UY")]
10003    #[display("UY")]
10004    Uy,
10005    #[serde(rename = "UZ")]
10006    #[display("UZ")]
10007    Uz,
10008    #[serde(rename = "VU")]
10009    #[display("VU")]
10010    Vu,
10011    #[serde(rename = "VE")]
10012    #[display("VE")]
10013    Ve,
10014    #[serde(rename = "VN")]
10015    #[display("VN")]
10016    Vn,
10017    #[serde(rename = "VG")]
10018    #[display("VG")]
10019    Vg,
10020    #[serde(rename = "VI")]
10021    #[display("VI")]
10022    Vi,
10023    #[serde(rename = "WF")]
10024    #[display("WF")]
10025    Wf,
10026    #[serde(rename = "EH")]
10027    #[display("EH")]
10028    Eh,
10029    #[serde(rename = "YE")]
10030    #[display("YE")]
10031    Ye,
10032    #[serde(rename = "ZM")]
10033    #[display("ZM")]
10034    Zm,
10035    #[serde(rename = "ZW")]
10036    #[display("ZW")]
10037    Zw,
10038}
10039
10040#[doc = "Worker."]
10041#[derive(
10042    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10043)]
10044pub struct Worker {
10045    #[doc = "Identifier field"]
10046    pub id: String,
10047    #[doc = "Record creation date"]
10048    pub created_at: String,
10049    #[doc = "Record update date"]
10050    pub updated_at: String,
10051    #[doc = "The worker's associated user."]
10052    #[serde(default, skip_serializing_if = "Option::is_none")]
10053    pub user_id: Option<String>,
10054    #[doc = "The worker's associated user.\n\nExpandable field"]
10055    #[serde(default, skip_serializing_if = "Option::is_none")]
10056    pub user: Option<User>,
10057    #[doc = "The worker's manager."]
10058    #[serde(default, skip_serializing_if = "Option::is_none")]
10059    pub manager_id: Option<String>,
10060    #[doc = "The worker's manager.\n\nExpandable field"]
10061    #[serde(default, skip_serializing_if = "Option::is_none")]
10062    pub manager: Option<Box<Worker>>,
10063    #[doc = "The worker's associated legal entity."]
10064    #[serde(default, skip_serializing_if = "Option::is_none")]
10065    pub legal_entity_id: Option<String>,
10066    #[doc = "The worker's associated legal entity.\n\nExpandable field"]
10067    #[serde(default, skip_serializing_if = "Option::is_none")]
10068    pub legal_entity: Option<LegalEntity>,
10069    #[doc = "The worker's country."]
10070    #[serde(default, skip_serializing_if = "Option::is_none")]
10071    pub country: Option<WorkerCountry>,
10072    #[doc = "The start date of the worker."]
10073    #[serde(default, skip_serializing_if = "Option::is_none")]
10074    pub start_date: Option<String>,
10075    #[doc = "The end date of the worker."]
10076    #[serde(default, skip_serializing_if = "Option::is_none")]
10077    pub end_date: Option<String>,
10078    #[doc = "The worker's number within the organization."]
10079    #[serde(default, skip_serializing_if = "Option::is_none")]
10080    pub number: Option<i64>,
10081    #[doc = "The worker's associated work email address."]
10082    #[serde(default, skip_serializing_if = "Option::is_none")]
10083    pub work_email: Option<String>,
10084    #[doc = "The worker's associated personal email address."]
10085    #[serde(default, skip_serializing_if = "Option::is_none")]
10086    pub personal_email: Option<String>,
10087    #[doc = "The worker's status within the organization."]
10088    #[serde(default, skip_serializing_if = "Option::is_none")]
10089    pub status: Option<WorkerStatus>,
10090    #[doc = "The location that the worker is mapped to for tax purposes. In the case that a \
10091             worker is remote, the location's type is remote."]
10092    #[serde(default, skip_serializing_if = "Option::is_none")]
10093    pub location: Option<WorkerLocation>,
10094    #[doc = "The worker's employment type."]
10095    #[serde(default, skip_serializing_if = "Option::is_none")]
10096    pub employment_type_id: Option<String>,
10097    #[doc = "The worker's employment type.\n\nExpandable field"]
10098    #[serde(default, skip_serializing_if = "Option::is_none")]
10099    pub employment_type: Option<CompanyEmploymentType>,
10100    #[doc = "The gender of the worker, if specified."]
10101    #[serde(default, skip_serializing_if = "Option::is_none")]
10102    pub gender: Option<Gender>,
10103    #[doc = "The worker's date of birth."]
10104    #[serde(default, skip_serializing_if = "Option::is_none")]
10105    pub date_of_birth: Option<String>,
10106    #[doc = "The identified race of the worker, if specified."]
10107    #[serde(default, skip_serializing_if = "Option::is_none")]
10108    pub race: Option<Race>,
10109    #[doc = "The identified ethnicity of the worker, if specified."]
10110    #[serde(default, skip_serializing_if = "Option::is_none")]
10111    pub ethnicity: Option<Ethnicity>,
10112    #[doc = "The countries that the worker has citizenship in."]
10113    #[serde(default, skip_serializing_if = "Option::is_none")]
10114    pub citizenship: Option<Citizenship>,
10115    #[doc = "The compensation package for the worker."]
10116    #[serde(default, skip_serializing_if = "Option::is_none")]
10117    pub compensation_id: Option<String>,
10118    #[doc = "The compensation package for the worker.\n\nExpandable field"]
10119    #[serde(default, skip_serializing_if = "Option::is_none")]
10120    pub compensation: Option<Compensation>,
10121    #[doc = "The worker's assigned department."]
10122    #[serde(default, skip_serializing_if = "Option::is_none")]
10123    pub department_id: Option<String>,
10124    #[doc = "The worker's assigned department.\n\nExpandable field"]
10125    #[serde(default, skip_serializing_if = "Option::is_none")]
10126    pub department: Option<Department>,
10127    #[doc = "The worker's assigned teams."]
10128    #[serde(default, skip_serializing_if = "Option::is_none")]
10129    pub teams_id: Option<Vec<String>>,
10130    #[doc = "The worker's assigned teams.\n\nExpandable field"]
10131    #[serde(default, skip_serializing_if = "Option::is_none")]
10132    pub teams: Option<Vec<Team>>,
10133    #[doc = "The worker's title."]
10134    #[serde(default, skip_serializing_if = "Option::is_none")]
10135    pub title: Option<String>,
10136    #[doc = "The level of the worker."]
10137    #[serde(default, skip_serializing_if = "Option::is_none")]
10138    pub level_id: Option<String>,
10139    #[doc = "The level of the worker.\n\nExpandable field"]
10140    #[serde(default, skip_serializing_if = "Option::is_none")]
10141    pub level: Option<Level>,
10142    #[doc = "The details of the worker's termination, if applicable."]
10143    #[serde(default, skip_serializing_if = "Option::is_none")]
10144    pub termination_details: Option<TerminationDetails>,
10145    #[doc = "Custom fields for the worker\n\nExpandable field"]
10146    #[serde(default, skip_serializing_if = "Option::is_none")]
10147    pub custom_fields: Option<Vec<std::collections::HashMap<String, serde_json::Value>>>,
10148}
10149
10150impl std::fmt::Display for Worker {
10151    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10152        write!(
10153            f,
10154            "{}",
10155            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10156        )
10157    }
10158}
10159
10160#[cfg(feature = "tabled")]
10161impl tabled::Tabled for Worker {
10162    const LENGTH: usize = 35;
10163    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10164        vec![
10165            self.id.clone().into(),
10166            self.created_at.clone().into(),
10167            self.updated_at.clone().into(),
10168            if let Some(user_id) = &self.user_id {
10169                format!("{:?}", user_id).into()
10170            } else {
10171                String::new().into()
10172            },
10173            if let Some(user) = &self.user {
10174                format!("{:?}", user).into()
10175            } else {
10176                String::new().into()
10177            },
10178            if let Some(manager_id) = &self.manager_id {
10179                format!("{:?}", manager_id).into()
10180            } else {
10181                String::new().into()
10182            },
10183            if let Some(manager) = &self.manager {
10184                format!("{:?}", manager).into()
10185            } else {
10186                String::new().into()
10187            },
10188            if let Some(legal_entity_id) = &self.legal_entity_id {
10189                format!("{:?}", legal_entity_id).into()
10190            } else {
10191                String::new().into()
10192            },
10193            if let Some(legal_entity) = &self.legal_entity {
10194                format!("{:?}", legal_entity).into()
10195            } else {
10196                String::new().into()
10197            },
10198            if let Some(country) = &self.country {
10199                format!("{:?}", country).into()
10200            } else {
10201                String::new().into()
10202            },
10203            if let Some(start_date) = &self.start_date {
10204                format!("{:?}", start_date).into()
10205            } else {
10206                String::new().into()
10207            },
10208            if let Some(end_date) = &self.end_date {
10209                format!("{:?}", end_date).into()
10210            } else {
10211                String::new().into()
10212            },
10213            if let Some(number) = &self.number {
10214                format!("{:?}", number).into()
10215            } else {
10216                String::new().into()
10217            },
10218            if let Some(work_email) = &self.work_email {
10219                format!("{:?}", work_email).into()
10220            } else {
10221                String::new().into()
10222            },
10223            if let Some(personal_email) = &self.personal_email {
10224                format!("{:?}", personal_email).into()
10225            } else {
10226                String::new().into()
10227            },
10228            if let Some(status) = &self.status {
10229                format!("{:?}", status).into()
10230            } else {
10231                String::new().into()
10232            },
10233            if let Some(location) = &self.location {
10234                format!("{:?}", location).into()
10235            } else {
10236                String::new().into()
10237            },
10238            if let Some(employment_type_id) = &self.employment_type_id {
10239                format!("{:?}", employment_type_id).into()
10240            } else {
10241                String::new().into()
10242            },
10243            if let Some(employment_type) = &self.employment_type {
10244                format!("{:?}", employment_type).into()
10245            } else {
10246                String::new().into()
10247            },
10248            if let Some(gender) = &self.gender {
10249                format!("{:?}", gender).into()
10250            } else {
10251                String::new().into()
10252            },
10253            if let Some(date_of_birth) = &self.date_of_birth {
10254                format!("{:?}", date_of_birth).into()
10255            } else {
10256                String::new().into()
10257            },
10258            if let Some(race) = &self.race {
10259                format!("{:?}", race).into()
10260            } else {
10261                String::new().into()
10262            },
10263            if let Some(ethnicity) = &self.ethnicity {
10264                format!("{:?}", ethnicity).into()
10265            } else {
10266                String::new().into()
10267            },
10268            if let Some(citizenship) = &self.citizenship {
10269                format!("{:?}", citizenship).into()
10270            } else {
10271                String::new().into()
10272            },
10273            if let Some(compensation_id) = &self.compensation_id {
10274                format!("{:?}", compensation_id).into()
10275            } else {
10276                String::new().into()
10277            },
10278            if let Some(compensation) = &self.compensation {
10279                format!("{:?}", compensation).into()
10280            } else {
10281                String::new().into()
10282            },
10283            if let Some(department_id) = &self.department_id {
10284                format!("{:?}", department_id).into()
10285            } else {
10286                String::new().into()
10287            },
10288            if let Some(department) = &self.department {
10289                format!("{:?}", department).into()
10290            } else {
10291                String::new().into()
10292            },
10293            if let Some(teams_id) = &self.teams_id {
10294                format!("{:?}", teams_id).into()
10295            } else {
10296                String::new().into()
10297            },
10298            if let Some(teams) = &self.teams {
10299                format!("{:?}", teams).into()
10300            } else {
10301                String::new().into()
10302            },
10303            if let Some(title) = &self.title {
10304                format!("{:?}", title).into()
10305            } else {
10306                String::new().into()
10307            },
10308            if let Some(level_id) = &self.level_id {
10309                format!("{:?}", level_id).into()
10310            } else {
10311                String::new().into()
10312            },
10313            if let Some(level) = &self.level {
10314                format!("{:?}", level).into()
10315            } else {
10316                String::new().into()
10317            },
10318            if let Some(termination_details) = &self.termination_details {
10319                format!("{:?}", termination_details).into()
10320            } else {
10321                String::new().into()
10322            },
10323            if let Some(custom_fields) = &self.custom_fields {
10324                format!("{:?}", custom_fields).into()
10325            } else {
10326                String::new().into()
10327            },
10328        ]
10329    }
10330
10331    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10332        vec![
10333            "id".into(),
10334            "created_at".into(),
10335            "updated_at".into(),
10336            "user_id".into(),
10337            "user".into(),
10338            "manager_id".into(),
10339            "manager".into(),
10340            "legal_entity_id".into(),
10341            "legal_entity".into(),
10342            "country".into(),
10343            "start_date".into(),
10344            "end_date".into(),
10345            "number".into(),
10346            "work_email".into(),
10347            "personal_email".into(),
10348            "status".into(),
10349            "location".into(),
10350            "employment_type_id".into(),
10351            "employment_type".into(),
10352            "gender".into(),
10353            "date_of_birth".into(),
10354            "race".into(),
10355            "ethnicity".into(),
10356            "citizenship".into(),
10357            "compensation_id".into(),
10358            "compensation".into(),
10359            "department_id".into(),
10360            "department".into(),
10361            "teams_id".into(),
10362            "teams".into(),
10363            "title".into(),
10364            "level_id".into(),
10365            "level".into(),
10366            "termination_details".into(),
10367            "custom_fields".into(),
10368        ]
10369    }
10370}
10371
10372#[doc = "The type of location."]
10373#[derive(
10374    serde :: Serialize,
10375    serde :: Deserialize,
10376    PartialEq,
10377    Hash,
10378    Debug,
10379    Clone,
10380    schemars :: JsonSchema,
10381    parse_display :: FromStr,
10382    parse_display :: Display,
10383)]
10384#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
10385#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
10386pub enum WorkerLocationType {
10387    #[serde(rename = "REMOTE")]
10388    #[display("REMOTE")]
10389    Remote,
10390    #[serde(rename = "WORK")]
10391    #[display("WORK")]
10392    Work,
10393}
10394
10395#[doc = "WorkerLocation."]
10396#[derive(
10397    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10398)]
10399pub struct WorkerLocation {
10400    #[doc = "The type of location."]
10401    #[serde(rename = "type")]
10402    pub type_: WorkerLocationType,
10403}
10404
10405impl std::fmt::Display for WorkerLocation {
10406    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10407        write!(
10408            f,
10409            "{}",
10410            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10411        )
10412    }
10413}
10414
10415#[cfg(feature = "tabled")]
10416impl tabled::Tabled for WorkerLocation {
10417    const LENGTH: usize = 1;
10418    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10419        vec![format!("{:?}", self.type_).into()]
10420    }
10421
10422    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10423        vec!["type_".into()]
10424    }
10425}
10426
10427#[derive(
10428    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10429)]
10430pub struct ListCandidatesResponse {
10431    #[doc = "A list of redacted fields."]
10432    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
10433    pub meta: Option<RedactedFields>,
10434    pub results: Vec<Candidate>,
10435    #[doc = "A link to the next page of responses."]
10436    #[serde(default, skip_serializing_if = "Option::is_none")]
10437    pub next_link: Option<String>,
10438}
10439
10440impl std::fmt::Display for ListCandidatesResponse {
10441    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10442        write!(
10443            f,
10444            "{}",
10445            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10446        )
10447    }
10448}
10449
10450#[cfg(feature = "requests")]
10451impl crate::types::paginate::Pagination for ListCandidatesResponse {
10452    type Item = Candidate;
10453    fn has_more_pages(&self) -> bool {
10454        self.next_link.is_some()
10455    }
10456
10457    fn next_page_token(&self) -> Option<String> {
10458        self.next_link.clone()
10459    }
10460
10461    fn next_page(
10462        &self,
10463        req: reqwest::Request,
10464    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
10465        let mut req = req.try_clone().ok_or_else(|| {
10466            crate::types::error::Error::InvalidRequest(format!(
10467                "failed to clone request: {:?}",
10468                req
10469            ))
10470        })?;
10471        *req.url_mut() =
10472            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
10473                crate::types::error::Error::InvalidRequest(format!(
10474                    "failed to parse url: {:?}",
10475                    self.next_link
10476                ))
10477            })?;
10478        Ok(req)
10479    }
10480
10481    fn items(&self) -> Vec<Self::Item> {
10482        self.results.clone()
10483    }
10484}
10485
10486#[cfg(feature = "tabled")]
10487impl tabled::Tabled for ListCandidatesResponse {
10488    const LENGTH: usize = 3;
10489    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10490        vec![
10491            if let Some(meta) = &self.meta {
10492                format!("{:?}", meta).into()
10493            } else {
10494                String::new().into()
10495            },
10496            format!("{:?}", self.results).into(),
10497            if let Some(next_link) = &self.next_link {
10498                format!("{:?}", next_link).into()
10499            } else {
10500                String::new().into()
10501            },
10502        ]
10503    }
10504
10505    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10506        vec!["meta".into(), "results".into(), "next_link".into()]
10507    }
10508}
10509
10510#[derive(
10511    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10512)]
10513pub struct ListCandidateApplicationsResponse {
10514    #[doc = "A list of redacted fields."]
10515    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
10516    pub meta: Option<RedactedFields>,
10517    pub results: Vec<Application>,
10518    #[doc = "A link to the next page of responses."]
10519    #[serde(default, skip_serializing_if = "Option::is_none")]
10520    pub next_link: Option<String>,
10521}
10522
10523impl std::fmt::Display for ListCandidateApplicationsResponse {
10524    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10525        write!(
10526            f,
10527            "{}",
10528            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10529        )
10530    }
10531}
10532
10533#[cfg(feature = "requests")]
10534impl crate::types::paginate::Pagination for ListCandidateApplicationsResponse {
10535    type Item = Application;
10536    fn has_more_pages(&self) -> bool {
10537        self.next_link.is_some()
10538    }
10539
10540    fn next_page_token(&self) -> Option<String> {
10541        self.next_link.clone()
10542    }
10543
10544    fn next_page(
10545        &self,
10546        req: reqwest::Request,
10547    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
10548        let mut req = req.try_clone().ok_or_else(|| {
10549            crate::types::error::Error::InvalidRequest(format!(
10550                "failed to clone request: {:?}",
10551                req
10552            ))
10553        })?;
10554        *req.url_mut() =
10555            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
10556                crate::types::error::Error::InvalidRequest(format!(
10557                    "failed to parse url: {:?}",
10558                    self.next_link
10559                ))
10560            })?;
10561        Ok(req)
10562    }
10563
10564    fn items(&self) -> Vec<Self::Item> {
10565        self.results.clone()
10566    }
10567}
10568
10569#[cfg(feature = "tabled")]
10570impl tabled::Tabled for ListCandidateApplicationsResponse {
10571    const LENGTH: usize = 3;
10572    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10573        vec![
10574            if let Some(meta) = &self.meta {
10575                format!("{:?}", meta).into()
10576            } else {
10577                String::new().into()
10578            },
10579            format!("{:?}", self.results).into(),
10580            if let Some(next_link) = &self.next_link {
10581                format!("{:?}", next_link).into()
10582            } else {
10583                String::new().into()
10584            },
10585        ]
10586    }
10587
10588    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10589        vec!["meta".into(), "results".into(), "next_link".into()]
10590    }
10591}
10592
10593#[derive(
10594    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10595)]
10596pub struct ListCompaniesResponse {
10597    #[doc = "A list of redacted fields."]
10598    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
10599    pub meta: Option<RedactedFields>,
10600    pub results: Vec<Company>,
10601    #[doc = "A link to the next page of responses."]
10602    #[serde(default, skip_serializing_if = "Option::is_none")]
10603    pub next_link: Option<String>,
10604}
10605
10606impl std::fmt::Display for ListCompaniesResponse {
10607    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10608        write!(
10609            f,
10610            "{}",
10611            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10612        )
10613    }
10614}
10615
10616#[cfg(feature = "requests")]
10617impl crate::types::paginate::Pagination for ListCompaniesResponse {
10618    type Item = Company;
10619    fn has_more_pages(&self) -> bool {
10620        self.next_link.is_some()
10621    }
10622
10623    fn next_page_token(&self) -> Option<String> {
10624        self.next_link.clone()
10625    }
10626
10627    fn next_page(
10628        &self,
10629        req: reqwest::Request,
10630    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
10631        let mut req = req.try_clone().ok_or_else(|| {
10632            crate::types::error::Error::InvalidRequest(format!(
10633                "failed to clone request: {:?}",
10634                req
10635            ))
10636        })?;
10637        *req.url_mut() =
10638            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
10639                crate::types::error::Error::InvalidRequest(format!(
10640                    "failed to parse url: {:?}",
10641                    self.next_link
10642                ))
10643            })?;
10644        Ok(req)
10645    }
10646
10647    fn items(&self) -> Vec<Self::Item> {
10648        self.results.clone()
10649    }
10650}
10651
10652#[cfg(feature = "tabled")]
10653impl tabled::Tabled for ListCompaniesResponse {
10654    const LENGTH: usize = 3;
10655    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10656        vec![
10657            if let Some(meta) = &self.meta {
10658                format!("{:?}", meta).into()
10659            } else {
10660                String::new().into()
10661            },
10662            format!("{:?}", self.results).into(),
10663            if let Some(next_link) = &self.next_link {
10664                format!("{:?}", next_link).into()
10665            } else {
10666                String::new().into()
10667            },
10668        ]
10669    }
10670
10671    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10672        vec!["meta".into(), "results".into(), "next_link".into()]
10673    }
10674}
10675
10676#[derive(
10677    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10678)]
10679pub struct ListCompensationsResponse {
10680    #[doc = "A list of redacted fields."]
10681    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
10682    pub meta: Option<RedactedFields>,
10683    pub results: Vec<Compensation>,
10684    #[doc = "A link to the next page of responses."]
10685    #[serde(default, skip_serializing_if = "Option::is_none")]
10686    pub next_link: Option<String>,
10687}
10688
10689impl std::fmt::Display for ListCompensationsResponse {
10690    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10691        write!(
10692            f,
10693            "{}",
10694            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10695        )
10696    }
10697}
10698
10699#[cfg(feature = "requests")]
10700impl crate::types::paginate::Pagination for ListCompensationsResponse {
10701    type Item = Compensation;
10702    fn has_more_pages(&self) -> bool {
10703        self.next_link.is_some()
10704    }
10705
10706    fn next_page_token(&self) -> Option<String> {
10707        self.next_link.clone()
10708    }
10709
10710    fn next_page(
10711        &self,
10712        req: reqwest::Request,
10713    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
10714        let mut req = req.try_clone().ok_or_else(|| {
10715            crate::types::error::Error::InvalidRequest(format!(
10716                "failed to clone request: {:?}",
10717                req
10718            ))
10719        })?;
10720        *req.url_mut() =
10721            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
10722                crate::types::error::Error::InvalidRequest(format!(
10723                    "failed to parse url: {:?}",
10724                    self.next_link
10725                ))
10726            })?;
10727        Ok(req)
10728    }
10729
10730    fn items(&self) -> Vec<Self::Item> {
10731        self.results.clone()
10732    }
10733}
10734
10735#[cfg(feature = "tabled")]
10736impl tabled::Tabled for ListCompensationsResponse {
10737    const LENGTH: usize = 3;
10738    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10739        vec![
10740            if let Some(meta) = &self.meta {
10741                format!("{:?}", meta).into()
10742            } else {
10743                String::new().into()
10744            },
10745            format!("{:?}", self.results).into(),
10746            if let Some(next_link) = &self.next_link {
10747                format!("{:?}", next_link).into()
10748            } else {
10749                String::new().into()
10750            },
10751        ]
10752    }
10753
10754    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10755        vec!["meta".into(), "results".into(), "next_link".into()]
10756    }
10757}
10758
10759#[derive(
10760    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10761)]
10762pub struct GetCompensationsResponse {
10763    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
10764    pub meta: Option<Meta>,
10765    #[doc = "Identifier field"]
10766    pub id: String,
10767    #[doc = "Record creation date"]
10768    pub created_at: String,
10769    #[doc = "Record update date"]
10770    pub updated_at: String,
10771    #[doc = "The worker's ID."]
10772    #[serde(default, skip_serializing_if = "Option::is_none")]
10773    pub worker_id: Option<String>,
10774    #[doc = "The worker's annual compensation. This calculation assumes 40-hour work weeks for \
10775             workers with an hourly wage."]
10776    #[serde(default, skip_serializing_if = "Option::is_none")]
10777    pub annual_compensation: Option<Currency>,
10778    #[doc = "The worker's annual salary equivalent, for insurance purposes. It will be equal to \
10779             the worker's annual compensation, except for owners that are receiving no \
10780             cashcompensation."]
10781    #[serde(default, skip_serializing_if = "Option::is_none")]
10782    pub annual_salary_equivalent: Option<Currency>,
10783    #[doc = "The worker's hourly wage. This calculation assumes 40-hour work weeks for workers \
10784             with fixed compensation."]
10785    #[serde(default, skip_serializing_if = "Option::is_none")]
10786    pub hourly_wage: Option<Currency>,
10787    #[doc = "The worker's monthly compensation. This calculation assumes 40-hour work weeks for \
10788             workers with an hourly wage."]
10789    #[serde(default, skip_serializing_if = "Option::is_none")]
10790    pub monthly_compensation: Option<Currency>,
10791    #[doc = "The worker's on-target commission."]
10792    #[serde(default, skip_serializing_if = "Option::is_none")]
10793    pub on_target_commission: Option<Currency>,
10794    #[doc = "The worker's hourly wage. This calculation assumes 40-hour work weeks for workers \
10795             with fixed compensation."]
10796    #[serde(default, skip_serializing_if = "Option::is_none")]
10797    pub relocation_reimbursement: Option<Currency>,
10798    #[doc = "The worker's signing bonus."]
10799    #[serde(default, skip_serializing_if = "Option::is_none")]
10800    pub signing_bonus: Option<Currency>,
10801    #[doc = "The worker's target annual bonus amount."]
10802    #[serde(default, skip_serializing_if = "Option::is_none")]
10803    pub target_annual_bonus: Option<Currency>,
10804    #[doc = "The worker's weekly compensation. This calculation assumes 40-hour work weeks for \
10805             workers with an hourly wage."]
10806    #[serde(default, skip_serializing_if = "Option::is_none")]
10807    pub weekly_compensation: Option<Currency>,
10808    #[doc = "The worker's target annual bonus as a percent of annual compensation."]
10809    #[serde(default, skip_serializing_if = "Option::is_none")]
10810    pub target_annual_bonus_percent: Option<f64>,
10811    #[doc = "The worker's bonus schedule."]
10812    #[serde(default, skip_serializing_if = "Option::is_none")]
10813    pub bonus_schedule: Option<String>,
10814    #[doc = "The payment type for an worker's compensation."]
10815    #[serde(default, skip_serializing_if = "Option::is_none")]
10816    pub payment_type: Option<String>,
10817    #[doc = "The payment terms for an worker's compensation."]
10818    #[serde(default, skip_serializing_if = "Option::is_none")]
10819    pub payment_terms: Option<String>,
10820}
10821
10822impl std::fmt::Display for GetCompensationsResponse {
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
10832#[cfg(feature = "tabled")]
10833impl tabled::Tabled for GetCompensationsResponse {
10834    const LENGTH: usize = 18;
10835    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10836        vec![
10837            if let Some(meta) = &self.meta {
10838                format!("{:?}", meta).into()
10839            } else {
10840                String::new().into()
10841            },
10842            self.id.clone().into(),
10843            self.created_at.clone().into(),
10844            self.updated_at.clone().into(),
10845            if let Some(worker_id) = &self.worker_id {
10846                format!("{:?}", worker_id).into()
10847            } else {
10848                String::new().into()
10849            },
10850            if let Some(annual_compensation) = &self.annual_compensation {
10851                format!("{:?}", annual_compensation).into()
10852            } else {
10853                String::new().into()
10854            },
10855            if let Some(annual_salary_equivalent) = &self.annual_salary_equivalent {
10856                format!("{:?}", annual_salary_equivalent).into()
10857            } else {
10858                String::new().into()
10859            },
10860            if let Some(hourly_wage) = &self.hourly_wage {
10861                format!("{:?}", hourly_wage).into()
10862            } else {
10863                String::new().into()
10864            },
10865            if let Some(monthly_compensation) = &self.monthly_compensation {
10866                format!("{:?}", monthly_compensation).into()
10867            } else {
10868                String::new().into()
10869            },
10870            if let Some(on_target_commission) = &self.on_target_commission {
10871                format!("{:?}", on_target_commission).into()
10872            } else {
10873                String::new().into()
10874            },
10875            if let Some(relocation_reimbursement) = &self.relocation_reimbursement {
10876                format!("{:?}", relocation_reimbursement).into()
10877            } else {
10878                String::new().into()
10879            },
10880            if let Some(signing_bonus) = &self.signing_bonus {
10881                format!("{:?}", signing_bonus).into()
10882            } else {
10883                String::new().into()
10884            },
10885            if let Some(target_annual_bonus) = &self.target_annual_bonus {
10886                format!("{:?}", target_annual_bonus).into()
10887            } else {
10888                String::new().into()
10889            },
10890            if let Some(weekly_compensation) = &self.weekly_compensation {
10891                format!("{:?}", weekly_compensation).into()
10892            } else {
10893                String::new().into()
10894            },
10895            if let Some(target_annual_bonus_percent) = &self.target_annual_bonus_percent {
10896                format!("{:?}", target_annual_bonus_percent).into()
10897            } else {
10898                String::new().into()
10899            },
10900            if let Some(bonus_schedule) = &self.bonus_schedule {
10901                format!("{:?}", bonus_schedule).into()
10902            } else {
10903                String::new().into()
10904            },
10905            if let Some(payment_type) = &self.payment_type {
10906                format!("{:?}", payment_type).into()
10907            } else {
10908                String::new().into()
10909            },
10910            if let Some(payment_terms) = &self.payment_terms {
10911                format!("{:?}", payment_terms).into()
10912            } else {
10913                String::new().into()
10914            },
10915        ]
10916    }
10917
10918    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10919        vec![
10920            "meta".into(),
10921            "id".into(),
10922            "created_at".into(),
10923            "updated_at".into(),
10924            "worker_id".into(),
10925            "annual_compensation".into(),
10926            "annual_salary_equivalent".into(),
10927            "hourly_wage".into(),
10928            "monthly_compensation".into(),
10929            "on_target_commission".into(),
10930            "relocation_reimbursement".into(),
10931            "signing_bonus".into(),
10932            "target_annual_bonus".into(),
10933            "weekly_compensation".into(),
10934            "target_annual_bonus_percent".into(),
10935            "bonus_schedule".into(),
10936            "payment_type".into(),
10937            "payment_terms".into(),
10938        ]
10939    }
10940}
10941
10942#[derive(
10943    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10944)]
10945pub struct ListCustomFieldsResponse {
10946    #[doc = "A list of redacted fields."]
10947    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
10948    pub meta: Option<RedactedFields>,
10949    pub results: Vec<CustomField>,
10950    #[doc = "A link to the next page of responses."]
10951    #[serde(default, skip_serializing_if = "Option::is_none")]
10952    pub next_link: Option<String>,
10953}
10954
10955impl std::fmt::Display for ListCustomFieldsResponse {
10956    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10957        write!(
10958            f,
10959            "{}",
10960            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10961        )
10962    }
10963}
10964
10965#[cfg(feature = "requests")]
10966impl crate::types::paginate::Pagination for ListCustomFieldsResponse {
10967    type Item = CustomField;
10968    fn has_more_pages(&self) -> bool {
10969        self.next_link.is_some()
10970    }
10971
10972    fn next_page_token(&self) -> Option<String> {
10973        self.next_link.clone()
10974    }
10975
10976    fn next_page(
10977        &self,
10978        req: reqwest::Request,
10979    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
10980        let mut req = req.try_clone().ok_or_else(|| {
10981            crate::types::error::Error::InvalidRequest(format!(
10982                "failed to clone request: {:?}",
10983                req
10984            ))
10985        })?;
10986        *req.url_mut() =
10987            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
10988                crate::types::error::Error::InvalidRequest(format!(
10989                    "failed to parse url: {:?}",
10990                    self.next_link
10991                ))
10992            })?;
10993        Ok(req)
10994    }
10995
10996    fn items(&self) -> Vec<Self::Item> {
10997        self.results.clone()
10998    }
10999}
11000
11001#[cfg(feature = "tabled")]
11002impl tabled::Tabled for ListCustomFieldsResponse {
11003    const LENGTH: usize = 3;
11004    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11005        vec![
11006            if let Some(meta) = &self.meta {
11007                format!("{:?}", meta).into()
11008            } else {
11009                String::new().into()
11010            },
11011            format!("{:?}", self.results).into(),
11012            if let Some(next_link) = &self.next_link {
11013                format!("{:?}", next_link).into()
11014            } else {
11015                String::new().into()
11016            },
11017        ]
11018    }
11019
11020    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11021        vec!["meta".into(), "results".into(), "next_link".into()]
11022    }
11023}
11024
11025#[derive(
11026    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11027)]
11028pub struct ListCustomObjectsResponse {
11029    pub results: Vec<CustomObject>,
11030    #[doc = "A link to the next page of responses."]
11031    #[serde(default, skip_serializing_if = "Option::is_none")]
11032    pub next_link: Option<String>,
11033}
11034
11035impl std::fmt::Display for ListCustomObjectsResponse {
11036    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11037        write!(
11038            f,
11039            "{}",
11040            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11041        )
11042    }
11043}
11044
11045#[cfg(feature = "requests")]
11046impl crate::types::paginate::Pagination for ListCustomObjectsResponse {
11047    type Item = CustomObject;
11048    fn has_more_pages(&self) -> bool {
11049        self.next_link.is_some()
11050    }
11051
11052    fn next_page_token(&self) -> Option<String> {
11053        self.next_link.clone()
11054    }
11055
11056    fn next_page(
11057        &self,
11058        req: reqwest::Request,
11059    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
11060        let mut req = req.try_clone().ok_or_else(|| {
11061            crate::types::error::Error::InvalidRequest(format!(
11062                "failed to clone request: {:?}",
11063                req
11064            ))
11065        })?;
11066        *req.url_mut() =
11067            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
11068                crate::types::error::Error::InvalidRequest(format!(
11069                    "failed to parse url: {:?}",
11070                    self.next_link
11071                ))
11072            })?;
11073        Ok(req)
11074    }
11075
11076    fn items(&self) -> Vec<Self::Item> {
11077        self.results.clone()
11078    }
11079}
11080
11081#[cfg(feature = "tabled")]
11082impl tabled::Tabled for ListCustomObjectsResponse {
11083    const LENGTH: usize = 2;
11084    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11085        vec![
11086            format!("{:?}", self.results).into(),
11087            if let Some(next_link) = &self.next_link {
11088                format!("{:?}", next_link).into()
11089            } else {
11090                String::new().into()
11091            },
11092        ]
11093    }
11094
11095    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11096        vec!["results".into(), "next_link".into()]
11097    }
11098}
11099
11100#[derive(
11101    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11102)]
11103pub struct CreateCustomObjectsRequestBody {
11104    #[serde(default, skip_serializing_if = "Option::is_none")]
11105    pub name: Option<String>,
11106    #[serde(default, skip_serializing_if = "Option::is_none")]
11107    pub description: Option<String>,
11108    #[serde(default, skip_serializing_if = "Option::is_none")]
11109    pub category: Option<String>,
11110}
11111
11112impl std::fmt::Display for CreateCustomObjectsRequestBody {
11113    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11114        write!(
11115            f,
11116            "{}",
11117            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11118        )
11119    }
11120}
11121
11122#[cfg(feature = "tabled")]
11123impl tabled::Tabled for CreateCustomObjectsRequestBody {
11124    const LENGTH: usize = 3;
11125    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11126        vec![
11127            if let Some(name) = &self.name {
11128                format!("{:?}", name).into()
11129            } else {
11130                String::new().into()
11131            },
11132            if let Some(description) = &self.description {
11133                format!("{:?}", description).into()
11134            } else {
11135                String::new().into()
11136            },
11137            if let Some(category) = &self.category {
11138                format!("{:?}", category).into()
11139            } else {
11140                String::new().into()
11141            },
11142        ]
11143    }
11144
11145    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11146        vec!["name".into(), "description".into(), "category".into()]
11147    }
11148}
11149
11150#[derive(
11151    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11152)]
11153pub struct UpdateCustomObjectsRequestBody {
11154    #[serde(default, skip_serializing_if = "Option::is_none")]
11155    pub name: Option<String>,
11156    #[serde(default, skip_serializing_if = "Option::is_none")]
11157    pub description: Option<String>,
11158    #[serde(default, skip_serializing_if = "Option::is_none")]
11159    pub category: Option<String>,
11160    #[serde(default, skip_serializing_if = "Option::is_none")]
11161    pub plural_label: Option<String>,
11162    #[serde(default, skip_serializing_if = "Option::is_none")]
11163    pub owner_role: Option<String>,
11164}
11165
11166impl std::fmt::Display for UpdateCustomObjectsRequestBody {
11167    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11168        write!(
11169            f,
11170            "{}",
11171            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11172        )
11173    }
11174}
11175
11176#[cfg(feature = "tabled")]
11177impl tabled::Tabled for UpdateCustomObjectsRequestBody {
11178    const LENGTH: usize = 5;
11179    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11180        vec![
11181            if let Some(name) = &self.name {
11182                format!("{:?}", name).into()
11183            } else {
11184                String::new().into()
11185            },
11186            if let Some(description) = &self.description {
11187                format!("{:?}", description).into()
11188            } else {
11189                String::new().into()
11190            },
11191            if let Some(category) = &self.category {
11192                format!("{:?}", category).into()
11193            } else {
11194                String::new().into()
11195            },
11196            if let Some(plural_label) = &self.plural_label {
11197                format!("{:?}", plural_label).into()
11198            } else {
11199                String::new().into()
11200            },
11201            if let Some(owner_role) = &self.owner_role {
11202                format!("{:?}", owner_role).into()
11203            } else {
11204                String::new().into()
11205            },
11206        ]
11207    }
11208
11209    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11210        vec![
11211            "name".into(),
11212            "description".into(),
11213            "category".into(),
11214            "plural_label".into(),
11215            "owner_role".into(),
11216        ]
11217    }
11218}
11219
11220#[derive(
11221    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11222)]
11223pub struct ListDepartmentsResponse {
11224    #[doc = "A list of redacted fields."]
11225    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11226    pub meta: Option<RedactedFields>,
11227    pub results: Vec<Department>,
11228    #[doc = "A link to the next page of responses."]
11229    #[serde(default, skip_serializing_if = "Option::is_none")]
11230    pub next_link: Option<String>,
11231}
11232
11233impl std::fmt::Display for ListDepartmentsResponse {
11234    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11235        write!(
11236            f,
11237            "{}",
11238            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11239        )
11240    }
11241}
11242
11243#[cfg(feature = "requests")]
11244impl crate::types::paginate::Pagination for ListDepartmentsResponse {
11245    type Item = Department;
11246    fn has_more_pages(&self) -> bool {
11247        self.next_link.is_some()
11248    }
11249
11250    fn next_page_token(&self) -> Option<String> {
11251        self.next_link.clone()
11252    }
11253
11254    fn next_page(
11255        &self,
11256        req: reqwest::Request,
11257    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
11258        let mut req = req.try_clone().ok_or_else(|| {
11259            crate::types::error::Error::InvalidRequest(format!(
11260                "failed to clone request: {:?}",
11261                req
11262            ))
11263        })?;
11264        *req.url_mut() =
11265            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
11266                crate::types::error::Error::InvalidRequest(format!(
11267                    "failed to parse url: {:?}",
11268                    self.next_link
11269                ))
11270            })?;
11271        Ok(req)
11272    }
11273
11274    fn items(&self) -> Vec<Self::Item> {
11275        self.results.clone()
11276    }
11277}
11278
11279#[cfg(feature = "tabled")]
11280impl tabled::Tabled for ListDepartmentsResponse {
11281    const LENGTH: usize = 3;
11282    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11283        vec![
11284            if let Some(meta) = &self.meta {
11285                format!("{:?}", meta).into()
11286            } else {
11287                String::new().into()
11288            },
11289            format!("{:?}", self.results).into(),
11290            if let Some(next_link) = &self.next_link {
11291                format!("{:?}", next_link).into()
11292            } else {
11293                String::new().into()
11294            },
11295        ]
11296    }
11297
11298    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11299        vec!["meta".into(), "results".into(), "next_link".into()]
11300    }
11301}
11302
11303#[derive(
11304    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11305)]
11306pub struct GetDepartmentsResponse {
11307    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11308    pub meta: Option<Meta>,
11309    #[doc = "Identifier field"]
11310    pub id: String,
11311    #[doc = "Record creation date"]
11312    pub created_at: String,
11313    #[doc = "Record update date"]
11314    pub updated_at: String,
11315    #[doc = "The name of the department."]
11316    pub name: String,
11317    #[doc = "The parent department."]
11318    #[serde(default, skip_serializing_if = "Option::is_none")]
11319    pub parent_id: Option<String>,
11320    #[doc = "The parent department.\n\nExpandable field"]
11321    #[serde(default, skip_serializing_if = "Option::is_none")]
11322    pub parent: Option<Department>,
11323    #[doc = "Reference code of the department."]
11324    #[serde(default, skip_serializing_if = "Option::is_none")]
11325    pub reference_code: Option<String>,
11326}
11327
11328impl std::fmt::Display for GetDepartmentsResponse {
11329    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11330        write!(
11331            f,
11332            "{}",
11333            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11334        )
11335    }
11336}
11337
11338#[cfg(feature = "tabled")]
11339impl tabled::Tabled for GetDepartmentsResponse {
11340    const LENGTH: usize = 8;
11341    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11342        vec![
11343            if let Some(meta) = &self.meta {
11344                format!("{:?}", meta).into()
11345            } else {
11346                String::new().into()
11347            },
11348            self.id.clone().into(),
11349            self.created_at.clone().into(),
11350            self.updated_at.clone().into(),
11351            self.name.clone().into(),
11352            if let Some(parent_id) = &self.parent_id {
11353                format!("{:?}", parent_id).into()
11354            } else {
11355                String::new().into()
11356            },
11357            if let Some(parent) = &self.parent {
11358                format!("{:?}", parent).into()
11359            } else {
11360                String::new().into()
11361            },
11362            if let Some(reference_code) = &self.reference_code {
11363                format!("{:?}", reference_code).into()
11364            } else {
11365                String::new().into()
11366            },
11367        ]
11368    }
11369
11370    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11371        vec![
11372            "meta".into(),
11373            "id".into(),
11374            "created_at".into(),
11375            "updated_at".into(),
11376            "name".into(),
11377            "parent_id".into(),
11378            "parent".into(),
11379            "reference_code".into(),
11380        ]
11381    }
11382}
11383
11384#[derive(
11385    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11386)]
11387pub struct ListEmploymentTypesResponse {
11388    #[doc = "A list of redacted fields."]
11389    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11390    pub meta: Option<RedactedFields>,
11391    pub results: Vec<CompanyEmploymentType>,
11392    #[doc = "A link to the next page of responses."]
11393    #[serde(default, skip_serializing_if = "Option::is_none")]
11394    pub next_link: Option<String>,
11395}
11396
11397impl std::fmt::Display for ListEmploymentTypesResponse {
11398    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11399        write!(
11400            f,
11401            "{}",
11402            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11403        )
11404    }
11405}
11406
11407#[cfg(feature = "requests")]
11408impl crate::types::paginate::Pagination for ListEmploymentTypesResponse {
11409    type Item = CompanyEmploymentType;
11410    fn has_more_pages(&self) -> bool {
11411        self.next_link.is_some()
11412    }
11413
11414    fn next_page_token(&self) -> Option<String> {
11415        self.next_link.clone()
11416    }
11417
11418    fn next_page(
11419        &self,
11420        req: reqwest::Request,
11421    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
11422        let mut req = req.try_clone().ok_or_else(|| {
11423            crate::types::error::Error::InvalidRequest(format!(
11424                "failed to clone request: {:?}",
11425                req
11426            ))
11427        })?;
11428        *req.url_mut() =
11429            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
11430                crate::types::error::Error::InvalidRequest(format!(
11431                    "failed to parse url: {:?}",
11432                    self.next_link
11433                ))
11434            })?;
11435        Ok(req)
11436    }
11437
11438    fn items(&self) -> Vec<Self::Item> {
11439        self.results.clone()
11440    }
11441}
11442
11443#[cfg(feature = "tabled")]
11444impl tabled::Tabled for ListEmploymentTypesResponse {
11445    const LENGTH: usize = 3;
11446    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11447        vec![
11448            if let Some(meta) = &self.meta {
11449                format!("{:?}", meta).into()
11450            } else {
11451                String::new().into()
11452            },
11453            format!("{:?}", self.results).into(),
11454            if let Some(next_link) = &self.next_link {
11455                format!("{:?}", next_link).into()
11456            } else {
11457                String::new().into()
11458            },
11459        ]
11460    }
11461
11462    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11463        vec!["meta".into(), "results".into(), "next_link".into()]
11464    }
11465}
11466
11467#[doc = "The classification of the worker by the company. * `CONTRACTOR`: Contractors are \
11468         self-employed workers who provide services on a short-term or per-project basis and are \
11469         not eligible for tax-withholding or benefits. * `EMPLOYEE`: Employees are hired and \
11470         managed by an employer, work under the employer's direct supervision and control, and are \
11471         protected by law for wages and employment rights."]
11472#[derive(
11473    serde :: Serialize,
11474    serde :: Deserialize,
11475    PartialEq,
11476    Hash,
11477    Debug,
11478    Clone,
11479    schemars :: JsonSchema,
11480    parse_display :: FromStr,
11481    parse_display :: Display,
11482)]
11483#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
11484#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
11485pub enum GetEmploymentTypesResponseType {
11486    #[serde(rename = "CONTRACTOR")]
11487    #[display("CONTRACTOR")]
11488    Contractor,
11489    #[serde(rename = "EMPLOYEE")]
11490    #[display("EMPLOYEE")]
11491    Employee,
11492}
11493
11494#[derive(
11495    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11496)]
11497pub struct GetEmploymentTypesResponse {
11498    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11499    pub meta: Option<Meta>,
11500    #[doc = "Identifier field"]
11501    pub id: String,
11502    #[doc = "Record creation date"]
11503    pub created_at: String,
11504    #[doc = "Record update date"]
11505    pub updated_at: String,
11506    #[doc = "The display label of the employment type."]
11507    pub label: String,
11508    #[doc = "The name of the employment type for non-custom employment types."]
11509    #[serde(default, skip_serializing_if = "Option::is_none")]
11510    pub name: Option<String>,
11511    #[doc = "The classification of the worker by the company. * `CONTRACTOR`: Contractors are \
11512             self-employed workers who provide services on a short-term or per-project basis and \
11513             are not eligible for tax-withholding or benefits. * `EMPLOYEE`: Employees are hired \
11514             and managed by an employer, work under the employer's direct supervision and \
11515             control, and are protected by law for wages and employment rights."]
11516    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
11517    pub type_: Option<GetEmploymentTypesResponseType>,
11518    #[doc = "The compensation period for the employment type. * `SALARIED`: Employees that are \
11519             paid a fixed amount per year. * `HOURLY`: Employees that are paid a wage per hour \
11520             worked."]
11521    #[serde(default, skip_serializing_if = "Option::is_none")]
11522    pub compensation_time_period: Option<CompensationTimePeriod>,
11523    #[doc = "The amount worked for the employment type. * `FULL-TIME`: Full-time is at least 30 \
11524             hours per week. Full-time workers will typically be eligible for benefits. * \
11525             `PART-TIME`: Part-time is less than 30 hours per week. These workers may be eligible \
11526             for benefits, depending on company settings and hours worked. * `TEMPORARY`: These \
11527             workers are hired on a temporary basis. You can specify how each worker with this \
11528             employment type will be paid individually."]
11529    #[serde(default, skip_serializing_if = "Option::is_none")]
11530    pub amount_worked: Option<AmountWorked>,
11531}
11532
11533impl std::fmt::Display for GetEmploymentTypesResponse {
11534    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11535        write!(
11536            f,
11537            "{}",
11538            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11539        )
11540    }
11541}
11542
11543#[cfg(feature = "tabled")]
11544impl tabled::Tabled for GetEmploymentTypesResponse {
11545    const LENGTH: usize = 9;
11546    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11547        vec![
11548            if let Some(meta) = &self.meta {
11549                format!("{:?}", meta).into()
11550            } else {
11551                String::new().into()
11552            },
11553            self.id.clone().into(),
11554            self.created_at.clone().into(),
11555            self.updated_at.clone().into(),
11556            self.label.clone().into(),
11557            if let Some(name) = &self.name {
11558                format!("{:?}", name).into()
11559            } else {
11560                String::new().into()
11561            },
11562            if let Some(type_) = &self.type_ {
11563                format!("{:?}", type_).into()
11564            } else {
11565                String::new().into()
11566            },
11567            if let Some(compensation_time_period) = &self.compensation_time_period {
11568                format!("{:?}", compensation_time_period).into()
11569            } else {
11570                String::new().into()
11571            },
11572            if let Some(amount_worked) = &self.amount_worked {
11573                format!("{:?}", amount_worked).into()
11574            } else {
11575                String::new().into()
11576            },
11577        ]
11578    }
11579
11580    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11581        vec![
11582            "meta".into(),
11583            "id".into(),
11584            "created_at".into(),
11585            "updated_at".into(),
11586            "label".into(),
11587            "name".into(),
11588            "type_".into(),
11589            "compensation_time_period".into(),
11590            "amount_worked".into(),
11591        ]
11592    }
11593}
11594
11595#[derive(
11596    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11597)]
11598pub struct ListEntitlementsResponse {
11599    #[doc = "A list of redacted fields."]
11600    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11601    pub meta: Option<RedactedFields>,
11602    pub results: Vec<EntitlementModel>,
11603    #[doc = "A link to the next page of responses."]
11604    #[serde(default, skip_serializing_if = "Option::is_none")]
11605    pub next_link: Option<String>,
11606}
11607
11608impl std::fmt::Display for ListEntitlementsResponse {
11609    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11610        write!(
11611            f,
11612            "{}",
11613            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11614        )
11615    }
11616}
11617
11618#[cfg(feature = "requests")]
11619impl crate::types::paginate::Pagination for ListEntitlementsResponse {
11620    type Item = EntitlementModel;
11621    fn has_more_pages(&self) -> bool {
11622        self.next_link.is_some()
11623    }
11624
11625    fn next_page_token(&self) -> Option<String> {
11626        self.next_link.clone()
11627    }
11628
11629    fn next_page(
11630        &self,
11631        req: reqwest::Request,
11632    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
11633        let mut req = req.try_clone().ok_or_else(|| {
11634            crate::types::error::Error::InvalidRequest(format!(
11635                "failed to clone request: {:?}",
11636                req
11637            ))
11638        })?;
11639        *req.url_mut() =
11640            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
11641                crate::types::error::Error::InvalidRequest(format!(
11642                    "failed to parse url: {:?}",
11643                    self.next_link
11644                ))
11645            })?;
11646        Ok(req)
11647    }
11648
11649    fn items(&self) -> Vec<Self::Item> {
11650        self.results.clone()
11651    }
11652}
11653
11654#[cfg(feature = "tabled")]
11655impl tabled::Tabled for ListEntitlementsResponse {
11656    const LENGTH: usize = 3;
11657    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11658        vec![
11659            if let Some(meta) = &self.meta {
11660                format!("{:?}", meta).into()
11661            } else {
11662                String::new().into()
11663            },
11664            format!("{:?}", self.results).into(),
11665            if let Some(next_link) = &self.next_link {
11666                format!("{:?}", next_link).into()
11667            } else {
11668                String::new().into()
11669            },
11670        ]
11671    }
11672
11673    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11674        vec!["meta".into(), "results".into(), "next_link".into()]
11675    }
11676}
11677
11678#[derive(
11679    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11680)]
11681pub struct ListJobCodesResponse {
11682    #[doc = "A list of redacted fields."]
11683    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11684    pub meta: Option<RedactedFields>,
11685    pub results: Vec<JobCode>,
11686    #[doc = "A link to the next page of responses."]
11687    #[serde(default, skip_serializing_if = "Option::is_none")]
11688    pub next_link: Option<String>,
11689}
11690
11691impl std::fmt::Display for ListJobCodesResponse {
11692    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11693        write!(
11694            f,
11695            "{}",
11696            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11697        )
11698    }
11699}
11700
11701#[cfg(feature = "requests")]
11702impl crate::types::paginate::Pagination for ListJobCodesResponse {
11703    type Item = JobCode;
11704    fn has_more_pages(&self) -> bool {
11705        self.next_link.is_some()
11706    }
11707
11708    fn next_page_token(&self) -> Option<String> {
11709        self.next_link.clone()
11710    }
11711
11712    fn next_page(
11713        &self,
11714        req: reqwest::Request,
11715    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
11716        let mut req = req.try_clone().ok_or_else(|| {
11717            crate::types::error::Error::InvalidRequest(format!(
11718                "failed to clone request: {:?}",
11719                req
11720            ))
11721        })?;
11722        *req.url_mut() =
11723            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
11724                crate::types::error::Error::InvalidRequest(format!(
11725                    "failed to parse url: {:?}",
11726                    self.next_link
11727                ))
11728            })?;
11729        Ok(req)
11730    }
11731
11732    fn items(&self) -> Vec<Self::Item> {
11733        self.results.clone()
11734    }
11735}
11736
11737#[cfg(feature = "tabled")]
11738impl tabled::Tabled for ListJobCodesResponse {
11739    const LENGTH: usize = 3;
11740    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11741        vec![
11742            if let Some(meta) = &self.meta {
11743                format!("{:?}", meta).into()
11744            } else {
11745                String::new().into()
11746            },
11747            format!("{:?}", self.results).into(),
11748            if let Some(next_link) = &self.next_link {
11749                format!("{:?}", next_link).into()
11750            } else {
11751                String::new().into()
11752            },
11753        ]
11754    }
11755
11756    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11757        vec!["meta".into(), "results".into(), "next_link".into()]
11758    }
11759}
11760
11761#[derive(
11762    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11763)]
11764pub struct GetJobCodesResponse {
11765    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11766    pub meta: Option<Meta>,
11767    #[doc = "Identifier field"]
11768    pub id: String,
11769    #[doc = "Record creation date"]
11770    pub created_at: String,
11771    #[doc = "Record update date"]
11772    pub updated_at: String,
11773    #[doc = "The name of the job dimension."]
11774    pub name: String,
11775    #[doc = "The ID of the job dimension this job code belongs to."]
11776    pub job_dimension_id: String,
11777    #[doc = "The job dimension this job code belongs to.\n\nExpandable field"]
11778    #[serde(default, skip_serializing_if = "Option::is_none")]
11779    pub job_dimension: Option<JobDimension>,
11780    #[doc = "The unique identifier of the job code in an outside system."]
11781    #[serde(default, skip_serializing_if = "Option::is_none")]
11782    pub external_id: Option<String>,
11783    #[doc = "The ID of the job roster group."]
11784    #[serde(default, skip_serializing_if = "Option::is_none")]
11785    pub group_id: Option<String>,
11786}
11787
11788impl std::fmt::Display for GetJobCodesResponse {
11789    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11790        write!(
11791            f,
11792            "{}",
11793            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11794        )
11795    }
11796}
11797
11798#[cfg(feature = "tabled")]
11799impl tabled::Tabled for GetJobCodesResponse {
11800    const LENGTH: usize = 9;
11801    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11802        vec![
11803            if let Some(meta) = &self.meta {
11804                format!("{:?}", meta).into()
11805            } else {
11806                String::new().into()
11807            },
11808            self.id.clone().into(),
11809            self.created_at.clone().into(),
11810            self.updated_at.clone().into(),
11811            self.name.clone().into(),
11812            self.job_dimension_id.clone().into(),
11813            if let Some(job_dimension) = &self.job_dimension {
11814                format!("{:?}", job_dimension).into()
11815            } else {
11816                String::new().into()
11817            },
11818            if let Some(external_id) = &self.external_id {
11819                format!("{:?}", external_id).into()
11820            } else {
11821                String::new().into()
11822            },
11823            if let Some(group_id) = &self.group_id {
11824                format!("{:?}", group_id).into()
11825            } else {
11826                String::new().into()
11827            },
11828        ]
11829    }
11830
11831    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11832        vec![
11833            "meta".into(),
11834            "id".into(),
11835            "created_at".into(),
11836            "updated_at".into(),
11837            "name".into(),
11838            "job_dimension_id".into(),
11839            "job_dimension".into(),
11840            "external_id".into(),
11841            "group_id".into(),
11842        ]
11843    }
11844}
11845
11846#[derive(
11847    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11848)]
11849pub struct ListJobDimensionsResponse {
11850    #[doc = "A list of redacted fields."]
11851    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11852    pub meta: Option<RedactedFields>,
11853    pub results: Vec<JobDimension>,
11854    #[doc = "A link to the next page of responses."]
11855    #[serde(default, skip_serializing_if = "Option::is_none")]
11856    pub next_link: Option<String>,
11857}
11858
11859impl std::fmt::Display for ListJobDimensionsResponse {
11860    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11861        write!(
11862            f,
11863            "{}",
11864            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11865        )
11866    }
11867}
11868
11869#[cfg(feature = "requests")]
11870impl crate::types::paginate::Pagination for ListJobDimensionsResponse {
11871    type Item = JobDimension;
11872    fn has_more_pages(&self) -> bool {
11873        self.next_link.is_some()
11874    }
11875
11876    fn next_page_token(&self) -> Option<String> {
11877        self.next_link.clone()
11878    }
11879
11880    fn next_page(
11881        &self,
11882        req: reqwest::Request,
11883    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
11884        let mut req = req.try_clone().ok_or_else(|| {
11885            crate::types::error::Error::InvalidRequest(format!(
11886                "failed to clone request: {:?}",
11887                req
11888            ))
11889        })?;
11890        *req.url_mut() =
11891            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
11892                crate::types::error::Error::InvalidRequest(format!(
11893                    "failed to parse url: {:?}",
11894                    self.next_link
11895                ))
11896            })?;
11897        Ok(req)
11898    }
11899
11900    fn items(&self) -> Vec<Self::Item> {
11901        self.results.clone()
11902    }
11903}
11904
11905#[cfg(feature = "tabled")]
11906impl tabled::Tabled for ListJobDimensionsResponse {
11907    const LENGTH: usize = 3;
11908    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11909        vec![
11910            if let Some(meta) = &self.meta {
11911                format!("{:?}", meta).into()
11912            } else {
11913                String::new().into()
11914            },
11915            format!("{:?}", self.results).into(),
11916            if let Some(next_link) = &self.next_link {
11917                format!("{:?}", next_link).into()
11918            } else {
11919                String::new().into()
11920            },
11921        ]
11922    }
11923
11924    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11925        vec!["meta".into(), "results".into(), "next_link".into()]
11926    }
11927}
11928
11929#[derive(
11930    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11931)]
11932pub struct GetJobDimensionsResponse {
11933    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11934    pub meta: Option<Meta>,
11935    #[doc = "Identifier field"]
11936    pub id: String,
11937    #[doc = "Record creation date"]
11938    pub created_at: String,
11939    #[doc = "Record update date"]
11940    pub updated_at: String,
11941    #[doc = "The name of the job dimension"]
11942    pub name: String,
11943    #[doc = "The unique identifier of the job dimension in a third party system"]
11944    #[serde(default, skip_serializing_if = "Option::is_none")]
11945    pub external_id: Option<String>,
11946}
11947
11948impl std::fmt::Display for GetJobDimensionsResponse {
11949    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11950        write!(
11951            f,
11952            "{}",
11953            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11954        )
11955    }
11956}
11957
11958#[cfg(feature = "tabled")]
11959impl tabled::Tabled for GetJobDimensionsResponse {
11960    const LENGTH: usize = 6;
11961    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11962        vec![
11963            if let Some(meta) = &self.meta {
11964                format!("{:?}", meta).into()
11965            } else {
11966                String::new().into()
11967            },
11968            self.id.clone().into(),
11969            self.created_at.clone().into(),
11970            self.updated_at.clone().into(),
11971            self.name.clone().into(),
11972            if let Some(external_id) = &self.external_id {
11973                format!("{:?}", external_id).into()
11974            } else {
11975                String::new().into()
11976            },
11977        ]
11978    }
11979
11980    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11981        vec![
11982            "meta".into(),
11983            "id".into(),
11984            "created_at".into(),
11985            "updated_at".into(),
11986            "name".into(),
11987            "external_id".into(),
11988        ]
11989    }
11990}
11991
11992#[derive(
11993    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11994)]
11995pub struct ListJobRequisitionsResponse {
11996    #[doc = "A list of redacted fields."]
11997    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11998    pub meta: Option<RedactedFields>,
11999    pub results: Vec<JobRequisition>,
12000    #[doc = "A link to the next page of responses."]
12001    #[serde(default, skip_serializing_if = "Option::is_none")]
12002    pub next_link: Option<String>,
12003}
12004
12005impl std::fmt::Display for ListJobRequisitionsResponse {
12006    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12007        write!(
12008            f,
12009            "{}",
12010            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12011        )
12012    }
12013}
12014
12015#[cfg(feature = "requests")]
12016impl crate::types::paginate::Pagination for ListJobRequisitionsResponse {
12017    type Item = JobRequisition;
12018    fn has_more_pages(&self) -> bool {
12019        self.next_link.is_some()
12020    }
12021
12022    fn next_page_token(&self) -> Option<String> {
12023        self.next_link.clone()
12024    }
12025
12026    fn next_page(
12027        &self,
12028        req: reqwest::Request,
12029    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
12030        let mut req = req.try_clone().ok_or_else(|| {
12031            crate::types::error::Error::InvalidRequest(format!(
12032                "failed to clone request: {:?}",
12033                req
12034            ))
12035        })?;
12036        *req.url_mut() =
12037            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
12038                crate::types::error::Error::InvalidRequest(format!(
12039                    "failed to parse url: {:?}",
12040                    self.next_link
12041                ))
12042            })?;
12043        Ok(req)
12044    }
12045
12046    fn items(&self) -> Vec<Self::Item> {
12047        self.results.clone()
12048    }
12049}
12050
12051#[cfg(feature = "tabled")]
12052impl tabled::Tabled for ListJobRequisitionsResponse {
12053    const LENGTH: usize = 3;
12054    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12055        vec![
12056            if let Some(meta) = &self.meta {
12057                format!("{:?}", meta).into()
12058            } else {
12059                String::new().into()
12060            },
12061            format!("{:?}", self.results).into(),
12062            if let Some(next_link) = &self.next_link {
12063                format!("{:?}", next_link).into()
12064            } else {
12065                String::new().into()
12066            },
12067        ]
12068    }
12069
12070    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12071        vec!["meta".into(), "results".into(), "next_link".into()]
12072    }
12073}
12074
12075#[derive(
12076    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12077)]
12078pub struct ListLeaveBalancesResponse {
12079    #[doc = "A list of redacted fields."]
12080    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12081    pub meta: Option<RedactedFields>,
12082    pub results: Vec<LeaveBalance>,
12083    #[doc = "A link to the next page of responses."]
12084    #[serde(default, skip_serializing_if = "Option::is_none")]
12085    pub next_link: Option<String>,
12086}
12087
12088impl std::fmt::Display for ListLeaveBalancesResponse {
12089    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12090        write!(
12091            f,
12092            "{}",
12093            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12094        )
12095    }
12096}
12097
12098#[cfg(feature = "requests")]
12099impl crate::types::paginate::Pagination for ListLeaveBalancesResponse {
12100    type Item = LeaveBalance;
12101    fn has_more_pages(&self) -> bool {
12102        self.next_link.is_some()
12103    }
12104
12105    fn next_page_token(&self) -> Option<String> {
12106        self.next_link.clone()
12107    }
12108
12109    fn next_page(
12110        &self,
12111        req: reqwest::Request,
12112    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
12113        let mut req = req.try_clone().ok_or_else(|| {
12114            crate::types::error::Error::InvalidRequest(format!(
12115                "failed to clone request: {:?}",
12116                req
12117            ))
12118        })?;
12119        *req.url_mut() =
12120            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
12121                crate::types::error::Error::InvalidRequest(format!(
12122                    "failed to parse url: {:?}",
12123                    self.next_link
12124                ))
12125            })?;
12126        Ok(req)
12127    }
12128
12129    fn items(&self) -> Vec<Self::Item> {
12130        self.results.clone()
12131    }
12132}
12133
12134#[cfg(feature = "tabled")]
12135impl tabled::Tabled for ListLeaveBalancesResponse {
12136    const LENGTH: usize = 3;
12137    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12138        vec![
12139            if let Some(meta) = &self.meta {
12140                format!("{:?}", meta).into()
12141            } else {
12142                String::new().into()
12143            },
12144            format!("{:?}", self.results).into(),
12145            if let Some(next_link) = &self.next_link {
12146                format!("{:?}", next_link).into()
12147            } else {
12148                String::new().into()
12149            },
12150        ]
12151    }
12152
12153    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12154        vec!["meta".into(), "results".into(), "next_link".into()]
12155    }
12156}
12157
12158#[derive(
12159    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12160)]
12161pub struct GetLeaveBalancesResponse {
12162    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12163    pub meta: Option<Meta>,
12164    #[doc = "Identifier field"]
12165    pub id: String,
12166    #[doc = "Record creation date"]
12167    pub created_at: String,
12168    #[doc = "Record update date"]
12169    pub updated_at: String,
12170    #[doc = "The ID of the worker associated with the leave balance."]
12171    pub worker_id: String,
12172    #[doc = "The worker associated with the leave balance.\n\nExpandable field"]
12173    #[serde(default, skip_serializing_if = "Option::is_none")]
12174    pub worker: Option<Worker>,
12175    #[doc = "The ID of the leave type associated with the leave balance."]
12176    #[serde(default, skip_serializing_if = "Option::is_none")]
12177    pub leave_type_id: Option<String>,
12178    #[doc = "The leave type associated with the leave balance.\n\nExpandable field"]
12179    #[serde(default, skip_serializing_if = "Option::is_none")]
12180    pub leave_type: Option<LeaveType>,
12181    #[doc = "Indicates if the leave balance is unlimited."]
12182    #[serde(default, skip_serializing_if = "Option::is_none")]
12183    pub is_balance_unlimited: Option<bool>,
12184    #[doc = "The worker's leave balance including future leave requests. If the leave balance is \
12185             unlimited, this field will be null."]
12186    #[serde(default, skip_serializing_if = "Option::is_none")]
12187    pub balance_including_future_requests: Option<f64>,
12188    #[doc = "The worker's leave balance excluding future leave requests. If the leave balance is \
12189             unlimited, this field will be null."]
12190    #[serde(default, skip_serializing_if = "Option::is_none")]
12191    pub balance_excluding_future_requests: Option<f64>,
12192}
12193
12194impl std::fmt::Display for GetLeaveBalancesResponse {
12195    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12196        write!(
12197            f,
12198            "{}",
12199            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12200        )
12201    }
12202}
12203
12204#[cfg(feature = "tabled")]
12205impl tabled::Tabled for GetLeaveBalancesResponse {
12206    const LENGTH: usize = 11;
12207    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12208        vec![
12209            if let Some(meta) = &self.meta {
12210                format!("{:?}", meta).into()
12211            } else {
12212                String::new().into()
12213            },
12214            self.id.clone().into(),
12215            self.created_at.clone().into(),
12216            self.updated_at.clone().into(),
12217            self.worker_id.clone().into(),
12218            if let Some(worker) = &self.worker {
12219                format!("{:?}", worker).into()
12220            } else {
12221                String::new().into()
12222            },
12223            if let Some(leave_type_id) = &self.leave_type_id {
12224                format!("{:?}", leave_type_id).into()
12225            } else {
12226                String::new().into()
12227            },
12228            if let Some(leave_type) = &self.leave_type {
12229                format!("{:?}", leave_type).into()
12230            } else {
12231                String::new().into()
12232            },
12233            if let Some(is_balance_unlimited) = &self.is_balance_unlimited {
12234                format!("{:?}", is_balance_unlimited).into()
12235            } else {
12236                String::new().into()
12237            },
12238            if let Some(balance_including_future_requests) = &self.balance_including_future_requests
12239            {
12240                format!("{:?}", balance_including_future_requests).into()
12241            } else {
12242                String::new().into()
12243            },
12244            if let Some(balance_excluding_future_requests) = &self.balance_excluding_future_requests
12245            {
12246                format!("{:?}", balance_excluding_future_requests).into()
12247            } else {
12248                String::new().into()
12249            },
12250        ]
12251    }
12252
12253    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12254        vec![
12255            "meta".into(),
12256            "id".into(),
12257            "created_at".into(),
12258            "updated_at".into(),
12259            "worker_id".into(),
12260            "worker".into(),
12261            "leave_type_id".into(),
12262            "leave_type".into(),
12263            "is_balance_unlimited".into(),
12264            "balance_including_future_requests".into(),
12265            "balance_excluding_future_requests".into(),
12266        ]
12267    }
12268}
12269
12270#[derive(
12271    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12272)]
12273pub struct ListLeaveRequestsResponse {
12274    #[doc = "A list of redacted fields."]
12275    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12276    pub meta: Option<RedactedFields>,
12277    pub results: Vec<LeaveRequest>,
12278    #[doc = "A link to the next page of responses."]
12279    #[serde(default, skip_serializing_if = "Option::is_none")]
12280    pub next_link: Option<String>,
12281}
12282
12283impl std::fmt::Display for ListLeaveRequestsResponse {
12284    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12285        write!(
12286            f,
12287            "{}",
12288            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12289        )
12290    }
12291}
12292
12293#[cfg(feature = "requests")]
12294impl crate::types::paginate::Pagination for ListLeaveRequestsResponse {
12295    type Item = LeaveRequest;
12296    fn has_more_pages(&self) -> bool {
12297        self.next_link.is_some()
12298    }
12299
12300    fn next_page_token(&self) -> Option<String> {
12301        self.next_link.clone()
12302    }
12303
12304    fn next_page(
12305        &self,
12306        req: reqwest::Request,
12307    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
12308        let mut req = req.try_clone().ok_or_else(|| {
12309            crate::types::error::Error::InvalidRequest(format!(
12310                "failed to clone request: {:?}",
12311                req
12312            ))
12313        })?;
12314        *req.url_mut() =
12315            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
12316                crate::types::error::Error::InvalidRequest(format!(
12317                    "failed to parse url: {:?}",
12318                    self.next_link
12319                ))
12320            })?;
12321        Ok(req)
12322    }
12323
12324    fn items(&self) -> Vec<Self::Item> {
12325        self.results.clone()
12326    }
12327}
12328
12329#[cfg(feature = "tabled")]
12330impl tabled::Tabled for ListLeaveRequestsResponse {
12331    const LENGTH: usize = 3;
12332    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12333        vec![
12334            if let Some(meta) = &self.meta {
12335                format!("{:?}", meta).into()
12336            } else {
12337                String::new().into()
12338            },
12339            format!("{:?}", self.results).into(),
12340            if let Some(next_link) = &self.next_link {
12341                format!("{:?}", next_link).into()
12342            } else {
12343                String::new().into()
12344            },
12345        ]
12346    }
12347
12348    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12349        vec!["meta".into(), "results".into(), "next_link".into()]
12350    }
12351}
12352
12353#[doc = "The status of the leave request."]
12354#[derive(
12355    serde :: Serialize,
12356    serde :: Deserialize,
12357    PartialEq,
12358    Hash,
12359    Debug,
12360    Clone,
12361    schemars :: JsonSchema,
12362    parse_display :: FromStr,
12363    parse_display :: Display,
12364)]
12365#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
12366#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
12367pub enum GetLeaveRequestsResponseStatus {
12368    #[serde(rename = "PENDING")]
12369    #[display("PENDING")]
12370    Pending,
12371    #[serde(rename = "APPROVED")]
12372    #[display("APPROVED")]
12373    Approved,
12374    #[serde(rename = "REJECTED")]
12375    #[display("REJECTED")]
12376    Rejected,
12377    #[serde(rename = "CANCELED")]
12378    #[display("CANCELED")]
12379    Canceled,
12380}
12381
12382#[derive(
12383    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12384)]
12385pub struct GetLeaveRequestsResponse {
12386    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12387    pub meta: Option<Meta>,
12388    #[doc = "Identifier field"]
12389    pub id: String,
12390    #[doc = "Record creation date"]
12391    pub created_at: String,
12392    #[doc = "Record update date"]
12393    pub updated_at: String,
12394    #[doc = "The ID of the worker associated with the leave request."]
12395    pub worker_id: String,
12396    #[doc = "The worker associated with the leave request.\n\nExpandable field"]
12397    #[serde(default, skip_serializing_if = "Option::is_none")]
12398    pub worker: Option<Worker>,
12399    #[doc = "The ID of the worker who requested the leave request."]
12400    #[serde(default, skip_serializing_if = "Option::is_none")]
12401    pub requester_id: Option<String>,
12402    #[doc = "The worker who requested the leave request.\n\nExpandable field"]
12403    #[serde(default, skip_serializing_if = "Option::is_none")]
12404    pub requester: Option<Worker>,
12405    #[doc = "The status of the leave request."]
12406    pub status: GetLeaveRequestsResponseStatus,
12407    #[doc = "The start date of the leave request."]
12408    pub start_date: String,
12409    #[doc = "The start time of the leave request."]
12410    #[serde(default, skip_serializing_if = "Option::is_none")]
12411    pub start_time: Option<String>,
12412    #[doc = "The end date of the leave request."]
12413    pub end_date: String,
12414    #[doc = "The end time of the leave request."]
12415    #[serde(default, skip_serializing_if = "Option::is_none")]
12416    pub end_time: Option<String>,
12417    #[doc = "The comments associated with the leave request."]
12418    #[serde(default, skip_serializing_if = "Option::is_none")]
12419    pub comments: Option<String>,
12420    #[doc = "The number of minutes requested for the leave request."]
12421    #[serde(default, skip_serializing_if = "Option::is_none")]
12422    pub number_of_minutes_requested: Option<f64>,
12423    #[doc = "The ID of the leave policy associated with the leave request."]
12424    pub leave_policy_id: String,
12425    #[doc = "The ID of the leave type associated with the leave request."]
12426    #[serde(default, skip_serializing_if = "Option::is_none")]
12427    pub leave_type_id: Option<String>,
12428    #[doc = "The leave type associated with the leave request.\n\nExpandable field"]
12429    #[serde(default, skip_serializing_if = "Option::is_none")]
12430    pub leave_type: Option<LeaveType>,
12431    #[doc = "The reason for the leave request."]
12432    #[serde(default, skip_serializing_if = "Option::is_none")]
12433    pub reason_for_leave: Option<String>,
12434    #[doc = "The ID of the worker who reviewed the leave request."]
12435    #[serde(default, skip_serializing_if = "Option::is_none")]
12436    pub reviewer_id: Option<String>,
12437    #[doc = "The worker who reviewed the leave request.\n\nExpandable field"]
12438    #[serde(default, skip_serializing_if = "Option::is_none")]
12439    pub reviewer: Option<Worker>,
12440    #[doc = "The timestamp the leave request was reviewed."]
12441    #[serde(default, skip_serializing_if = "Option::is_none")]
12442    pub reviewed_at: Option<String>,
12443    #[doc = "The specific dates taken off and the amount of time taken off for each one."]
12444    #[serde(default, skip_serializing_if = "Option::is_none")]
12445    pub days_take_off: Option<Vec<DayOff>>,
12446    #[doc = "Whether the leave request is managed by an external system."]
12447    #[serde(default, skip_serializing_if = "Option::is_none")]
12448    pub is_managed_by_external_system: Option<bool>,
12449}
12450
12451impl std::fmt::Display for GetLeaveRequestsResponse {
12452    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12453        write!(
12454            f,
12455            "{}",
12456            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12457        )
12458    }
12459}
12460
12461#[cfg(feature = "tabled")]
12462impl tabled::Tabled for GetLeaveRequestsResponse {
12463    const LENGTH: usize = 24;
12464    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12465        vec![
12466            if let Some(meta) = &self.meta {
12467                format!("{:?}", meta).into()
12468            } else {
12469                String::new().into()
12470            },
12471            self.id.clone().into(),
12472            self.created_at.clone().into(),
12473            self.updated_at.clone().into(),
12474            self.worker_id.clone().into(),
12475            if let Some(worker) = &self.worker {
12476                format!("{:?}", worker).into()
12477            } else {
12478                String::new().into()
12479            },
12480            if let Some(requester_id) = &self.requester_id {
12481                format!("{:?}", requester_id).into()
12482            } else {
12483                String::new().into()
12484            },
12485            if let Some(requester) = &self.requester {
12486                format!("{:?}", requester).into()
12487            } else {
12488                String::new().into()
12489            },
12490            format!("{:?}", self.status).into(),
12491            self.start_date.clone().into(),
12492            if let Some(start_time) = &self.start_time {
12493                format!("{:?}", start_time).into()
12494            } else {
12495                String::new().into()
12496            },
12497            self.end_date.clone().into(),
12498            if let Some(end_time) = &self.end_time {
12499                format!("{:?}", end_time).into()
12500            } else {
12501                String::new().into()
12502            },
12503            if let Some(comments) = &self.comments {
12504                format!("{:?}", comments).into()
12505            } else {
12506                String::new().into()
12507            },
12508            if let Some(number_of_minutes_requested) = &self.number_of_minutes_requested {
12509                format!("{:?}", number_of_minutes_requested).into()
12510            } else {
12511                String::new().into()
12512            },
12513            self.leave_policy_id.clone().into(),
12514            if let Some(leave_type_id) = &self.leave_type_id {
12515                format!("{:?}", leave_type_id).into()
12516            } else {
12517                String::new().into()
12518            },
12519            if let Some(leave_type) = &self.leave_type {
12520                format!("{:?}", leave_type).into()
12521            } else {
12522                String::new().into()
12523            },
12524            if let Some(reason_for_leave) = &self.reason_for_leave {
12525                format!("{:?}", reason_for_leave).into()
12526            } else {
12527                String::new().into()
12528            },
12529            if let Some(reviewer_id) = &self.reviewer_id {
12530                format!("{:?}", reviewer_id).into()
12531            } else {
12532                String::new().into()
12533            },
12534            if let Some(reviewer) = &self.reviewer {
12535                format!("{:?}", reviewer).into()
12536            } else {
12537                String::new().into()
12538            },
12539            if let Some(reviewed_at) = &self.reviewed_at {
12540                format!("{:?}", reviewed_at).into()
12541            } else {
12542                String::new().into()
12543            },
12544            if let Some(days_take_off) = &self.days_take_off {
12545                format!("{:?}", days_take_off).into()
12546            } else {
12547                String::new().into()
12548            },
12549            if let Some(is_managed_by_external_system) = &self.is_managed_by_external_system {
12550                format!("{:?}", is_managed_by_external_system).into()
12551            } else {
12552                String::new().into()
12553            },
12554        ]
12555    }
12556
12557    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12558        vec![
12559            "meta".into(),
12560            "id".into(),
12561            "created_at".into(),
12562            "updated_at".into(),
12563            "worker_id".into(),
12564            "worker".into(),
12565            "requester_id".into(),
12566            "requester".into(),
12567            "status".into(),
12568            "start_date".into(),
12569            "start_time".into(),
12570            "end_date".into(),
12571            "end_time".into(),
12572            "comments".into(),
12573            "number_of_minutes_requested".into(),
12574            "leave_policy_id".into(),
12575            "leave_type_id".into(),
12576            "leave_type".into(),
12577            "reason_for_leave".into(),
12578            "reviewer_id".into(),
12579            "reviewer".into(),
12580            "reviewed_at".into(),
12581            "days_take_off".into(),
12582            "is_managed_by_external_system".into(),
12583        ]
12584    }
12585}
12586
12587#[derive(
12588    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12589)]
12590pub struct ListLeaveTypesResponse {
12591    #[doc = "A list of redacted fields."]
12592    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12593    pub meta: Option<RedactedFields>,
12594    pub results: Vec<LeaveType>,
12595    #[doc = "A link to the next page of responses."]
12596    #[serde(default, skip_serializing_if = "Option::is_none")]
12597    pub next_link: Option<String>,
12598}
12599
12600impl std::fmt::Display for ListLeaveTypesResponse {
12601    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12602        write!(
12603            f,
12604            "{}",
12605            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12606        )
12607    }
12608}
12609
12610#[cfg(feature = "requests")]
12611impl crate::types::paginate::Pagination for ListLeaveTypesResponse {
12612    type Item = LeaveType;
12613    fn has_more_pages(&self) -> bool {
12614        self.next_link.is_some()
12615    }
12616
12617    fn next_page_token(&self) -> Option<String> {
12618        self.next_link.clone()
12619    }
12620
12621    fn next_page(
12622        &self,
12623        req: reqwest::Request,
12624    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
12625        let mut req = req.try_clone().ok_or_else(|| {
12626            crate::types::error::Error::InvalidRequest(format!(
12627                "failed to clone request: {:?}",
12628                req
12629            ))
12630        })?;
12631        *req.url_mut() =
12632            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
12633                crate::types::error::Error::InvalidRequest(format!(
12634                    "failed to parse url: {:?}",
12635                    self.next_link
12636                ))
12637            })?;
12638        Ok(req)
12639    }
12640
12641    fn items(&self) -> Vec<Self::Item> {
12642        self.results.clone()
12643    }
12644}
12645
12646#[cfg(feature = "tabled")]
12647impl tabled::Tabled for ListLeaveTypesResponse {
12648    const LENGTH: usize = 3;
12649    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12650        vec![
12651            if let Some(meta) = &self.meta {
12652                format!("{:?}", meta).into()
12653            } else {
12654                String::new().into()
12655            },
12656            format!("{:?}", self.results).into(),
12657            if let Some(next_link) = &self.next_link {
12658                format!("{:?}", next_link).into()
12659            } else {
12660                String::new().into()
12661            },
12662        ]
12663    }
12664
12665    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12666        vec!["meta".into(), "results".into(), "next_link".into()]
12667    }
12668}
12669
12670#[derive(
12671    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12672)]
12673pub struct GetLeaveTypesResponse {
12674    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12675    pub meta: Option<Meta>,
12676    #[doc = "Identifier field"]
12677    pub id: String,
12678    #[doc = "Record creation date"]
12679    pub created_at: String,
12680    #[doc = "Record update date"]
12681    pub updated_at: String,
12682    #[doc = "The type of leave."]
12683    #[serde(rename = "type")]
12684    pub type_: String,
12685    #[doc = "The name of the leave type."]
12686    pub name: String,
12687    #[doc = "The description of the leave type."]
12688    #[serde(default, skip_serializing_if = "Option::is_none")]
12689    pub description: Option<String>,
12690    #[doc = "Whether the leave is paid."]
12691    pub is_paid: bool,
12692    #[doc = "Whether the leave is managed by an external system."]
12693    pub is_managed_by_external_system: bool,
12694}
12695
12696impl std::fmt::Display for GetLeaveTypesResponse {
12697    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12698        write!(
12699            f,
12700            "{}",
12701            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12702        )
12703    }
12704}
12705
12706#[cfg(feature = "tabled")]
12707impl tabled::Tabled for GetLeaveTypesResponse {
12708    const LENGTH: usize = 9;
12709    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12710        vec![
12711            if let Some(meta) = &self.meta {
12712                format!("{:?}", meta).into()
12713            } else {
12714                String::new().into()
12715            },
12716            self.id.clone().into(),
12717            self.created_at.clone().into(),
12718            self.updated_at.clone().into(),
12719            self.type_.clone().into(),
12720            self.name.clone().into(),
12721            if let Some(description) = &self.description {
12722                format!("{:?}", description).into()
12723            } else {
12724                String::new().into()
12725            },
12726            format!("{:?}", self.is_paid).into(),
12727            format!("{:?}", self.is_managed_by_external_system).into(),
12728        ]
12729    }
12730
12731    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12732        vec![
12733            "meta".into(),
12734            "id".into(),
12735            "created_at".into(),
12736            "updated_at".into(),
12737            "type_".into(),
12738            "name".into(),
12739            "description".into(),
12740            "is_paid".into(),
12741            "is_managed_by_external_system".into(),
12742        ]
12743    }
12744}
12745
12746#[derive(
12747    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12748)]
12749pub struct ListLegalEntitiesResponse {
12750    #[doc = "A list of redacted fields."]
12751    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12752    pub meta: Option<RedactedFields>,
12753    pub results: Vec<LegalEntity>,
12754    #[doc = "A link to the next page of responses."]
12755    #[serde(default, skip_serializing_if = "Option::is_none")]
12756    pub next_link: Option<String>,
12757}
12758
12759impl std::fmt::Display for ListLegalEntitiesResponse {
12760    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12761        write!(
12762            f,
12763            "{}",
12764            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12765        )
12766    }
12767}
12768
12769#[cfg(feature = "requests")]
12770impl crate::types::paginate::Pagination for ListLegalEntitiesResponse {
12771    type Item = LegalEntity;
12772    fn has_more_pages(&self) -> bool {
12773        self.next_link.is_some()
12774    }
12775
12776    fn next_page_token(&self) -> Option<String> {
12777        self.next_link.clone()
12778    }
12779
12780    fn next_page(
12781        &self,
12782        req: reqwest::Request,
12783    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
12784        let mut req = req.try_clone().ok_or_else(|| {
12785            crate::types::error::Error::InvalidRequest(format!(
12786                "failed to clone request: {:?}",
12787                req
12788            ))
12789        })?;
12790        *req.url_mut() =
12791            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
12792                crate::types::error::Error::InvalidRequest(format!(
12793                    "failed to parse url: {:?}",
12794                    self.next_link
12795                ))
12796            })?;
12797        Ok(req)
12798    }
12799
12800    fn items(&self) -> Vec<Self::Item> {
12801        self.results.clone()
12802    }
12803}
12804
12805#[cfg(feature = "tabled")]
12806impl tabled::Tabled for ListLegalEntitiesResponse {
12807    const LENGTH: usize = 3;
12808    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12809        vec![
12810            if let Some(meta) = &self.meta {
12811                format!("{:?}", meta).into()
12812            } else {
12813                String::new().into()
12814            },
12815            format!("{:?}", self.results).into(),
12816            if let Some(next_link) = &self.next_link {
12817                format!("{:?}", next_link).into()
12818            } else {
12819                String::new().into()
12820            },
12821        ]
12822    }
12823
12824    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12825        vec!["meta".into(), "results".into(), "next_link".into()]
12826    }
12827}
12828
12829#[derive(
12830    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12831)]
12832pub struct GetLegalEntitiesResponse {
12833    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12834    pub meta: Option<Meta>,
12835    #[doc = "Identifier field"]
12836    pub id: String,
12837    #[doc = "Record creation date"]
12838    pub created_at: String,
12839    #[doc = "Record update date"]
12840    pub updated_at: String,
12841    #[doc = "The tax identifier for the legal entity."]
12842    #[serde(default, skip_serializing_if = "Option::is_none")]
12843    pub tax_identifier: Option<String>,
12844    #[doc = "The country the legal entity is based in."]
12845    #[serde(default, skip_serializing_if = "Option::is_none")]
12846    pub country: Option<Country>,
12847    #[doc = "The legal name of the legal entity."]
12848    #[serde(default, skip_serializing_if = "Option::is_none")]
12849    pub legal_name: Option<String>,
12850    #[doc = "The legal entity's level in a hierarchy. * `PARENT`: The legal entity is considered \
12851             the ultimate holding entity. * `SUBSIDIARY`: The legal entity is considered a \
12852             subsidiary, fully or partially held by another. * `BRANCH`: The legal entity is \
12853             considered a branch, associated with a parent legal entity."]
12854    #[serde(default, skip_serializing_if = "Option::is_none")]
12855    pub entity_level: Option<EntityLevel>,
12856    #[doc = "The registration date of the entity."]
12857    #[serde(default, skip_serializing_if = "Option::is_none")]
12858    pub registration_date: Option<String>,
12859    #[doc = "The mailing address of the legal entity."]
12860    #[serde(default, skip_serializing_if = "Option::is_none")]
12861    pub mailing_address: Option<Address>,
12862    #[doc = "The physical address of the legal entity, if it differs from the mailing address."]
12863    #[serde(default, skip_serializing_if = "Option::is_none")]
12864    pub physical_address: Option<Address>,
12865    #[doc = "The parent legal entity."]
12866    #[serde(default, skip_serializing_if = "Option::is_none")]
12867    pub parent_id: Option<String>,
12868    #[doc = "The parent legal entity.\n\nExpandable field"]
12869    #[serde(default, skip_serializing_if = "Option::is_none")]
12870    pub parent: Option<LegalEntity>,
12871    #[doc = "The legal entity management type in the case of an employer of record (EOR) or \
12872             professional employment organization (PEO). * `PEO`: The legal entity is considered \
12873             a Professional Employment Organization (PEO). * `EOR`: The legal entity is \
12874             considered an Employer of Record (EOR)."]
12875    #[serde(default, skip_serializing_if = "Option::is_none")]
12876    pub management_type: Option<ManagementType>,
12877    #[doc = "The company or organization associated with the legal entity"]
12878    #[serde(default, skip_serializing_if = "Option::is_none")]
12879    pub company_id: Option<String>,
12880    #[doc = "The company or organization associated with the legal entity\n\nExpandable field"]
12881    #[serde(default, skip_serializing_if = "Option::is_none")]
12882    pub company: Option<Company>,
12883}
12884
12885impl std::fmt::Display for GetLegalEntitiesResponse {
12886    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12887        write!(
12888            f,
12889            "{}",
12890            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12891        )
12892    }
12893}
12894
12895#[cfg(feature = "tabled")]
12896impl tabled::Tabled for GetLegalEntitiesResponse {
12897    const LENGTH: usize = 16;
12898    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12899        vec![
12900            if let Some(meta) = &self.meta {
12901                format!("{:?}", meta).into()
12902            } else {
12903                String::new().into()
12904            },
12905            self.id.clone().into(),
12906            self.created_at.clone().into(),
12907            self.updated_at.clone().into(),
12908            if let Some(tax_identifier) = &self.tax_identifier {
12909                format!("{:?}", tax_identifier).into()
12910            } else {
12911                String::new().into()
12912            },
12913            if let Some(country) = &self.country {
12914                format!("{:?}", country).into()
12915            } else {
12916                String::new().into()
12917            },
12918            if let Some(legal_name) = &self.legal_name {
12919                format!("{:?}", legal_name).into()
12920            } else {
12921                String::new().into()
12922            },
12923            if let Some(entity_level) = &self.entity_level {
12924                format!("{:?}", entity_level).into()
12925            } else {
12926                String::new().into()
12927            },
12928            if let Some(registration_date) = &self.registration_date {
12929                format!("{:?}", registration_date).into()
12930            } else {
12931                String::new().into()
12932            },
12933            if let Some(mailing_address) = &self.mailing_address {
12934                format!("{:?}", mailing_address).into()
12935            } else {
12936                String::new().into()
12937            },
12938            if let Some(physical_address) = &self.physical_address {
12939                format!("{:?}", physical_address).into()
12940            } else {
12941                String::new().into()
12942            },
12943            if let Some(parent_id) = &self.parent_id {
12944                format!("{:?}", parent_id).into()
12945            } else {
12946                String::new().into()
12947            },
12948            if let Some(parent) = &self.parent {
12949                format!("{:?}", parent).into()
12950            } else {
12951                String::new().into()
12952            },
12953            if let Some(management_type) = &self.management_type {
12954                format!("{:?}", management_type).into()
12955            } else {
12956                String::new().into()
12957            },
12958            if let Some(company_id) = &self.company_id {
12959                format!("{:?}", company_id).into()
12960            } else {
12961                String::new().into()
12962            },
12963            if let Some(company) = &self.company {
12964                format!("{:?}", company).into()
12965            } else {
12966                String::new().into()
12967            },
12968        ]
12969    }
12970
12971    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12972        vec![
12973            "meta".into(),
12974            "id".into(),
12975            "created_at".into(),
12976            "updated_at".into(),
12977            "tax_identifier".into(),
12978            "country".into(),
12979            "legal_name".into(),
12980            "entity_level".into(),
12981            "registration_date".into(),
12982            "mailing_address".into(),
12983            "physical_address".into(),
12984            "parent_id".into(),
12985            "parent".into(),
12986            "management_type".into(),
12987            "company_id".into(),
12988            "company".into(),
12989        ]
12990    }
12991}
12992
12993#[derive(
12994    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12995)]
12996pub struct ListLevelsResponse {
12997    #[doc = "A list of redacted fields."]
12998    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12999    pub meta: Option<RedactedFields>,
13000    pub results: Vec<Level>,
13001    #[doc = "A link to the next page of responses."]
13002    #[serde(default, skip_serializing_if = "Option::is_none")]
13003    pub next_link: Option<String>,
13004}
13005
13006impl std::fmt::Display for ListLevelsResponse {
13007    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13008        write!(
13009            f,
13010            "{}",
13011            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13012        )
13013    }
13014}
13015
13016#[cfg(feature = "requests")]
13017impl crate::types::paginate::Pagination for ListLevelsResponse {
13018    type Item = Level;
13019    fn has_more_pages(&self) -> bool {
13020        self.next_link.is_some()
13021    }
13022
13023    fn next_page_token(&self) -> Option<String> {
13024        self.next_link.clone()
13025    }
13026
13027    fn next_page(
13028        &self,
13029        req: reqwest::Request,
13030    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
13031        let mut req = req.try_clone().ok_or_else(|| {
13032            crate::types::error::Error::InvalidRequest(format!(
13033                "failed to clone request: {:?}",
13034                req
13035            ))
13036        })?;
13037        *req.url_mut() =
13038            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
13039                crate::types::error::Error::InvalidRequest(format!(
13040                    "failed to parse url: {:?}",
13041                    self.next_link
13042                ))
13043            })?;
13044        Ok(req)
13045    }
13046
13047    fn items(&self) -> Vec<Self::Item> {
13048        self.results.clone()
13049    }
13050}
13051
13052#[cfg(feature = "tabled")]
13053impl tabled::Tabled for ListLevelsResponse {
13054    const LENGTH: usize = 3;
13055    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13056        vec![
13057            if let Some(meta) = &self.meta {
13058                format!("{:?}", meta).into()
13059            } else {
13060                String::new().into()
13061            },
13062            format!("{:?}", self.results).into(),
13063            if let Some(next_link) = &self.next_link {
13064                format!("{:?}", next_link).into()
13065            } else {
13066                String::new().into()
13067            },
13068        ]
13069    }
13070
13071    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13072        vec!["meta".into(), "results".into(), "next_link".into()]
13073    }
13074}
13075
13076#[derive(
13077    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13078)]
13079pub struct GetLevelsResponse {
13080    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13081    pub meta: Option<Meta>,
13082    #[doc = "Identifier field"]
13083    pub id: String,
13084    #[doc = "Record creation date"]
13085    pub created_at: String,
13086    #[doc = "Record update date"]
13087    pub updated_at: String,
13088    #[doc = "The name of the level. Must be unique within the company or organization."]
13089    pub name: String,
13090    #[doc = "The parent level."]
13091    #[serde(default, skip_serializing_if = "Option::is_none")]
13092    pub parent_id: Option<String>,
13093    #[doc = "The parent level.\n\nExpandable field"]
13094    #[serde(default, skip_serializing_if = "Option::is_none")]
13095    pub parent: Option<Level>,
13096    #[doc = "Global level is used to track the seniority of levels. The higher up a level is \
13097             placed on the page, the more senior and higher-ranked the level. Global level is \
13098             used in workflows, policies, and reports that use the level attribute (e.g., you can \
13099             use Level Lookup to set up a workflow that notifies the nearest person in an \
13100             worker's management chain at or above the specified level)."]
13101    #[serde(default, skip_serializing_if = "Option::is_none")]
13102    pub global_level: Option<i64>,
13103    #[doc = "The description of the level."]
13104    #[serde(default, skip_serializing_if = "Option::is_none")]
13105    pub description: Option<String>,
13106    #[doc = "The rank of the level within its track."]
13107    #[serde(default, skip_serializing_if = "Option::is_none")]
13108    pub rank: Option<i64>,
13109    #[doc = "The track associated with the level, if it's not a global level."]
13110    #[serde(default, skip_serializing_if = "Option::is_none")]
13111    pub track_id: Option<String>,
13112    #[doc = "The track associated with the level, if it's not a global level.\n\nExpandable field"]
13113    #[serde(default, skip_serializing_if = "Option::is_none")]
13114    pub track: Option<Track>,
13115}
13116
13117impl std::fmt::Display for GetLevelsResponse {
13118    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13119        write!(
13120            f,
13121            "{}",
13122            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13123        )
13124    }
13125}
13126
13127#[cfg(feature = "tabled")]
13128impl tabled::Tabled for GetLevelsResponse {
13129    const LENGTH: usize = 12;
13130    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13131        vec![
13132            if let Some(meta) = &self.meta {
13133                format!("{:?}", meta).into()
13134            } else {
13135                String::new().into()
13136            },
13137            self.id.clone().into(),
13138            self.created_at.clone().into(),
13139            self.updated_at.clone().into(),
13140            self.name.clone().into(),
13141            if let Some(parent_id) = &self.parent_id {
13142                format!("{:?}", parent_id).into()
13143            } else {
13144                String::new().into()
13145            },
13146            if let Some(parent) = &self.parent {
13147                format!("{:?}", parent).into()
13148            } else {
13149                String::new().into()
13150            },
13151            if let Some(global_level) = &self.global_level {
13152                format!("{:?}", global_level).into()
13153            } else {
13154                String::new().into()
13155            },
13156            if let Some(description) = &self.description {
13157                format!("{:?}", description).into()
13158            } else {
13159                String::new().into()
13160            },
13161            if let Some(rank) = &self.rank {
13162                format!("{:?}", rank).into()
13163            } else {
13164                String::new().into()
13165            },
13166            if let Some(track_id) = &self.track_id {
13167                format!("{:?}", track_id).into()
13168            } else {
13169                String::new().into()
13170            },
13171            if let Some(track) = &self.track {
13172                format!("{:?}", track).into()
13173            } else {
13174                String::new().into()
13175            },
13176        ]
13177    }
13178
13179    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13180        vec![
13181            "meta".into(),
13182            "id".into(),
13183            "created_at".into(),
13184            "updated_at".into(),
13185            "name".into(),
13186            "parent_id".into(),
13187            "parent".into(),
13188            "global_level".into(),
13189            "description".into(),
13190            "rank".into(),
13191            "track_id".into(),
13192            "track".into(),
13193        ]
13194    }
13195}
13196
13197#[derive(
13198    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13199)]
13200pub struct ListObjectCategoriesResponse {
13201    pub results: Vec<ObjectCategory>,
13202    #[doc = "A link to the next page of responses."]
13203    #[serde(default, skip_serializing_if = "Option::is_none")]
13204    pub next_link: Option<String>,
13205}
13206
13207impl std::fmt::Display for ListObjectCategoriesResponse {
13208    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13209        write!(
13210            f,
13211            "{}",
13212            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13213        )
13214    }
13215}
13216
13217#[cfg(feature = "requests")]
13218impl crate::types::paginate::Pagination for ListObjectCategoriesResponse {
13219    type Item = ObjectCategory;
13220    fn has_more_pages(&self) -> bool {
13221        self.next_link.is_some()
13222    }
13223
13224    fn next_page_token(&self) -> Option<String> {
13225        self.next_link.clone()
13226    }
13227
13228    fn next_page(
13229        &self,
13230        req: reqwest::Request,
13231    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
13232        let mut req = req.try_clone().ok_or_else(|| {
13233            crate::types::error::Error::InvalidRequest(format!(
13234                "failed to clone request: {:?}",
13235                req
13236            ))
13237        })?;
13238        *req.url_mut() =
13239            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
13240                crate::types::error::Error::InvalidRequest(format!(
13241                    "failed to parse url: {:?}",
13242                    self.next_link
13243                ))
13244            })?;
13245        Ok(req)
13246    }
13247
13248    fn items(&self) -> Vec<Self::Item> {
13249        self.results.clone()
13250    }
13251}
13252
13253#[cfg(feature = "tabled")]
13254impl tabled::Tabled for ListObjectCategoriesResponse {
13255    const LENGTH: usize = 2;
13256    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13257        vec![
13258            format!("{:?}", self.results).into(),
13259            if let Some(next_link) = &self.next_link {
13260                format!("{:?}", next_link).into()
13261            } else {
13262                String::new().into()
13263            },
13264        ]
13265    }
13266
13267    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13268        vec!["results".into(), "next_link".into()]
13269    }
13270}
13271
13272#[derive(
13273    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13274)]
13275pub struct CreateObjectCategoriesRequestBody {
13276    #[serde(default, skip_serializing_if = "Option::is_none")]
13277    pub name: Option<String>,
13278    #[serde(default, skip_serializing_if = "Option::is_none")]
13279    pub description: Option<String>,
13280}
13281
13282impl std::fmt::Display for CreateObjectCategoriesRequestBody {
13283    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13284        write!(
13285            f,
13286            "{}",
13287            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13288        )
13289    }
13290}
13291
13292#[cfg(feature = "tabled")]
13293impl tabled::Tabled for CreateObjectCategoriesRequestBody {
13294    const LENGTH: usize = 2;
13295    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13296        vec![
13297            if let Some(name) = &self.name {
13298                format!("{:?}", name).into()
13299            } else {
13300                String::new().into()
13301            },
13302            if let Some(description) = &self.description {
13303                format!("{:?}", description).into()
13304            } else {
13305                String::new().into()
13306            },
13307        ]
13308    }
13309
13310    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13311        vec!["name".into(), "description".into()]
13312    }
13313}
13314
13315#[derive(
13316    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13317)]
13318pub struct UpdateObjectCategoriesRequestBody {
13319    #[serde(default, skip_serializing_if = "Option::is_none")]
13320    pub name: Option<String>,
13321    #[serde(default, skip_serializing_if = "Option::is_none")]
13322    pub description: Option<String>,
13323}
13324
13325impl std::fmt::Display for UpdateObjectCategoriesRequestBody {
13326    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13327        write!(
13328            f,
13329            "{}",
13330            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13331        )
13332    }
13333}
13334
13335#[cfg(feature = "tabled")]
13336impl tabled::Tabled for UpdateObjectCategoriesRequestBody {
13337    const LENGTH: usize = 2;
13338    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13339        vec![
13340            if let Some(name) = &self.name {
13341                format!("{:?}", name).into()
13342            } else {
13343                String::new().into()
13344            },
13345            if let Some(description) = &self.description {
13346                format!("{:?}", description).into()
13347            } else {
13348                String::new().into()
13349            },
13350        ]
13351    }
13352
13353    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13354        vec!["name".into(), "description".into()]
13355    }
13356}
13357
13358#[derive(
13359    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13360)]
13361pub struct ListShiftInputsResponse {
13362    #[doc = "A list of redacted fields."]
13363    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13364    pub meta: Option<RedactedFields>,
13365    pub results: Vec<ShiftInput>,
13366    #[doc = "A link to the next page of responses."]
13367    #[serde(default, skip_serializing_if = "Option::is_none")]
13368    pub next_link: Option<String>,
13369}
13370
13371impl std::fmt::Display for ListShiftInputsResponse {
13372    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13373        write!(
13374            f,
13375            "{}",
13376            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13377        )
13378    }
13379}
13380
13381#[cfg(feature = "requests")]
13382impl crate::types::paginate::Pagination for ListShiftInputsResponse {
13383    type Item = ShiftInput;
13384    fn has_more_pages(&self) -> bool {
13385        self.next_link.is_some()
13386    }
13387
13388    fn next_page_token(&self) -> Option<String> {
13389        self.next_link.clone()
13390    }
13391
13392    fn next_page(
13393        &self,
13394        req: reqwest::Request,
13395    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
13396        let mut req = req.try_clone().ok_or_else(|| {
13397            crate::types::error::Error::InvalidRequest(format!(
13398                "failed to clone request: {:?}",
13399                req
13400            ))
13401        })?;
13402        *req.url_mut() =
13403            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
13404                crate::types::error::Error::InvalidRequest(format!(
13405                    "failed to parse url: {:?}",
13406                    self.next_link
13407                ))
13408            })?;
13409        Ok(req)
13410    }
13411
13412    fn items(&self) -> Vec<Self::Item> {
13413        self.results.clone()
13414    }
13415}
13416
13417#[cfg(feature = "tabled")]
13418impl tabled::Tabled for ListShiftInputsResponse {
13419    const LENGTH: usize = 3;
13420    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13421        vec![
13422            if let Some(meta) = &self.meta {
13423                format!("{:?}", meta).into()
13424            } else {
13425                String::new().into()
13426            },
13427            format!("{:?}", self.results).into(),
13428            if let Some(next_link) = &self.next_link {
13429                format!("{:?}", next_link).into()
13430            } else {
13431                String::new().into()
13432            },
13433        ]
13434    }
13435
13436    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13437        vec!["meta".into(), "results".into(), "next_link".into()]
13438    }
13439}
13440
13441#[derive(
13442    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13443)]
13444pub struct GetShiftInputsResponse {
13445    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13446    pub meta: Option<Meta>,
13447    #[doc = "Identifier field"]
13448    pub id: String,
13449    #[doc = "Record creation date"]
13450    pub created_at: String,
13451    #[doc = "Record update date"]
13452    pub updated_at: String,
13453    #[doc = "The creator id associated with the shift input."]
13454    #[serde(default, skip_serializing_if = "Option::is_none")]
13455    pub creator_id: Option<String>,
13456    #[doc = "The creator associated with the shift input.\n\nExpandable field"]
13457    #[serde(default, skip_serializing_if = "Option::is_none")]
13458    pub creator: Option<Worker>,
13459    #[doc = "Name of the shift unit."]
13460    pub name: String,
13461    #[doc = "Prompt for the shift unit."]
13462    pub prompt: String,
13463    #[doc = "Type of shift unit."]
13464    #[serde(rename = "type")]
13465    pub type_: String,
13466    #[doc = "Two letter string designating country code which the shift input is associated."]
13467    pub country_code: String,
13468    #[doc = "The party that manages this shift input"]
13469    #[serde(default, skip_serializing_if = "Option::is_none")]
13470    pub managed_by: Option<String>,
13471}
13472
13473impl std::fmt::Display for GetShiftInputsResponse {
13474    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13475        write!(
13476            f,
13477            "{}",
13478            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13479        )
13480    }
13481}
13482
13483#[cfg(feature = "tabled")]
13484impl tabled::Tabled for GetShiftInputsResponse {
13485    const LENGTH: usize = 11;
13486    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13487        vec![
13488            if let Some(meta) = &self.meta {
13489                format!("{:?}", meta).into()
13490            } else {
13491                String::new().into()
13492            },
13493            self.id.clone().into(),
13494            self.created_at.clone().into(),
13495            self.updated_at.clone().into(),
13496            if let Some(creator_id) = &self.creator_id {
13497                format!("{:?}", creator_id).into()
13498            } else {
13499                String::new().into()
13500            },
13501            if let Some(creator) = &self.creator {
13502                format!("{:?}", creator).into()
13503            } else {
13504                String::new().into()
13505            },
13506            self.name.clone().into(),
13507            self.prompt.clone().into(),
13508            self.type_.clone().into(),
13509            self.country_code.clone().into(),
13510            if let Some(managed_by) = &self.managed_by {
13511                format!("{:?}", managed_by).into()
13512            } else {
13513                String::new().into()
13514            },
13515        ]
13516    }
13517
13518    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13519        vec![
13520            "meta".into(),
13521            "id".into(),
13522            "created_at".into(),
13523            "updated_at".into(),
13524            "creator_id".into(),
13525            "creator".into(),
13526            "name".into(),
13527            "prompt".into(),
13528            "type_".into(),
13529            "country_code".into(),
13530            "managed_by".into(),
13531        ]
13532    }
13533}
13534
13535#[derive(
13536    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13537)]
13538pub struct ListTeamsResponse {
13539    #[doc = "A list of redacted fields."]
13540    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13541    pub meta: Option<RedactedFields>,
13542    pub results: Vec<Team>,
13543    #[doc = "A link to the next page of responses."]
13544    #[serde(default, skip_serializing_if = "Option::is_none")]
13545    pub next_link: Option<String>,
13546}
13547
13548impl std::fmt::Display for ListTeamsResponse {
13549    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13550        write!(
13551            f,
13552            "{}",
13553            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13554        )
13555    }
13556}
13557
13558#[cfg(feature = "requests")]
13559impl crate::types::paginate::Pagination for ListTeamsResponse {
13560    type Item = Team;
13561    fn has_more_pages(&self) -> bool {
13562        self.next_link.is_some()
13563    }
13564
13565    fn next_page_token(&self) -> Option<String> {
13566        self.next_link.clone()
13567    }
13568
13569    fn next_page(
13570        &self,
13571        req: reqwest::Request,
13572    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
13573        let mut req = req.try_clone().ok_or_else(|| {
13574            crate::types::error::Error::InvalidRequest(format!(
13575                "failed to clone request: {:?}",
13576                req
13577            ))
13578        })?;
13579        *req.url_mut() =
13580            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
13581                crate::types::error::Error::InvalidRequest(format!(
13582                    "failed to parse url: {:?}",
13583                    self.next_link
13584                ))
13585            })?;
13586        Ok(req)
13587    }
13588
13589    fn items(&self) -> Vec<Self::Item> {
13590        self.results.clone()
13591    }
13592}
13593
13594#[cfg(feature = "tabled")]
13595impl tabled::Tabled for ListTeamsResponse {
13596    const LENGTH: usize = 3;
13597    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13598        vec![
13599            if let Some(meta) = &self.meta {
13600                format!("{:?}", meta).into()
13601            } else {
13602                String::new().into()
13603            },
13604            format!("{:?}", self.results).into(),
13605            if let Some(next_link) = &self.next_link {
13606                format!("{:?}", next_link).into()
13607            } else {
13608                String::new().into()
13609            },
13610        ]
13611    }
13612
13613    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13614        vec!["meta".into(), "results".into(), "next_link".into()]
13615    }
13616}
13617
13618#[derive(
13619    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13620)]
13621pub struct GetTeamsResponse {
13622    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13623    pub meta: Option<Meta>,
13624    #[doc = "Identifier field"]
13625    pub id: String,
13626    #[doc = "Record creation date"]
13627    pub created_at: String,
13628    #[doc = "Record update date"]
13629    pub updated_at: String,
13630    #[doc = "The parent team"]
13631    #[serde(default, skip_serializing_if = "Option::is_none")]
13632    pub parent_id: Option<String>,
13633    #[doc = "The parent team\n\nExpandable field"]
13634    #[serde(default, skip_serializing_if = "Option::is_none")]
13635    pub parent: Option<Team>,
13636    #[doc = "The name of the team."]
13637    pub name: String,
13638}
13639
13640impl std::fmt::Display for GetTeamsResponse {
13641    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13642        write!(
13643            f,
13644            "{}",
13645            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13646        )
13647    }
13648}
13649
13650#[cfg(feature = "tabled")]
13651impl tabled::Tabled for GetTeamsResponse {
13652    const LENGTH: usize = 7;
13653    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13654        vec![
13655            if let Some(meta) = &self.meta {
13656                format!("{:?}", meta).into()
13657            } else {
13658                String::new().into()
13659            },
13660            self.id.clone().into(),
13661            self.created_at.clone().into(),
13662            self.updated_at.clone().into(),
13663            if let Some(parent_id) = &self.parent_id {
13664                format!("{:?}", parent_id).into()
13665            } else {
13666                String::new().into()
13667            },
13668            if let Some(parent) = &self.parent {
13669                format!("{:?}", parent).into()
13670            } else {
13671                String::new().into()
13672            },
13673            self.name.clone().into(),
13674        ]
13675    }
13676
13677    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13678        vec![
13679            "meta".into(),
13680            "id".into(),
13681            "created_at".into(),
13682            "updated_at".into(),
13683            "parent_id".into(),
13684            "parent".into(),
13685            "name".into(),
13686        ]
13687    }
13688}
13689
13690#[derive(
13691    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13692)]
13693pub struct ListTimeCardsResponse {
13694    #[doc = "A list of redacted fields."]
13695    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13696    pub meta: Option<RedactedFields>,
13697    pub results: Vec<TimeCard>,
13698    #[doc = "A link to the next page of responses."]
13699    #[serde(default, skip_serializing_if = "Option::is_none")]
13700    pub next_link: Option<String>,
13701}
13702
13703impl std::fmt::Display for ListTimeCardsResponse {
13704    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13705        write!(
13706            f,
13707            "{}",
13708            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13709        )
13710    }
13711}
13712
13713#[cfg(feature = "requests")]
13714impl crate::types::paginate::Pagination for ListTimeCardsResponse {
13715    type Item = TimeCard;
13716    fn has_more_pages(&self) -> bool {
13717        self.next_link.is_some()
13718    }
13719
13720    fn next_page_token(&self) -> Option<String> {
13721        self.next_link.clone()
13722    }
13723
13724    fn next_page(
13725        &self,
13726        req: reqwest::Request,
13727    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
13728        let mut req = req.try_clone().ok_or_else(|| {
13729            crate::types::error::Error::InvalidRequest(format!(
13730                "failed to clone request: {:?}",
13731                req
13732            ))
13733        })?;
13734        *req.url_mut() =
13735            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
13736                crate::types::error::Error::InvalidRequest(format!(
13737                    "failed to parse url: {:?}",
13738                    self.next_link
13739                ))
13740            })?;
13741        Ok(req)
13742    }
13743
13744    fn items(&self) -> Vec<Self::Item> {
13745        self.results.clone()
13746    }
13747}
13748
13749#[cfg(feature = "tabled")]
13750impl tabled::Tabled for ListTimeCardsResponse {
13751    const LENGTH: usize = 3;
13752    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13753        vec![
13754            if let Some(meta) = &self.meta {
13755                format!("{:?}", meta).into()
13756            } else {
13757                String::new().into()
13758            },
13759            format!("{:?}", self.results).into(),
13760            if let Some(next_link) = &self.next_link {
13761                format!("{:?}", next_link).into()
13762            } else {
13763                String::new().into()
13764            },
13765        ]
13766    }
13767
13768    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13769        vec!["meta".into(), "results".into(), "next_link".into()]
13770    }
13771}
13772
13773#[derive(
13774    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13775)]
13776pub struct GetTimeCardsResponse {
13777    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13778    pub meta: Option<Meta>,
13779    #[doc = "Identifier field"]
13780    pub id: String,
13781    #[doc = "Record creation date"]
13782    pub created_at: String,
13783    #[doc = "Record update date"]
13784    pub updated_at: String,
13785    #[doc = "The ID of the worker associated with the time card."]
13786    pub worker_id: String,
13787    #[doc = "The worker associated with the time card.\n\nExpandable field"]
13788    #[serde(default, skip_serializing_if = "Option::is_none")]
13789    pub worker: Option<Worker>,
13790    #[doc = "The pay period associated with the time card."]
13791    #[serde(default, skip_serializing_if = "Option::is_none")]
13792    pub pay_period: Option<PayPeriod>,
13793    #[doc = "The summary of the time card."]
13794    #[serde(default, skip_serializing_if = "Option::is_none")]
13795    pub summary: Option<TimeCardSummary>,
13796}
13797
13798impl std::fmt::Display for GetTimeCardsResponse {
13799    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13800        write!(
13801            f,
13802            "{}",
13803            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13804        )
13805    }
13806}
13807
13808#[cfg(feature = "tabled")]
13809impl tabled::Tabled for GetTimeCardsResponse {
13810    const LENGTH: usize = 8;
13811    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13812        vec![
13813            if let Some(meta) = &self.meta {
13814                format!("{:?}", meta).into()
13815            } else {
13816                String::new().into()
13817            },
13818            self.id.clone().into(),
13819            self.created_at.clone().into(),
13820            self.updated_at.clone().into(),
13821            self.worker_id.clone().into(),
13822            if let Some(worker) = &self.worker {
13823                format!("{:?}", worker).into()
13824            } else {
13825                String::new().into()
13826            },
13827            if let Some(pay_period) = &self.pay_period {
13828                format!("{:?}", pay_period).into()
13829            } else {
13830                String::new().into()
13831            },
13832            if let Some(summary) = &self.summary {
13833                format!("{:?}", summary).into()
13834            } else {
13835                String::new().into()
13836            },
13837        ]
13838    }
13839
13840    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13841        vec![
13842            "meta".into(),
13843            "id".into(),
13844            "created_at".into(),
13845            "updated_at".into(),
13846            "worker_id".into(),
13847            "worker".into(),
13848            "pay_period".into(),
13849            "summary".into(),
13850        ]
13851    }
13852}
13853
13854#[derive(
13855    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13856)]
13857pub struct ListTimeEntriesResponse {
13858    #[doc = "A list of redacted fields."]
13859    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13860    pub meta: Option<RedactedFields>,
13861    pub results: Vec<TimeEntry>,
13862    #[doc = "A link to the next page of responses."]
13863    #[serde(default, skip_serializing_if = "Option::is_none")]
13864    pub next_link: Option<String>,
13865}
13866
13867impl std::fmt::Display for ListTimeEntriesResponse {
13868    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13869        write!(
13870            f,
13871            "{}",
13872            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13873        )
13874    }
13875}
13876
13877#[cfg(feature = "requests")]
13878impl crate::types::paginate::Pagination for ListTimeEntriesResponse {
13879    type Item = TimeEntry;
13880    fn has_more_pages(&self) -> bool {
13881        self.next_link.is_some()
13882    }
13883
13884    fn next_page_token(&self) -> Option<String> {
13885        self.next_link.clone()
13886    }
13887
13888    fn next_page(
13889        &self,
13890        req: reqwest::Request,
13891    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
13892        let mut req = req.try_clone().ok_or_else(|| {
13893            crate::types::error::Error::InvalidRequest(format!(
13894                "failed to clone request: {:?}",
13895                req
13896            ))
13897        })?;
13898        *req.url_mut() =
13899            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
13900                crate::types::error::Error::InvalidRequest(format!(
13901                    "failed to parse url: {:?}",
13902                    self.next_link
13903                ))
13904            })?;
13905        Ok(req)
13906    }
13907
13908    fn items(&self) -> Vec<Self::Item> {
13909        self.results.clone()
13910    }
13911}
13912
13913#[cfg(feature = "tabled")]
13914impl tabled::Tabled for ListTimeEntriesResponse {
13915    const LENGTH: usize = 3;
13916    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13917        vec![
13918            if let Some(meta) = &self.meta {
13919                format!("{:?}", meta).into()
13920            } else {
13921                String::new().into()
13922            },
13923            format!("{:?}", self.results).into(),
13924            if let Some(next_link) = &self.next_link {
13925                format!("{:?}", next_link).into()
13926            } else {
13927                String::new().into()
13928            },
13929        ]
13930    }
13931
13932    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13933        vec!["meta".into(), "results".into(), "next_link".into()]
13934    }
13935}
13936
13937#[doc = "The status of the time entry."]
13938#[derive(
13939    serde :: Serialize,
13940    serde :: Deserialize,
13941    PartialEq,
13942    Hash,
13943    Debug,
13944    Clone,
13945    schemars :: JsonSchema,
13946    parse_display :: FromStr,
13947    parse_display :: Display,
13948)]
13949#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
13950#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
13951pub enum GetTimeEntriesResponseStatus {
13952    #[serde(rename = "DRAFT")]
13953    #[display("DRAFT")]
13954    Draft,
13955    #[serde(rename = "APPROVED")]
13956    #[display("APPROVED")]
13957    Approved,
13958    #[serde(rename = "PAID")]
13959    #[display("PAID")]
13960    Paid,
13961    #[serde(rename = "FINALIZED")]
13962    #[display("FINALIZED")]
13963    Finalized,
13964}
13965
13966#[derive(
13967    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13968)]
13969pub struct GetTimeEntriesResponse {
13970    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13971    pub meta: Option<Meta>,
13972    #[doc = "Identifier field"]
13973    pub id: String,
13974    #[doc = "Record creation date"]
13975    pub created_at: String,
13976    #[doc = "Record update date"]
13977    pub updated_at: String,
13978    #[doc = "The ID of the worker associated with the time entry."]
13979    pub worker_id: String,
13980    #[doc = "The worker associated with the time entry.\n\nExpandable field"]
13981    #[serde(default, skip_serializing_if = "Option::is_none")]
13982    pub worker: Option<Worker>,
13983    #[doc = "The start time of the time entry."]
13984    #[serde(default, skip_serializing_if = "Option::is_none")]
13985    pub start_time: Option<String>,
13986    #[doc = "The end time of the time entry."]
13987    #[serde(default, skip_serializing_if = "Option::is_none")]
13988    pub end_time: Option<String>,
13989    #[doc = "The comments associated with the time entry."]
13990    #[serde(default, skip_serializing_if = "Option::is_none")]
13991    pub comments: Option<Vec<TimeEntryComment>>,
13992    #[doc = "The job shifts worked during the time entry."]
13993    #[serde(default, skip_serializing_if = "Option::is_none")]
13994    pub job_shifts: Option<Vec<JobShift>>,
13995    #[doc = "The breaks taken during the time entry."]
13996    #[serde(default, skip_serializing_if = "Option::is_none")]
13997    pub breaks: Option<Vec<Break>>,
13998    #[doc = "The premiums earned during the time entry."]
13999    #[serde(default, skip_serializing_if = "Option::is_none")]
14000    pub premiums: Option<Vec<Premiums>>,
14001    #[doc = "The piece-rate premiums earned during the time entry."]
14002    #[serde(default, skip_serializing_if = "Option::is_none")]
14003    pub piece_rate_premiums: Option<Vec<PieceRatePremiums>>,
14004    #[doc = "The pay rates for each segment of the time entry."]
14005    #[serde(default, skip_serializing_if = "Option::is_none")]
14006    pub segments: Option<Vec<Segments>>,
14007    #[doc = "A summary of the time entry."]
14008    #[serde(default, skip_serializing_if = "Option::is_none")]
14009    pub time_entry_summary: Option<TimeEntrySummary>,
14010    #[doc = "The ID of the time card associated with the time entry."]
14011    #[serde(default, skip_serializing_if = "Option::is_none")]
14012    pub time_card_id: Option<String>,
14013    #[doc = "The time card associated with the time entry.\n\nExpandable field"]
14014    #[serde(default, skip_serializing_if = "Option::is_none")]
14015    pub time_card: Option<TimeCard>,
14016    #[doc = "The tags associated with the time entry."]
14017    #[serde(default, skip_serializing_if = "Option::is_none")]
14018    pub tags: Option<Vec<String>>,
14019    #[doc = "The unique key of the time entry in an outside system. If set, no other time entry \
14020             with the same key can be created."]
14021    #[serde(default, skip_serializing_if = "Option::is_none")]
14022    pub idempotency_key: Option<String>,
14023    #[doc = "Whether the time entry should create an extra hours run."]
14024    #[serde(default, skip_serializing_if = "Option::is_none")]
14025    pub create_extra_hours_run: Option<bool>,
14026    #[doc = "The status of the time entry."]
14027    #[serde(default, skip_serializing_if = "Option::is_none")]
14028    pub status: Option<GetTimeEntriesResponseStatus>,
14029    #[doc = "The pay period associated with the time card."]
14030    #[serde(default, skip_serializing_if = "Option::is_none")]
14031    pub pay_period: Option<PayPeriod>,
14032    #[doc = "Arbitrary shift inputs collected on the time entry"]
14033    #[serde(default, skip_serializing_if = "Option::is_none")]
14034    pub shift_input_values: Option<Vec<ShiftInputValue>>,
14035}
14036
14037impl std::fmt::Display for GetTimeEntriesResponse {
14038    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14039        write!(
14040            f,
14041            "{}",
14042            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14043        )
14044    }
14045}
14046
14047#[cfg(feature = "tabled")]
14048impl tabled::Tabled for GetTimeEntriesResponse {
14049    const LENGTH: usize = 23;
14050    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14051        vec![
14052            if let Some(meta) = &self.meta {
14053                format!("{:?}", meta).into()
14054            } else {
14055                String::new().into()
14056            },
14057            self.id.clone().into(),
14058            self.created_at.clone().into(),
14059            self.updated_at.clone().into(),
14060            self.worker_id.clone().into(),
14061            if let Some(worker) = &self.worker {
14062                format!("{:?}", worker).into()
14063            } else {
14064                String::new().into()
14065            },
14066            if let Some(start_time) = &self.start_time {
14067                format!("{:?}", start_time).into()
14068            } else {
14069                String::new().into()
14070            },
14071            if let Some(end_time) = &self.end_time {
14072                format!("{:?}", end_time).into()
14073            } else {
14074                String::new().into()
14075            },
14076            if let Some(comments) = &self.comments {
14077                format!("{:?}", comments).into()
14078            } else {
14079                String::new().into()
14080            },
14081            if let Some(job_shifts) = &self.job_shifts {
14082                format!("{:?}", job_shifts).into()
14083            } else {
14084                String::new().into()
14085            },
14086            if let Some(breaks) = &self.breaks {
14087                format!("{:?}", breaks).into()
14088            } else {
14089                String::new().into()
14090            },
14091            if let Some(premiums) = &self.premiums {
14092                format!("{:?}", premiums).into()
14093            } else {
14094                String::new().into()
14095            },
14096            if let Some(piece_rate_premiums) = &self.piece_rate_premiums {
14097                format!("{:?}", piece_rate_premiums).into()
14098            } else {
14099                String::new().into()
14100            },
14101            if let Some(segments) = &self.segments {
14102                format!("{:?}", segments).into()
14103            } else {
14104                String::new().into()
14105            },
14106            if let Some(time_entry_summary) = &self.time_entry_summary {
14107                format!("{:?}", time_entry_summary).into()
14108            } else {
14109                String::new().into()
14110            },
14111            if let Some(time_card_id) = &self.time_card_id {
14112                format!("{:?}", time_card_id).into()
14113            } else {
14114                String::new().into()
14115            },
14116            if let Some(time_card) = &self.time_card {
14117                format!("{:?}", time_card).into()
14118            } else {
14119                String::new().into()
14120            },
14121            if let Some(tags) = &self.tags {
14122                format!("{:?}", tags).into()
14123            } else {
14124                String::new().into()
14125            },
14126            if let Some(idempotency_key) = &self.idempotency_key {
14127                format!("{:?}", idempotency_key).into()
14128            } else {
14129                String::new().into()
14130            },
14131            if let Some(create_extra_hours_run) = &self.create_extra_hours_run {
14132                format!("{:?}", create_extra_hours_run).into()
14133            } else {
14134                String::new().into()
14135            },
14136            if let Some(status) = &self.status {
14137                format!("{:?}", status).into()
14138            } else {
14139                String::new().into()
14140            },
14141            if let Some(pay_period) = &self.pay_period {
14142                format!("{:?}", pay_period).into()
14143            } else {
14144                String::new().into()
14145            },
14146            if let Some(shift_input_values) = &self.shift_input_values {
14147                format!("{:?}", shift_input_values).into()
14148            } else {
14149                String::new().into()
14150            },
14151        ]
14152    }
14153
14154    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14155        vec![
14156            "meta".into(),
14157            "id".into(),
14158            "created_at".into(),
14159            "updated_at".into(),
14160            "worker_id".into(),
14161            "worker".into(),
14162            "start_time".into(),
14163            "end_time".into(),
14164            "comments".into(),
14165            "job_shifts".into(),
14166            "breaks".into(),
14167            "premiums".into(),
14168            "piece_rate_premiums".into(),
14169            "segments".into(),
14170            "time_entry_summary".into(),
14171            "time_card_id".into(),
14172            "time_card".into(),
14173            "tags".into(),
14174            "idempotency_key".into(),
14175            "create_extra_hours_run".into(),
14176            "status".into(),
14177            "pay_period".into(),
14178            "shift_input_values".into(),
14179        ]
14180    }
14181}
14182
14183#[derive(
14184    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14185)]
14186pub struct ListTracksResponse {
14187    #[doc = "A list of redacted fields."]
14188    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14189    pub meta: Option<RedactedFields>,
14190    pub results: Vec<Track>,
14191    #[doc = "A link to the next page of responses."]
14192    #[serde(default, skip_serializing_if = "Option::is_none")]
14193    pub next_link: Option<String>,
14194}
14195
14196impl std::fmt::Display for ListTracksResponse {
14197    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14198        write!(
14199            f,
14200            "{}",
14201            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14202        )
14203    }
14204}
14205
14206#[cfg(feature = "requests")]
14207impl crate::types::paginate::Pagination for ListTracksResponse {
14208    type Item = Track;
14209    fn has_more_pages(&self) -> bool {
14210        self.next_link.is_some()
14211    }
14212
14213    fn next_page_token(&self) -> Option<String> {
14214        self.next_link.clone()
14215    }
14216
14217    fn next_page(
14218        &self,
14219        req: reqwest::Request,
14220    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
14221        let mut req = req.try_clone().ok_or_else(|| {
14222            crate::types::error::Error::InvalidRequest(format!(
14223                "failed to clone request: {:?}",
14224                req
14225            ))
14226        })?;
14227        *req.url_mut() =
14228            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
14229                crate::types::error::Error::InvalidRequest(format!(
14230                    "failed to parse url: {:?}",
14231                    self.next_link
14232                ))
14233            })?;
14234        Ok(req)
14235    }
14236
14237    fn items(&self) -> Vec<Self::Item> {
14238        self.results.clone()
14239    }
14240}
14241
14242#[cfg(feature = "tabled")]
14243impl tabled::Tabled for ListTracksResponse {
14244    const LENGTH: usize = 3;
14245    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14246        vec![
14247            if let Some(meta) = &self.meta {
14248                format!("{:?}", meta).into()
14249            } else {
14250                String::new().into()
14251            },
14252            format!("{:?}", self.results).into(),
14253            if let Some(next_link) = &self.next_link {
14254                format!("{:?}", next_link).into()
14255            } else {
14256                String::new().into()
14257            },
14258        ]
14259    }
14260
14261    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14262        vec!["meta".into(), "results".into(), "next_link".into()]
14263    }
14264}
14265
14266#[derive(
14267    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14268)]
14269pub struct GetTracksResponse {
14270    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14271    pub meta: Option<Meta>,
14272    #[doc = "Identifier field"]
14273    pub id: String,
14274    #[doc = "Record creation date"]
14275    pub created_at: String,
14276    #[doc = "Record update date"]
14277    pub updated_at: String,
14278    #[doc = "The name of the track. Must be unique within the company or organization."]
14279    pub name: String,
14280}
14281
14282impl std::fmt::Display for GetTracksResponse {
14283    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14284        write!(
14285            f,
14286            "{}",
14287            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14288        )
14289    }
14290}
14291
14292#[cfg(feature = "tabled")]
14293impl tabled::Tabled for GetTracksResponse {
14294    const LENGTH: usize = 5;
14295    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14296        vec![
14297            if let Some(meta) = &self.meta {
14298                format!("{:?}", meta).into()
14299            } else {
14300                String::new().into()
14301            },
14302            self.id.clone().into(),
14303            self.created_at.clone().into(),
14304            self.updated_at.clone().into(),
14305            self.name.clone().into(),
14306        ]
14307    }
14308
14309    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14310        vec![
14311            "meta".into(),
14312            "id".into(),
14313            "created_at".into(),
14314            "updated_at".into(),
14315            "name".into(),
14316        ]
14317    }
14318}
14319
14320#[derive(
14321    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14322)]
14323pub struct ListUsersResponse {
14324    #[doc = "A list of redacted fields."]
14325    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14326    pub meta: Option<RedactedFields>,
14327    pub results: Vec<User>,
14328    #[doc = "A link to the next page of responses."]
14329    #[serde(default, skip_serializing_if = "Option::is_none")]
14330    pub next_link: Option<String>,
14331}
14332
14333impl std::fmt::Display for ListUsersResponse {
14334    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14335        write!(
14336            f,
14337            "{}",
14338            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14339        )
14340    }
14341}
14342
14343#[cfg(feature = "requests")]
14344impl crate::types::paginate::Pagination for ListUsersResponse {
14345    type Item = User;
14346    fn has_more_pages(&self) -> bool {
14347        self.next_link.is_some()
14348    }
14349
14350    fn next_page_token(&self) -> Option<String> {
14351        self.next_link.clone()
14352    }
14353
14354    fn next_page(
14355        &self,
14356        req: reqwest::Request,
14357    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
14358        let mut req = req.try_clone().ok_or_else(|| {
14359            crate::types::error::Error::InvalidRequest(format!(
14360                "failed to clone request: {:?}",
14361                req
14362            ))
14363        })?;
14364        *req.url_mut() =
14365            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
14366                crate::types::error::Error::InvalidRequest(format!(
14367                    "failed to parse url: {:?}",
14368                    self.next_link
14369                ))
14370            })?;
14371        Ok(req)
14372    }
14373
14374    fn items(&self) -> Vec<Self::Item> {
14375        self.results.clone()
14376    }
14377}
14378
14379#[cfg(feature = "tabled")]
14380impl tabled::Tabled for ListUsersResponse {
14381    const LENGTH: usize = 3;
14382    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14383        vec![
14384            if let Some(meta) = &self.meta {
14385                format!("{:?}", meta).into()
14386            } else {
14387                String::new().into()
14388            },
14389            format!("{:?}", self.results).into(),
14390            if let Some(next_link) = &self.next_link {
14391                format!("{:?}", next_link).into()
14392            } else {
14393                String::new().into()
14394            },
14395        ]
14396    }
14397
14398    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14399        vec!["meta".into(), "results".into(), "next_link".into()]
14400    }
14401}
14402
14403#[derive(
14404    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14405)]
14406pub struct GetUsersResponse {
14407    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14408    pub meta: Option<Meta>,
14409    #[doc = "Identifier field"]
14410    pub id: String,
14411    #[doc = "Record creation date"]
14412    pub created_at: String,
14413    #[doc = "Record update date"]
14414    pub updated_at: String,
14415    #[doc = "Whether the user is able to access company resources, typically when they are in \
14416             actively engaged with the company and not after off-boarding."]
14417    #[serde(default, skip_serializing_if = "Option::is_none")]
14418    pub active: Option<bool>,
14419    #[doc = "The unique identifier across Rippling used by the User for direct authentication \
14420             into their associated company. Globally unique."]
14421    #[serde(default, skip_serializing_if = "Option::is_none")]
14422    pub username: Option<String>,
14423    #[doc = "The user's name."]
14424    #[serde(default, skip_serializing_if = "Option::is_none")]
14425    pub name: Option<UserName>,
14426    #[doc = "The display name of the user using either the concatenated preferred given and \
14427             family name or username depending on availability."]
14428    #[serde(default, skip_serializing_if = "Option::is_none")]
14429    pub display_name: Option<String>,
14430    #[doc = "The user's email addresses."]
14431    #[serde(default, skip_serializing_if = "Option::is_none")]
14432    pub emails: Option<Vec<Email>>,
14433    #[doc = "The user's phone numbers."]
14434    #[serde(default, skip_serializing_if = "Option::is_none")]
14435    pub phone_numbers: Option<Vec<UserPhoneNumber>>,
14436    #[doc = "The user's addresses."]
14437    #[serde(default, skip_serializing_if = "Option::is_none")]
14438    pub addresses: Option<Vec<UserAddress>>,
14439    #[doc = "The user's photos."]
14440    #[serde(default, skip_serializing_if = "Option::is_none")]
14441    pub photos: Option<Vec<UserPhoto>>,
14442    #[doc = "The User's preferred written or spoken language in the same format of the HTTP \
14443             Accept-Language header, pursuant to Section 5.3.5 of RFC7231."]
14444    #[serde(default, skip_serializing_if = "Option::is_none")]
14445    pub preferred_language: Option<String>,
14446    #[doc = "The User's default location for purposes of localization of currency, date time \
14447             format, or numerical representations pursuant to RFC5646."]
14448    #[serde(default, skip_serializing_if = "Option::is_none")]
14449    pub locale: Option<String>,
14450    #[doc = "The User's current time zone in IANA database Olson format"]
14451    #[serde(default, skip_serializing_if = "Option::is_none")]
14452    pub timezone: Option<String>,
14453}
14454
14455impl std::fmt::Display for GetUsersResponse {
14456    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14457        write!(
14458            f,
14459            "{}",
14460            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14461        )
14462    }
14463}
14464
14465#[cfg(feature = "tabled")]
14466impl tabled::Tabled for GetUsersResponse {
14467    const LENGTH: usize = 15;
14468    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14469        vec![
14470            if let Some(meta) = &self.meta {
14471                format!("{:?}", meta).into()
14472            } else {
14473                String::new().into()
14474            },
14475            self.id.clone().into(),
14476            self.created_at.clone().into(),
14477            self.updated_at.clone().into(),
14478            if let Some(active) = &self.active {
14479                format!("{:?}", active).into()
14480            } else {
14481                String::new().into()
14482            },
14483            if let Some(username) = &self.username {
14484                format!("{:?}", username).into()
14485            } else {
14486                String::new().into()
14487            },
14488            if let Some(name) = &self.name {
14489                format!("{:?}", name).into()
14490            } else {
14491                String::new().into()
14492            },
14493            if let Some(display_name) = &self.display_name {
14494                format!("{:?}", display_name).into()
14495            } else {
14496                String::new().into()
14497            },
14498            if let Some(emails) = &self.emails {
14499                format!("{:?}", emails).into()
14500            } else {
14501                String::new().into()
14502            },
14503            if let Some(phone_numbers) = &self.phone_numbers {
14504                format!("{:?}", phone_numbers).into()
14505            } else {
14506                String::new().into()
14507            },
14508            if let Some(addresses) = &self.addresses {
14509                format!("{:?}", addresses).into()
14510            } else {
14511                String::new().into()
14512            },
14513            if let Some(photos) = &self.photos {
14514                format!("{:?}", photos).into()
14515            } else {
14516                String::new().into()
14517            },
14518            if let Some(preferred_language) = &self.preferred_language {
14519                format!("{:?}", preferred_language).into()
14520            } else {
14521                String::new().into()
14522            },
14523            if let Some(locale) = &self.locale {
14524                format!("{:?}", locale).into()
14525            } else {
14526                String::new().into()
14527            },
14528            if let Some(timezone) = &self.timezone {
14529                format!("{:?}", timezone).into()
14530            } else {
14531                String::new().into()
14532            },
14533        ]
14534    }
14535
14536    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14537        vec![
14538            "meta".into(),
14539            "id".into(),
14540            "created_at".into(),
14541            "updated_at".into(),
14542            "active".into(),
14543            "username".into(),
14544            "name".into(),
14545            "display_name".into(),
14546            "emails".into(),
14547            "phone_numbers".into(),
14548            "addresses".into(),
14549            "photos".into(),
14550            "preferred_language".into(),
14551            "locale".into(),
14552            "timezone".into(),
14553        ]
14554    }
14555}
14556
14557#[derive(
14558    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14559)]
14560pub struct ListWorkLocationsResponse {
14561    #[doc = "A list of redacted fields."]
14562    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14563    pub meta: Option<RedactedFields>,
14564    pub results: Vec<WorkLocation>,
14565    #[doc = "A link to the next page of responses."]
14566    #[serde(default, skip_serializing_if = "Option::is_none")]
14567    pub next_link: Option<String>,
14568}
14569
14570impl std::fmt::Display for ListWorkLocationsResponse {
14571    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14572        write!(
14573            f,
14574            "{}",
14575            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14576        )
14577    }
14578}
14579
14580#[cfg(feature = "requests")]
14581impl crate::types::paginate::Pagination for ListWorkLocationsResponse {
14582    type Item = WorkLocation;
14583    fn has_more_pages(&self) -> bool {
14584        self.next_link.is_some()
14585    }
14586
14587    fn next_page_token(&self) -> Option<String> {
14588        self.next_link.clone()
14589    }
14590
14591    fn next_page(
14592        &self,
14593        req: reqwest::Request,
14594    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
14595        let mut req = req.try_clone().ok_or_else(|| {
14596            crate::types::error::Error::InvalidRequest(format!(
14597                "failed to clone request: {:?}",
14598                req
14599            ))
14600        })?;
14601        *req.url_mut() =
14602            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
14603                crate::types::error::Error::InvalidRequest(format!(
14604                    "failed to parse url: {:?}",
14605                    self.next_link
14606                ))
14607            })?;
14608        Ok(req)
14609    }
14610
14611    fn items(&self) -> Vec<Self::Item> {
14612        self.results.clone()
14613    }
14614}
14615
14616#[cfg(feature = "tabled")]
14617impl tabled::Tabled for ListWorkLocationsResponse {
14618    const LENGTH: usize = 3;
14619    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14620        vec![
14621            if let Some(meta) = &self.meta {
14622                format!("{:?}", meta).into()
14623            } else {
14624                String::new().into()
14625            },
14626            format!("{:?}", self.results).into(),
14627            if let Some(next_link) = &self.next_link {
14628                format!("{:?}", next_link).into()
14629            } else {
14630                String::new().into()
14631            },
14632        ]
14633    }
14634
14635    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14636        vec!["meta".into(), "results".into(), "next_link".into()]
14637    }
14638}
14639
14640#[derive(
14641    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14642)]
14643pub struct GetWorkLocationsResponse {
14644    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14645    pub meta: Option<Meta>,
14646    #[doc = "Identifier field"]
14647    pub id: String,
14648    #[doc = "Record creation date"]
14649    pub created_at: String,
14650    #[doc = "Record update date"]
14651    pub updated_at: String,
14652    #[doc = "The name of the work location."]
14653    pub name: String,
14654    #[doc = "The address for the work location."]
14655    pub address: Address,
14656}
14657
14658impl std::fmt::Display for GetWorkLocationsResponse {
14659    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14660        write!(
14661            f,
14662            "{}",
14663            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14664        )
14665    }
14666}
14667
14668#[cfg(feature = "tabled")]
14669impl tabled::Tabled for GetWorkLocationsResponse {
14670    const LENGTH: usize = 6;
14671    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14672        vec![
14673            if let Some(meta) = &self.meta {
14674                format!("{:?}", meta).into()
14675            } else {
14676                String::new().into()
14677            },
14678            self.id.clone().into(),
14679            self.created_at.clone().into(),
14680            self.updated_at.clone().into(),
14681            self.name.clone().into(),
14682            format!("{:?}", self.address).into(),
14683        ]
14684    }
14685
14686    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14687        vec![
14688            "meta".into(),
14689            "id".into(),
14690            "created_at".into(),
14691            "updated_at".into(),
14692            "name".into(),
14693            "address".into(),
14694        ]
14695    }
14696}
14697
14698#[derive(
14699    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14700)]
14701pub struct ListWorkersResponse {
14702    #[doc = "A list of redacted fields."]
14703    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14704    pub meta: Option<RedactedFields>,
14705    pub results: Vec<Worker>,
14706    #[doc = "A link to the next page of responses."]
14707    #[serde(default, skip_serializing_if = "Option::is_none")]
14708    pub next_link: Option<String>,
14709}
14710
14711impl std::fmt::Display for ListWorkersResponse {
14712    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14713        write!(
14714            f,
14715            "{}",
14716            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14717        )
14718    }
14719}
14720
14721#[cfg(feature = "requests")]
14722impl crate::types::paginate::Pagination for ListWorkersResponse {
14723    type Item = Worker;
14724    fn has_more_pages(&self) -> bool {
14725        self.next_link.is_some()
14726    }
14727
14728    fn next_page_token(&self) -> Option<String> {
14729        self.next_link.clone()
14730    }
14731
14732    fn next_page(
14733        &self,
14734        req: reqwest::Request,
14735    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
14736        let mut req = req.try_clone().ok_or_else(|| {
14737            crate::types::error::Error::InvalidRequest(format!(
14738                "failed to clone request: {:?}",
14739                req
14740            ))
14741        })?;
14742        *req.url_mut() =
14743            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
14744                crate::types::error::Error::InvalidRequest(format!(
14745                    "failed to parse url: {:?}",
14746                    self.next_link
14747                ))
14748            })?;
14749        Ok(req)
14750    }
14751
14752    fn items(&self) -> Vec<Self::Item> {
14753        self.results.clone()
14754    }
14755}
14756
14757#[cfg(feature = "tabled")]
14758impl tabled::Tabled for ListWorkersResponse {
14759    const LENGTH: usize = 3;
14760    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14761        vec![
14762            if let Some(meta) = &self.meta {
14763                format!("{:?}", meta).into()
14764            } else {
14765                String::new().into()
14766            },
14767            format!("{:?}", self.results).into(),
14768            if let Some(next_link) = &self.next_link {
14769                format!("{:?}", next_link).into()
14770            } else {
14771                String::new().into()
14772            },
14773        ]
14774    }
14775
14776    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14777        vec!["meta".into(), "results".into(), "next_link".into()]
14778    }
14779}
14780
14781#[derive(
14782    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14783)]
14784pub struct ListCustomObjectsCustomObjectApiNameFieldsResponse {
14785    pub results: Vec<CustomObjectField>,
14786    #[doc = "A link to the next page of responses."]
14787    #[serde(default, skip_serializing_if = "Option::is_none")]
14788    pub next_link: Option<String>,
14789}
14790
14791impl std::fmt::Display for ListCustomObjectsCustomObjectApiNameFieldsResponse {
14792    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14793        write!(
14794            f,
14795            "{}",
14796            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14797        )
14798    }
14799}
14800
14801#[cfg(feature = "requests")]
14802impl crate::types::paginate::Pagination for ListCustomObjectsCustomObjectApiNameFieldsResponse {
14803    type Item = CustomObjectField;
14804    fn has_more_pages(&self) -> bool {
14805        self.next_link.is_some()
14806    }
14807
14808    fn next_page_token(&self) -> Option<String> {
14809        self.next_link.clone()
14810    }
14811
14812    fn next_page(
14813        &self,
14814        req: reqwest::Request,
14815    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
14816        let mut req = req.try_clone().ok_or_else(|| {
14817            crate::types::error::Error::InvalidRequest(format!(
14818                "failed to clone request: {:?}",
14819                req
14820            ))
14821        })?;
14822        *req.url_mut() =
14823            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
14824                crate::types::error::Error::InvalidRequest(format!(
14825                    "failed to parse url: {:?}",
14826                    self.next_link
14827                ))
14828            })?;
14829        Ok(req)
14830    }
14831
14832    fn items(&self) -> Vec<Self::Item> {
14833        self.results.clone()
14834    }
14835}
14836
14837#[cfg(feature = "tabled")]
14838impl tabled::Tabled for ListCustomObjectsCustomObjectApiNameFieldsResponse {
14839    const LENGTH: usize = 2;
14840    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14841        vec![
14842            format!("{:?}", self.results).into(),
14843            if let Some(next_link) = &self.next_link {
14844                format!("{:?}", next_link).into()
14845            } else {
14846                String::new().into()
14847            },
14848        ]
14849    }
14850
14851    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14852        vec!["results".into(), "next_link".into()]
14853    }
14854}
14855
14856#[derive(
14857    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14858)]
14859pub struct CreateCustomObjectsCustomObjectApiNameFieldsRequestBody {
14860    #[serde(default, skip_serializing_if = "Option::is_none")]
14861    pub name: Option<String>,
14862    #[serde(default, skip_serializing_if = "Option::is_none")]
14863    pub description: Option<String>,
14864    #[serde(default, skip_serializing_if = "Option::is_none")]
14865    pub required: Option<bool>,
14866    #[serde(default, skip_serializing_if = "Option::is_none")]
14867    pub is_unique: Option<bool>,
14868    #[serde(default, skip_serializing_if = "Option::is_none")]
14869    pub enable_history: Option<bool>,
14870    #[serde(default, skip_serializing_if = "Option::is_none")]
14871    pub derived_field_formula: Option<String>,
14872}
14873
14874impl std::fmt::Display for CreateCustomObjectsCustomObjectApiNameFieldsRequestBody {
14875    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14876        write!(
14877            f,
14878            "{}",
14879            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14880        )
14881    }
14882}
14883
14884#[cfg(feature = "tabled")]
14885impl tabled::Tabled for CreateCustomObjectsCustomObjectApiNameFieldsRequestBody {
14886    const LENGTH: usize = 6;
14887    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14888        vec![
14889            if let Some(name) = &self.name {
14890                format!("{:?}", name).into()
14891            } else {
14892                String::new().into()
14893            },
14894            if let Some(description) = &self.description {
14895                format!("{:?}", description).into()
14896            } else {
14897                String::new().into()
14898            },
14899            if let Some(required) = &self.required {
14900                format!("{:?}", required).into()
14901            } else {
14902                String::new().into()
14903            },
14904            if let Some(is_unique) = &self.is_unique {
14905                format!("{:?}", is_unique).into()
14906            } else {
14907                String::new().into()
14908            },
14909            if let Some(enable_history) = &self.enable_history {
14910                format!("{:?}", enable_history).into()
14911            } else {
14912                String::new().into()
14913            },
14914            if let Some(derived_field_formula) = &self.derived_field_formula {
14915                format!("{:?}", derived_field_formula).into()
14916            } else {
14917                String::new().into()
14918            },
14919        ]
14920    }
14921
14922    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14923        vec![
14924            "name".into(),
14925            "description".into(),
14926            "required".into(),
14927            "is_unique".into(),
14928            "enable_history".into(),
14929            "derived_field_formula".into(),
14930        ]
14931    }
14932}
14933
14934#[derive(
14935    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14936)]
14937pub struct UpdateCustomObjectsCustomObjectApiNameFieldsRequestBody {
14938    #[serde(default, skip_serializing_if = "Option::is_none")]
14939    pub name: Option<String>,
14940    #[serde(default, skip_serializing_if = "Option::is_none")]
14941    pub description: Option<String>,
14942    #[serde(default, skip_serializing_if = "Option::is_none")]
14943    pub required: Option<bool>,
14944    #[serde(default, skip_serializing_if = "Option::is_none")]
14945    pub is_unique: Option<bool>,
14946    #[serde(default, skip_serializing_if = "Option::is_none")]
14947    pub enable_history: Option<bool>,
14948    #[serde(default, skip_serializing_if = "Option::is_none")]
14949    pub derived_field_formula: Option<String>,
14950}
14951
14952impl std::fmt::Display for UpdateCustomObjectsCustomObjectApiNameFieldsRequestBody {
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
14962#[cfg(feature = "tabled")]
14963impl tabled::Tabled for UpdateCustomObjectsCustomObjectApiNameFieldsRequestBody {
14964    const LENGTH: usize = 6;
14965    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14966        vec![
14967            if let Some(name) = &self.name {
14968                format!("{:?}", name).into()
14969            } else {
14970                String::new().into()
14971            },
14972            if let Some(description) = &self.description {
14973                format!("{:?}", description).into()
14974            } else {
14975                String::new().into()
14976            },
14977            if let Some(required) = &self.required {
14978                format!("{:?}", required).into()
14979            } else {
14980                String::new().into()
14981            },
14982            if let Some(is_unique) = &self.is_unique {
14983                format!("{:?}", is_unique).into()
14984            } else {
14985                String::new().into()
14986            },
14987            if let Some(enable_history) = &self.enable_history {
14988                format!("{:?}", enable_history).into()
14989            } else {
14990                String::new().into()
14991            },
14992            if let Some(derived_field_formula) = &self.derived_field_formula {
14993                format!("{:?}", derived_field_formula).into()
14994            } else {
14995                String::new().into()
14996            },
14997        ]
14998    }
14999
15000    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15001        vec![
15002            "name".into(),
15003            "description".into(),
15004            "required".into(),
15005            "is_unique".into(),
15006            "enable_history".into(),
15007            "derived_field_formula".into(),
15008        ]
15009    }
15010}
15011
15012#[derive(
15013    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15014)]
15015pub struct Results {
15016    #[serde(default, skip_serializing_if = "Option::is_none")]
15017    pub name: Option<String>,
15018    #[serde(default, skip_serializing_if = "Option::is_none")]
15019    pub compnay_id: Option<String>,
15020    #[serde(default, skip_serializing_if = "Option::is_none")]
15021    pub created_at: Option<String>,
15022    #[serde(default, skip_serializing_if = "Option::is_none")]
15023    pub created_by: Option<String>,
15024    #[serde(default, skip_serializing_if = "Option::is_none")]
15025    pub custom_object: Option<String>,
15026    #[serde(default, skip_serializing_if = "Option::is_none")]
15027    pub external_id: Option<String>,
15028    #[serde(default, skip_serializing_if = "Option::is_none")]
15029    pub id: Option<String>,
15030    #[serde(default, skip_serializing_if = "Option::is_none")]
15031    pub last_modified_by: Option<String>,
15032    #[serde(default, skip_serializing_if = "Option::is_none")]
15033    pub updated_at: Option<String>,
15034    #[serde(default, skip_serializing_if = "Option::is_none")]
15035    pub owner_role: Option<String>,
15036}
15037
15038impl std::fmt::Display for Results {
15039    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15040        write!(
15041            f,
15042            "{}",
15043            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15044        )
15045    }
15046}
15047
15048#[cfg(feature = "tabled")]
15049impl tabled::Tabled for Results {
15050    const LENGTH: usize = 10;
15051    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15052        vec![
15053            if let Some(name) = &self.name {
15054                format!("{:?}", name).into()
15055            } else {
15056                String::new().into()
15057            },
15058            if let Some(compnay_id) = &self.compnay_id {
15059                format!("{:?}", compnay_id).into()
15060            } else {
15061                String::new().into()
15062            },
15063            if let Some(created_at) = &self.created_at {
15064                format!("{:?}", created_at).into()
15065            } else {
15066                String::new().into()
15067            },
15068            if let Some(created_by) = &self.created_by {
15069                format!("{:?}", created_by).into()
15070            } else {
15071                String::new().into()
15072            },
15073            if let Some(custom_object) = &self.custom_object {
15074                format!("{:?}", custom_object).into()
15075            } else {
15076                String::new().into()
15077            },
15078            if let Some(external_id) = &self.external_id {
15079                format!("{:?}", external_id).into()
15080            } else {
15081                String::new().into()
15082            },
15083            if let Some(id) = &self.id {
15084                format!("{:?}", id).into()
15085            } else {
15086                String::new().into()
15087            },
15088            if let Some(last_modified_by) = &self.last_modified_by {
15089                format!("{:?}", last_modified_by).into()
15090            } else {
15091                String::new().into()
15092            },
15093            if let Some(updated_at) = &self.updated_at {
15094                format!("{:?}", updated_at).into()
15095            } else {
15096                String::new().into()
15097            },
15098            if let Some(owner_role) = &self.owner_role {
15099                format!("{:?}", owner_role).into()
15100            } else {
15101                String::new().into()
15102            },
15103        ]
15104    }
15105
15106    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15107        vec![
15108            "name".into(),
15109            "compnay_id".into(),
15110            "created_at".into(),
15111            "created_by".into(),
15112            "custom_object".into(),
15113            "external_id".into(),
15114            "id".into(),
15115            "last_modified_by".into(),
15116            "updated_at".into(),
15117            "owner_role".into(),
15118        ]
15119    }
15120}
15121
15122#[derive(
15123    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15124)]
15125pub struct ListCustomObjectsCustomObjectApiNameRecordsResponse {
15126    pub results: Vec<Results>,
15127    #[doc = "A link to the next page of responses."]
15128    #[serde(default, skip_serializing_if = "Option::is_none")]
15129    pub next_link: Option<String>,
15130}
15131
15132impl std::fmt::Display for ListCustomObjectsCustomObjectApiNameRecordsResponse {
15133    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15134        write!(
15135            f,
15136            "{}",
15137            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15138        )
15139    }
15140}
15141
15142#[cfg(feature = "requests")]
15143impl crate::types::paginate::Pagination for ListCustomObjectsCustomObjectApiNameRecordsResponse {
15144    type Item = Results;
15145    fn has_more_pages(&self) -> bool {
15146        self.next_link.is_some()
15147    }
15148
15149    fn next_page_token(&self) -> Option<String> {
15150        self.next_link.clone()
15151    }
15152
15153    fn next_page(
15154        &self,
15155        req: reqwest::Request,
15156    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
15157        let mut req = req.try_clone().ok_or_else(|| {
15158            crate::types::error::Error::InvalidRequest(format!(
15159                "failed to clone request: {:?}",
15160                req
15161            ))
15162        })?;
15163        *req.url_mut() =
15164            url::Url::parse(self.next_link.as_deref().unwrap_or("")).map_err(|_| {
15165                crate::types::error::Error::InvalidRequest(format!(
15166                    "failed to parse url: {:?}",
15167                    self.next_link
15168                ))
15169            })?;
15170        Ok(req)
15171    }
15172
15173    fn items(&self) -> Vec<Self::Item> {
15174        self.results.clone()
15175    }
15176}
15177
15178#[cfg(feature = "tabled")]
15179impl tabled::Tabled for ListCustomObjectsCustomObjectApiNameRecordsResponse {
15180    const LENGTH: usize = 2;
15181    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15182        vec![
15183            format!("{:?}", self.results).into(),
15184            if let Some(next_link) = &self.next_link {
15185                format!("{:?}", next_link).into()
15186            } else {
15187                String::new().into()
15188            },
15189        ]
15190    }
15191
15192    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15193        vec!["results".into(), "next_link".into()]
15194    }
15195}
15196
15197#[derive(
15198    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15199)]
15200pub struct CreateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15201    #[serde(default, skip_serializing_if = "Option::is_none")]
15202    pub name: Option<String>,
15203    #[serde(default, skip_serializing_if = "Option::is_none")]
15204    pub field_api_name: Option<String>,
15205}
15206
15207impl std::fmt::Display for CreateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15208    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15209        write!(
15210            f,
15211            "{}",
15212            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15213        )
15214    }
15215}
15216
15217#[cfg(feature = "tabled")]
15218impl tabled::Tabled for CreateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15219    const LENGTH: usize = 2;
15220    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15221        vec![
15222            if let Some(name) = &self.name {
15223                format!("{:?}", name).into()
15224            } else {
15225                String::new().into()
15226            },
15227            if let Some(field_api_name) = &self.field_api_name {
15228                format!("{:?}", field_api_name).into()
15229            } else {
15230                String::new().into()
15231            },
15232        ]
15233    }
15234
15235    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15236        vec!["name".into(), "field_api_name".into()]
15237    }
15238}
15239
15240#[derive(
15241    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15242)]
15243pub struct CreateCustomObjectsCustomObjectApiNameRecordsResponse {
15244    #[serde(default, skip_serializing_if = "Option::is_none")]
15245    pub name: Option<String>,
15246    #[serde(default, skip_serializing_if = "Option::is_none")]
15247    pub compnay_id: Option<String>,
15248    #[serde(default, skip_serializing_if = "Option::is_none")]
15249    pub created_at: Option<String>,
15250    #[serde(default, skip_serializing_if = "Option::is_none")]
15251    pub created_by: Option<String>,
15252    #[serde(default, skip_serializing_if = "Option::is_none")]
15253    pub custom_object: Option<String>,
15254    #[serde(default, skip_serializing_if = "Option::is_none")]
15255    pub external_id: Option<String>,
15256    #[serde(default, skip_serializing_if = "Option::is_none")]
15257    pub id: Option<String>,
15258    #[serde(default, skip_serializing_if = "Option::is_none")]
15259    pub last_modified_by: Option<String>,
15260    #[serde(default, skip_serializing_if = "Option::is_none")]
15261    pub updated_at: Option<String>,
15262    #[serde(default, skip_serializing_if = "Option::is_none")]
15263    pub owner_role: Option<String>,
15264}
15265
15266impl std::fmt::Display for CreateCustomObjectsCustomObjectApiNameRecordsResponse {
15267    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15268        write!(
15269            f,
15270            "{}",
15271            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15272        )
15273    }
15274}
15275
15276#[cfg(feature = "tabled")]
15277impl tabled::Tabled for CreateCustomObjectsCustomObjectApiNameRecordsResponse {
15278    const LENGTH: usize = 10;
15279    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15280        vec![
15281            if let Some(name) = &self.name {
15282                format!("{:?}", name).into()
15283            } else {
15284                String::new().into()
15285            },
15286            if let Some(compnay_id) = &self.compnay_id {
15287                format!("{:?}", compnay_id).into()
15288            } else {
15289                String::new().into()
15290            },
15291            if let Some(created_at) = &self.created_at {
15292                format!("{:?}", created_at).into()
15293            } else {
15294                String::new().into()
15295            },
15296            if let Some(created_by) = &self.created_by {
15297                format!("{:?}", created_by).into()
15298            } else {
15299                String::new().into()
15300            },
15301            if let Some(custom_object) = &self.custom_object {
15302                format!("{:?}", custom_object).into()
15303            } else {
15304                String::new().into()
15305            },
15306            if let Some(external_id) = &self.external_id {
15307                format!("{:?}", external_id).into()
15308            } else {
15309                String::new().into()
15310            },
15311            if let Some(id) = &self.id {
15312                format!("{:?}", id).into()
15313            } else {
15314                String::new().into()
15315            },
15316            if let Some(last_modified_by) = &self.last_modified_by {
15317                format!("{:?}", last_modified_by).into()
15318            } else {
15319                String::new().into()
15320            },
15321            if let Some(updated_at) = &self.updated_at {
15322                format!("{:?}", updated_at).into()
15323            } else {
15324                String::new().into()
15325            },
15326            if let Some(owner_role) = &self.owner_role {
15327                format!("{:?}", owner_role).into()
15328            } else {
15329                String::new().into()
15330            },
15331        ]
15332    }
15333
15334    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15335        vec![
15336            "name".into(),
15337            "compnay_id".into(),
15338            "created_at".into(),
15339            "created_by".into(),
15340            "custom_object".into(),
15341            "external_id".into(),
15342            "id".into(),
15343            "last_modified_by".into(),
15344            "updated_at".into(),
15345            "owner_role".into(),
15346        ]
15347    }
15348}
15349
15350#[derive(
15351    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15352)]
15353pub struct ListByQueryCustomObjectsCustomObjectApiNameRecordsRequestBody {
15354    #[serde(default, skip_serializing_if = "Option::is_none")]
15355    pub query: Option<String>,
15356    #[serde(default, skip_serializing_if = "Option::is_none")]
15357    pub limit: Option<i64>,
15358    #[serde(default, skip_serializing_if = "Option::is_none")]
15359    pub cursor: Option<String>,
15360}
15361
15362impl std::fmt::Display for ListByQueryCustomObjectsCustomObjectApiNameRecordsRequestBody {
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
15372#[cfg(feature = "tabled")]
15373impl tabled::Tabled for ListByQueryCustomObjectsCustomObjectApiNameRecordsRequestBody {
15374    const LENGTH: usize = 3;
15375    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15376        vec![
15377            if let Some(query) = &self.query {
15378                format!("{:?}", query).into()
15379            } else {
15380                String::new().into()
15381            },
15382            if let Some(limit) = &self.limit {
15383                format!("{:?}", limit).into()
15384            } else {
15385                String::new().into()
15386            },
15387            if let Some(cursor) = &self.cursor {
15388                format!("{:?}", cursor).into()
15389            } else {
15390                String::new().into()
15391            },
15392        ]
15393    }
15394
15395    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15396        vec!["query".into(), "limit".into(), "cursor".into()]
15397    }
15398}
15399
15400#[derive(
15401    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15402)]
15403pub struct ListByQueryCustomObjectsCustomObjectApiNameRecordsResponse {
15404    pub results: Vec<Results>,
15405    #[serde(default, skip_serializing_if = "Option::is_none")]
15406    pub cursor: Option<String>,
15407}
15408
15409impl std::fmt::Display for ListByQueryCustomObjectsCustomObjectApiNameRecordsResponse {
15410    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15411        write!(
15412            f,
15413            "{}",
15414            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15415        )
15416    }
15417}
15418
15419#[cfg(feature = "tabled")]
15420impl tabled::Tabled for ListByQueryCustomObjectsCustomObjectApiNameRecordsResponse {
15421    const LENGTH: usize = 2;
15422    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15423        vec![
15424            format!("{:?}", self.results).into(),
15425            if let Some(cursor) = &self.cursor {
15426                format!("{:?}", cursor).into()
15427            } else {
15428                String::new().into()
15429            },
15430        ]
15431    }
15432
15433    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15434        vec!["results".into(), "cursor".into()]
15435    }
15436}
15437
15438#[derive(
15439    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15440)]
15441pub struct GetCustomObjectsCustomObjectApiNameRecordsResponse {
15442    #[serde(default, skip_serializing_if = "Option::is_none")]
15443    pub name: Option<String>,
15444    #[serde(default, skip_serializing_if = "Option::is_none")]
15445    pub compnay_id: Option<String>,
15446    #[serde(default, skip_serializing_if = "Option::is_none")]
15447    pub created_at: Option<String>,
15448    #[serde(default, skip_serializing_if = "Option::is_none")]
15449    pub created_by: Option<String>,
15450    #[serde(default, skip_serializing_if = "Option::is_none")]
15451    pub custom_object: Option<String>,
15452    #[serde(default, skip_serializing_if = "Option::is_none")]
15453    pub external_id: Option<String>,
15454    #[serde(default, skip_serializing_if = "Option::is_none")]
15455    pub id: Option<String>,
15456    #[serde(default, skip_serializing_if = "Option::is_none")]
15457    pub last_modified_by: Option<String>,
15458    #[serde(default, skip_serializing_if = "Option::is_none")]
15459    pub updated_at: Option<String>,
15460    #[serde(default, skip_serializing_if = "Option::is_none")]
15461    pub owner_role: Option<String>,
15462}
15463
15464impl std::fmt::Display for GetCustomObjectsCustomObjectApiNameRecordsResponse {
15465    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15466        write!(
15467            f,
15468            "{}",
15469            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15470        )
15471    }
15472}
15473
15474#[cfg(feature = "tabled")]
15475impl tabled::Tabled for GetCustomObjectsCustomObjectApiNameRecordsResponse {
15476    const LENGTH: usize = 10;
15477    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15478        vec![
15479            if let Some(name) = &self.name {
15480                format!("{:?}", name).into()
15481            } else {
15482                String::new().into()
15483            },
15484            if let Some(compnay_id) = &self.compnay_id {
15485                format!("{:?}", compnay_id).into()
15486            } else {
15487                String::new().into()
15488            },
15489            if let Some(created_at) = &self.created_at {
15490                format!("{:?}", created_at).into()
15491            } else {
15492                String::new().into()
15493            },
15494            if let Some(created_by) = &self.created_by {
15495                format!("{:?}", created_by).into()
15496            } else {
15497                String::new().into()
15498            },
15499            if let Some(custom_object) = &self.custom_object {
15500                format!("{:?}", custom_object).into()
15501            } else {
15502                String::new().into()
15503            },
15504            if let Some(external_id) = &self.external_id {
15505                format!("{:?}", external_id).into()
15506            } else {
15507                String::new().into()
15508            },
15509            if let Some(id) = &self.id {
15510                format!("{:?}", id).into()
15511            } else {
15512                String::new().into()
15513            },
15514            if let Some(last_modified_by) = &self.last_modified_by {
15515                format!("{:?}", last_modified_by).into()
15516            } else {
15517                String::new().into()
15518            },
15519            if let Some(updated_at) = &self.updated_at {
15520                format!("{:?}", updated_at).into()
15521            } else {
15522                String::new().into()
15523            },
15524            if let Some(owner_role) = &self.owner_role {
15525                format!("{:?}", owner_role).into()
15526            } else {
15527                String::new().into()
15528            },
15529        ]
15530    }
15531
15532    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15533        vec![
15534            "name".into(),
15535            "compnay_id".into(),
15536            "created_at".into(),
15537            "created_by".into(),
15538            "custom_object".into(),
15539            "external_id".into(),
15540            "id".into(),
15541            "last_modified_by".into(),
15542            "updated_at".into(),
15543            "owner_role".into(),
15544        ]
15545    }
15546}
15547
15548#[derive(
15549    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15550)]
15551pub struct UpdateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15552    #[serde(default, skip_serializing_if = "Option::is_none")]
15553    pub name: Option<String>,
15554    #[serde(default, skip_serializing_if = "Option::is_none")]
15555    pub field_api_name: Option<String>,
15556}
15557
15558impl std::fmt::Display for UpdateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15559    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15560        write!(
15561            f,
15562            "{}",
15563            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15564        )
15565    }
15566}
15567
15568#[cfg(feature = "tabled")]
15569impl tabled::Tabled for UpdateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15570    const LENGTH: usize = 2;
15571    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15572        vec![
15573            if let Some(name) = &self.name {
15574                format!("{:?}", name).into()
15575            } else {
15576                String::new().into()
15577            },
15578            if let Some(field_api_name) = &self.field_api_name {
15579                format!("{:?}", field_api_name).into()
15580            } else {
15581                String::new().into()
15582            },
15583        ]
15584    }
15585
15586    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15587        vec!["name".into(), "field_api_name".into()]
15588    }
15589}
15590
15591#[derive(
15592    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15593)]
15594pub struct UpdateCustomObjectsCustomObjectApiNameRecordsResponse {
15595    #[serde(default, skip_serializing_if = "Option::is_none")]
15596    pub name: Option<String>,
15597    #[serde(default, skip_serializing_if = "Option::is_none")]
15598    pub compnay_id: Option<String>,
15599    #[serde(default, skip_serializing_if = "Option::is_none")]
15600    pub created_at: Option<String>,
15601    #[serde(default, skip_serializing_if = "Option::is_none")]
15602    pub created_by: Option<String>,
15603    #[serde(default, skip_serializing_if = "Option::is_none")]
15604    pub custom_object: Option<String>,
15605    #[serde(default, skip_serializing_if = "Option::is_none")]
15606    pub external_id: Option<String>,
15607    #[serde(default, skip_serializing_if = "Option::is_none")]
15608    pub id: Option<String>,
15609    #[serde(default, skip_serializing_if = "Option::is_none")]
15610    pub last_modified_by: Option<String>,
15611    #[serde(default, skip_serializing_if = "Option::is_none")]
15612    pub updated_at: Option<String>,
15613    #[serde(default, skip_serializing_if = "Option::is_none")]
15614    pub owner_role: Option<String>,
15615}
15616
15617impl std::fmt::Display for UpdateCustomObjectsCustomObjectApiNameRecordsResponse {
15618    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15619        write!(
15620            f,
15621            "{}",
15622            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15623        )
15624    }
15625}
15626
15627#[cfg(feature = "tabled")]
15628impl tabled::Tabled for UpdateCustomObjectsCustomObjectApiNameRecordsResponse {
15629    const LENGTH: usize = 10;
15630    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15631        vec![
15632            if let Some(name) = &self.name {
15633                format!("{:?}", name).into()
15634            } else {
15635                String::new().into()
15636            },
15637            if let Some(compnay_id) = &self.compnay_id {
15638                format!("{:?}", compnay_id).into()
15639            } else {
15640                String::new().into()
15641            },
15642            if let Some(created_at) = &self.created_at {
15643                format!("{:?}", created_at).into()
15644            } else {
15645                String::new().into()
15646            },
15647            if let Some(created_by) = &self.created_by {
15648                format!("{:?}", created_by).into()
15649            } else {
15650                String::new().into()
15651            },
15652            if let Some(custom_object) = &self.custom_object {
15653                format!("{:?}", custom_object).into()
15654            } else {
15655                String::new().into()
15656            },
15657            if let Some(external_id) = &self.external_id {
15658                format!("{:?}", external_id).into()
15659            } else {
15660                String::new().into()
15661            },
15662            if let Some(id) = &self.id {
15663                format!("{:?}", id).into()
15664            } else {
15665                String::new().into()
15666            },
15667            if let Some(last_modified_by) = &self.last_modified_by {
15668                format!("{:?}", last_modified_by).into()
15669            } else {
15670                String::new().into()
15671            },
15672            if let Some(updated_at) = &self.updated_at {
15673                format!("{:?}", updated_at).into()
15674            } else {
15675                String::new().into()
15676            },
15677            if let Some(owner_role) = &self.owner_role {
15678                format!("{:?}", owner_role).into()
15679            } else {
15680                String::new().into()
15681            },
15682        ]
15683    }
15684
15685    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15686        vec![
15687            "name".into(),
15688            "compnay_id".into(),
15689            "created_at".into(),
15690            "created_by".into(),
15691            "custom_object".into(),
15692            "external_id".into(),
15693            "id".into(),
15694            "last_modified_by".into(),
15695            "updated_at".into(),
15696            "owner_role".into(),
15697        ]
15698    }
15699}
15700
15701#[derive(
15702    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15703)]
15704pub struct GetCustomObjectsCustomObjectApiNameRecordsByExternalIdResponse {
15705    #[serde(default, skip_serializing_if = "Option::is_none")]
15706    pub name: Option<String>,
15707    #[serde(default, skip_serializing_if = "Option::is_none")]
15708    pub compnay_id: Option<String>,
15709    #[serde(default, skip_serializing_if = "Option::is_none")]
15710    pub created_at: Option<String>,
15711    #[serde(default, skip_serializing_if = "Option::is_none")]
15712    pub created_by: Option<String>,
15713    #[serde(default, skip_serializing_if = "Option::is_none")]
15714    pub custom_object: Option<String>,
15715    #[serde(default, skip_serializing_if = "Option::is_none")]
15716    pub external_id: Option<String>,
15717    #[serde(default, skip_serializing_if = "Option::is_none")]
15718    pub id: Option<String>,
15719    #[serde(default, skip_serializing_if = "Option::is_none")]
15720    pub last_modified_by: Option<String>,
15721    #[serde(default, skip_serializing_if = "Option::is_none")]
15722    pub updated_at: Option<String>,
15723    #[serde(default, skip_serializing_if = "Option::is_none")]
15724    pub owner_role: Option<String>,
15725}
15726
15727impl std::fmt::Display for GetCustomObjectsCustomObjectApiNameRecordsByExternalIdResponse {
15728    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15729        write!(
15730            f,
15731            "{}",
15732            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15733        )
15734    }
15735}
15736
15737#[cfg(feature = "tabled")]
15738impl tabled::Tabled for GetCustomObjectsCustomObjectApiNameRecordsByExternalIdResponse {
15739    const LENGTH: usize = 10;
15740    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15741        vec![
15742            if let Some(name) = &self.name {
15743                format!("{:?}", name).into()
15744            } else {
15745                String::new().into()
15746            },
15747            if let Some(compnay_id) = &self.compnay_id {
15748                format!("{:?}", compnay_id).into()
15749            } else {
15750                String::new().into()
15751            },
15752            if let Some(created_at) = &self.created_at {
15753                format!("{:?}", created_at).into()
15754            } else {
15755                String::new().into()
15756            },
15757            if let Some(created_by) = &self.created_by {
15758                format!("{:?}", created_by).into()
15759            } else {
15760                String::new().into()
15761            },
15762            if let Some(custom_object) = &self.custom_object {
15763                format!("{:?}", custom_object).into()
15764            } else {
15765                String::new().into()
15766            },
15767            if let Some(external_id) = &self.external_id {
15768                format!("{:?}", external_id).into()
15769            } else {
15770                String::new().into()
15771            },
15772            if let Some(id) = &self.id {
15773                format!("{:?}", id).into()
15774            } else {
15775                String::new().into()
15776            },
15777            if let Some(last_modified_by) = &self.last_modified_by {
15778                format!("{:?}", last_modified_by).into()
15779            } else {
15780                String::new().into()
15781            },
15782            if let Some(updated_at) = &self.updated_at {
15783                format!("{:?}", updated_at).into()
15784            } else {
15785                String::new().into()
15786            },
15787            if let Some(owner_role) = &self.owner_role {
15788                format!("{:?}", owner_role).into()
15789            } else {
15790                String::new().into()
15791            },
15792        ]
15793    }
15794
15795    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15796        vec![
15797            "name".into(),
15798            "compnay_id".into(),
15799            "created_at".into(),
15800            "created_by".into(),
15801            "custom_object".into(),
15802            "external_id".into(),
15803            "id".into(),
15804            "last_modified_by".into(),
15805            "updated_at".into(),
15806            "owner_role".into(),
15807        ]
15808    }
15809}
15810
15811#[derive(
15812    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15813)]
15814pub struct RowsToWrite {
15815    #[serde(default, skip_serializing_if = "Option::is_none")]
15816    pub name: Option<String>,
15817    #[serde(default, skip_serializing_if = "Option::is_none")]
15818    pub field_api_name: Option<String>,
15819}
15820
15821impl std::fmt::Display for RowsToWrite {
15822    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15823        write!(
15824            f,
15825            "{}",
15826            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15827        )
15828    }
15829}
15830
15831#[cfg(feature = "tabled")]
15832impl tabled::Tabled for RowsToWrite {
15833    const LENGTH: usize = 2;
15834    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15835        vec![
15836            if let Some(name) = &self.name {
15837                format!("{:?}", name).into()
15838            } else {
15839                String::new().into()
15840            },
15841            if let Some(field_api_name) = &self.field_api_name {
15842                format!("{:?}", field_api_name).into()
15843            } else {
15844                String::new().into()
15845            },
15846        ]
15847    }
15848
15849    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15850        vec!["name".into(), "field_api_name".into()]
15851    }
15852}
15853
15854#[derive(
15855    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15856)]
15857pub struct BulkCreateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15858    #[serde(default, skip_serializing_if = "Option::is_none")]
15859    pub rows_to_write: Option<Vec<RowsToWrite>>,
15860    #[serde(default, skip_serializing_if = "Option::is_none")]
15861    pub all_or_nothing: Option<bool>,
15862}
15863
15864impl std::fmt::Display for BulkCreateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15865    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15866        write!(
15867            f,
15868            "{}",
15869            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15870        )
15871    }
15872}
15873
15874#[cfg(feature = "tabled")]
15875impl tabled::Tabled for BulkCreateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15876    const LENGTH: usize = 2;
15877    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15878        vec![
15879            if let Some(rows_to_write) = &self.rows_to_write {
15880                format!("{:?}", rows_to_write).into()
15881            } else {
15882                String::new().into()
15883            },
15884            if let Some(all_or_nothing) = &self.all_or_nothing {
15885                format!("{:?}", all_or_nothing).into()
15886            } else {
15887                String::new().into()
15888            },
15889        ]
15890    }
15891
15892    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15893        vec!["rows_to_write".into(), "all_or_nothing".into()]
15894    }
15895}
15896
15897#[derive(
15898    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15899)]
15900pub struct BulkCreateCustomObjectsCustomObjectApiNameRecordsResponse {
15901    #[serde(default, skip_serializing_if = "Option::is_none")]
15902    pub name: Option<String>,
15903    #[serde(default, skip_serializing_if = "Option::is_none")]
15904    pub compnay_id: Option<String>,
15905    #[serde(default, skip_serializing_if = "Option::is_none")]
15906    pub created_at: Option<String>,
15907    #[serde(default, skip_serializing_if = "Option::is_none")]
15908    pub created_by: Option<String>,
15909    #[serde(default, skip_serializing_if = "Option::is_none")]
15910    pub custom_object: Option<String>,
15911    #[serde(default, skip_serializing_if = "Option::is_none")]
15912    pub external_id: Option<String>,
15913    #[serde(default, skip_serializing_if = "Option::is_none")]
15914    pub id: Option<String>,
15915    #[serde(default, skip_serializing_if = "Option::is_none")]
15916    pub last_modified_by: Option<String>,
15917    #[serde(default, skip_serializing_if = "Option::is_none")]
15918    pub updated_at: Option<String>,
15919    #[serde(default, skip_serializing_if = "Option::is_none")]
15920    pub owner_role: Option<String>,
15921}
15922
15923impl std::fmt::Display for BulkCreateCustomObjectsCustomObjectApiNameRecordsResponse {
15924    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15925        write!(
15926            f,
15927            "{}",
15928            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15929        )
15930    }
15931}
15932
15933#[cfg(feature = "tabled")]
15934impl tabled::Tabled for BulkCreateCustomObjectsCustomObjectApiNameRecordsResponse {
15935    const LENGTH: usize = 10;
15936    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15937        vec![
15938            if let Some(name) = &self.name {
15939                format!("{:?}", name).into()
15940            } else {
15941                String::new().into()
15942            },
15943            if let Some(compnay_id) = &self.compnay_id {
15944                format!("{:?}", compnay_id).into()
15945            } else {
15946                String::new().into()
15947            },
15948            if let Some(created_at) = &self.created_at {
15949                format!("{:?}", created_at).into()
15950            } else {
15951                String::new().into()
15952            },
15953            if let Some(created_by) = &self.created_by {
15954                format!("{:?}", created_by).into()
15955            } else {
15956                String::new().into()
15957            },
15958            if let Some(custom_object) = &self.custom_object {
15959                format!("{:?}", custom_object).into()
15960            } else {
15961                String::new().into()
15962            },
15963            if let Some(external_id) = &self.external_id {
15964                format!("{:?}", external_id).into()
15965            } else {
15966                String::new().into()
15967            },
15968            if let Some(id) = &self.id {
15969                format!("{:?}", id).into()
15970            } else {
15971                String::new().into()
15972            },
15973            if let Some(last_modified_by) = &self.last_modified_by {
15974                format!("{:?}", last_modified_by).into()
15975            } else {
15976                String::new().into()
15977            },
15978            if let Some(updated_at) = &self.updated_at {
15979                format!("{:?}", updated_at).into()
15980            } else {
15981                String::new().into()
15982            },
15983            if let Some(owner_role) = &self.owner_role {
15984                format!("{:?}", owner_role).into()
15985            } else {
15986                String::new().into()
15987            },
15988        ]
15989    }
15990
15991    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15992        vec![
15993            "name".into(),
15994            "compnay_id".into(),
15995            "created_at".into(),
15996            "created_by".into(),
15997            "custom_object".into(),
15998            "external_id".into(),
15999            "id".into(),
16000            "last_modified_by".into(),
16001            "updated_at".into(),
16002            "owner_role".into(),
16003        ]
16004    }
16005}
16006
16007#[derive(
16008    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16009)]
16010pub struct BulkDeleteCustomObjectsCustomObjectApiNameRecordsRequestBody {
16011    #[doc = "a list of ids, e.g. [id_1, id_2]."]
16012    #[serde(default, skip_serializing_if = "Option::is_none")]
16013    pub rows_to_delete: Option<String>,
16014    #[serde(default, skip_serializing_if = "Option::is_none")]
16015    pub all_or_nothing: Option<bool>,
16016}
16017
16018impl std::fmt::Display for BulkDeleteCustomObjectsCustomObjectApiNameRecordsRequestBody {
16019    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16020        write!(
16021            f,
16022            "{}",
16023            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16024        )
16025    }
16026}
16027
16028#[cfg(feature = "tabled")]
16029impl tabled::Tabled for BulkDeleteCustomObjectsCustomObjectApiNameRecordsRequestBody {
16030    const LENGTH: usize = 2;
16031    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
16032        vec![
16033            if let Some(rows_to_delete) = &self.rows_to_delete {
16034                format!("{:?}", rows_to_delete).into()
16035            } else {
16036                String::new().into()
16037            },
16038            if let Some(all_or_nothing) = &self.all_or_nothing {
16039                format!("{:?}", all_or_nothing).into()
16040            } else {
16041                String::new().into()
16042            },
16043        ]
16044    }
16045
16046    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
16047        vec!["rows_to_delete".into(), "all_or_nothing".into()]
16048    }
16049}
16050
16051#[derive(
16052    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16053)]
16054pub struct RowsToUpdate {
16055    #[serde(default, skip_serializing_if = "Option::is_none")]
16056    pub name: Option<String>,
16057    #[serde(default, skip_serializing_if = "Option::is_none")]
16058    pub field_api_name: Option<String>,
16059}
16060
16061impl std::fmt::Display for RowsToUpdate {
16062    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16063        write!(
16064            f,
16065            "{}",
16066            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16067        )
16068    }
16069}
16070
16071#[cfg(feature = "tabled")]
16072impl tabled::Tabled for RowsToUpdate {
16073    const LENGTH: usize = 2;
16074    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
16075        vec![
16076            if let Some(name) = &self.name {
16077                format!("{:?}", name).into()
16078            } else {
16079                String::new().into()
16080            },
16081            if let Some(field_api_name) = &self.field_api_name {
16082                format!("{:?}", field_api_name).into()
16083            } else {
16084                String::new().into()
16085            },
16086        ]
16087    }
16088
16089    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
16090        vec!["name".into(), "field_api_name".into()]
16091    }
16092}
16093
16094#[derive(
16095    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16096)]
16097pub struct BulkUpdateCustomObjectsCustomObjectApiNameRecordsRequestBody {
16098    #[serde(default, skip_serializing_if = "Option::is_none")]
16099    pub rows_to_update: Option<Vec<RowsToUpdate>>,
16100    #[serde(default, skip_serializing_if = "Option::is_none")]
16101    pub all_or_nothing: Option<bool>,
16102}
16103
16104impl std::fmt::Display for BulkUpdateCustomObjectsCustomObjectApiNameRecordsRequestBody {
16105    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16106        write!(
16107            f,
16108            "{}",
16109            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16110        )
16111    }
16112}
16113
16114#[cfg(feature = "tabled")]
16115impl tabled::Tabled for BulkUpdateCustomObjectsCustomObjectApiNameRecordsRequestBody {
16116    const LENGTH: usize = 2;
16117    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
16118        vec![
16119            if let Some(rows_to_update) = &self.rows_to_update {
16120                format!("{:?}", rows_to_update).into()
16121            } else {
16122                String::new().into()
16123            },
16124            if let Some(all_or_nothing) = &self.all_or_nothing {
16125                format!("{:?}", all_or_nothing).into()
16126            } else {
16127                String::new().into()
16128            },
16129        ]
16130    }
16131
16132    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
16133        vec!["rows_to_update".into(), "all_or_nothing".into()]
16134    }
16135}
16136
16137#[derive(
16138    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16139)]
16140pub struct BulkUpdateCustomObjectsCustomObjectApiNameRecordsResponse {
16141    #[serde(default, skip_serializing_if = "Option::is_none")]
16142    pub name: Option<String>,
16143    #[serde(default, skip_serializing_if = "Option::is_none")]
16144    pub compnay_id: Option<String>,
16145    #[serde(default, skip_serializing_if = "Option::is_none")]
16146    pub created_at: Option<String>,
16147    #[serde(default, skip_serializing_if = "Option::is_none")]
16148    pub created_by: Option<String>,
16149    #[serde(default, skip_serializing_if = "Option::is_none")]
16150    pub custom_object: Option<String>,
16151    #[serde(default, skip_serializing_if = "Option::is_none")]
16152    pub external_id: Option<String>,
16153    #[serde(default, skip_serializing_if = "Option::is_none")]
16154    pub id: Option<String>,
16155    #[serde(default, skip_serializing_if = "Option::is_none")]
16156    pub last_modified_by: Option<String>,
16157    #[serde(default, skip_serializing_if = "Option::is_none")]
16158    pub updated_at: Option<String>,
16159    #[serde(default, skip_serializing_if = "Option::is_none")]
16160    pub owner_role: Option<String>,
16161}
16162
16163impl std::fmt::Display for BulkUpdateCustomObjectsCustomObjectApiNameRecordsResponse {
16164    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16165        write!(
16166            f,
16167            "{}",
16168            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16169        )
16170    }
16171}
16172
16173#[cfg(feature = "tabled")]
16174impl tabled::Tabled for BulkUpdateCustomObjectsCustomObjectApiNameRecordsResponse {
16175    const LENGTH: usize = 10;
16176    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
16177        vec![
16178            if let Some(name) = &self.name {
16179                format!("{:?}", name).into()
16180            } else {
16181                String::new().into()
16182            },
16183            if let Some(compnay_id) = &self.compnay_id {
16184                format!("{:?}", compnay_id).into()
16185            } else {
16186                String::new().into()
16187            },
16188            if let Some(created_at) = &self.created_at {
16189                format!("{:?}", created_at).into()
16190            } else {
16191                String::new().into()
16192            },
16193            if let Some(created_by) = &self.created_by {
16194                format!("{:?}", created_by).into()
16195            } else {
16196                String::new().into()
16197            },
16198            if let Some(custom_object) = &self.custom_object {
16199                format!("{:?}", custom_object).into()
16200            } else {
16201                String::new().into()
16202            },
16203            if let Some(external_id) = &self.external_id {
16204                format!("{:?}", external_id).into()
16205            } else {
16206                String::new().into()
16207            },
16208            if let Some(id) = &self.id {
16209                format!("{:?}", id).into()
16210            } else {
16211                String::new().into()
16212            },
16213            if let Some(last_modified_by) = &self.last_modified_by {
16214                format!("{:?}", last_modified_by).into()
16215            } else {
16216                String::new().into()
16217            },
16218            if let Some(updated_at) = &self.updated_at {
16219                format!("{:?}", updated_at).into()
16220            } else {
16221                String::new().into()
16222            },
16223            if let Some(owner_role) = &self.owner_role {
16224                format!("{:?}", owner_role).into()
16225            } else {
16226                String::new().into()
16227            },
16228        ]
16229    }
16230
16231    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
16232        vec![
16233            "name".into(),
16234            "compnay_id".into(),
16235            "created_at".into(),
16236            "created_by".into(),
16237            "custom_object".into(),
16238            "external_id".into(),
16239            "id".into(),
16240            "last_modified_by".into(),
16241            "updated_at".into(),
16242            "owner_role".into(),
16243        ]
16244    }
16245}