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<'de> Visitor<'de> 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    #[doc = " An attachement to a multipart form."]
140    #[derive(Debug, Clone, PartialEq, Eq, Hash)]
141    pub struct Attachment {
142        #[doc = " The name of the field."]
143        pub name: String,
144        #[doc = " The filename of the attachment."]
145        pub filename: Option<String>,
146        #[doc = " The content type of the attachment."]
147        pub content_type: Option<String>,
148        #[doc = " The data of the attachment."]
149        pub data: Vec<u8>,
150    }
151
152    impl std::convert::TryFrom<Attachment> for reqwest::multipart::Part {
153        type Error = reqwest::Error;
154        fn try_from(attachment: Attachment) -> Result<Self, Self::Error> {
155            let mut part = reqwest::multipart::Part::bytes(attachment.data);
156            if let Some(filename) = attachment.filename {
157                part = part.file_name(filename);
158            }
159            if let Some(content_type) = attachment.content_type {
160                part = part.mime_str(&content_type)?;
161            }
162            Ok(part)
163        }
164    }
165
166    impl std::convert::TryFrom<std::path::PathBuf> for Attachment {
167        type Error = std::io::Error;
168        fn try_from(path: std::path::PathBuf) -> Result<Self, Self::Error> {
169            let filename = path
170                .file_name()
171                .ok_or_else(|| {
172                    std::io::Error::new(std::io::ErrorKind::InvalidData, "invalid filename")
173                })?
174                .to_str()
175                .ok_or_else(|| {
176                    std::io::Error::new(std::io::ErrorKind::InvalidData, "invalid filename")
177                })?
178                .to_string();
179            let content_type = mime_guess::from_path(&path).first_raw();
180            let data = std::fs::read(path)?;
181            Ok(Attachment {
182                name: "file".to_string(),
183                filename: Some(filename),
184                content_type: content_type.map(|s| s.to_string()),
185                data,
186            })
187        }
188    }
189}
190
191#[cfg(feature = "requests")]
192pub mod paginate {
193    #![doc = " Utility functions used for pagination."]
194    use anyhow::Result;
195    #[doc = " A trait for types that allow pagination."]
196    pub trait Pagination {
197        #[doc = " The item that is paginated."]
198        type Item: serde::de::DeserializeOwned;
199        #[doc = " Returns true if the response has more pages."]
200        fn has_more_pages(&self) -> bool;
201        #[doc = " Returns the next page token."]
202        fn next_page_token(&self) -> Option<String>;
203        #[doc = " Modify a request to get the next page."]
204        fn next_page(
205            &self,
206            req: reqwest::Request,
207        ) -> Result<reqwest::Request, crate::types::error::Error>;
208        #[doc = " Get the items from a page."]
209        fn items(&self) -> Vec<Self::Item>;
210    }
211}
212
213pub mod phone_number {
214    #![doc = " A library to implement phone numbers for our database and JSON serialization and \
215              deserialization."]
216    use std::str::FromStr;
217
218    use schemars::JsonSchema;
219    #[doc = " A phone number."]
220    #[derive(Debug, Default, Clone, PartialEq, Hash, Eq)]
221    pub struct PhoneNumber(pub Option<phonenumber::PhoneNumber>);
222    impl From<phonenumber::PhoneNumber> for PhoneNumber {
223        fn from(id: phonenumber::PhoneNumber) -> PhoneNumber {
224            PhoneNumber(Some(id))
225        }
226    }
227
228    impl AsRef<Option<phonenumber::PhoneNumber>> for PhoneNumber {
229        fn as_ref(&self) -> &Option<phonenumber::PhoneNumber> {
230            &self.0
231        }
232    }
233
234    impl std::ops::Deref for PhoneNumber {
235        type Target = Option<phonenumber::PhoneNumber>;
236        fn deref(&self) -> &Self::Target {
237            &self.0
238        }
239    }
240
241    impl serde::ser::Serialize for PhoneNumber {
242        fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
243        where
244            S: serde::ser::Serializer,
245        {
246            serializer.serialize_str(&self.to_string())
247        }
248    }
249
250    impl<'de> serde::de::Deserialize<'de> for PhoneNumber {
251        fn deserialize<D>(deserializer: D) -> Result<PhoneNumber, D::Error>
252        where
253            D: serde::de::Deserializer<'de>,
254        {
255            let s = String::deserialize(deserializer).unwrap_or_default();
256            PhoneNumber::from_str(&s).map_err(serde::de::Error::custom)
257        }
258    }
259
260    impl std::str::FromStr for PhoneNumber {
261        type Err = anyhow::Error;
262        fn from_str(s: &str) -> Result<Self, Self::Err> {
263            if s.trim().is_empty() {
264                return Ok(PhoneNumber(None));
265            }
266            let s = if !s.trim().starts_with('+') {
267                format!("+1{s}")
268            } else {
269                s.to_string()
270            }
271            .replace(['-', '(', ')', ' '], "");
272            Ok(PhoneNumber(Some(phonenumber::parse(None, &s).map_err(
273                |e| anyhow::anyhow!("invalid phone number `{}`: {}", s, e),
274            )?)))
275        }
276    }
277
278    impl std::fmt::Display for PhoneNumber {
279        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
280            let s = if let Some(phone) = &self.0 {
281                phone
282                    .format()
283                    .mode(phonenumber::Mode::International)
284                    .to_string()
285            } else {
286                String::new()
287            };
288            write!(f, "{}", s)
289        }
290    }
291
292    impl JsonSchema for PhoneNumber {
293        fn schema_name() -> String {
294            "PhoneNumber".to_string()
295        }
296
297        fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
298            let mut obj = gen.root_schema_for::<String>().schema;
299            obj.format = Some("phone".to_string());
300            schemars::schema::Schema::Object(obj)
301        }
302
303        fn is_referenceable() -> bool {
304            false
305        }
306    }
307
308    #[cfg(test)]
309    mod test {
310        use pretty_assertions::assert_eq;
311
312        use super::PhoneNumber;
313        #[test]
314        fn test_parse_phone_number() {
315            let mut phone = "+1-555-555-5555";
316            let mut phone_parsed: PhoneNumber =
317                serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
318            let mut expected = PhoneNumber(Some(phonenumber::parse(None, phone).unwrap()));
319            assert_eq!(phone_parsed, expected);
320            let mut expected_str = "+1 555-555-5555";
321            assert_eq!(expected_str, serde_json::json!(phone_parsed));
322            phone = "555-555-5555";
323            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
324            assert_eq!(phone_parsed, expected);
325            assert_eq!(expected_str, serde_json::json!(phone_parsed));
326            phone = "+1 555-555-5555";
327            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
328            assert_eq!(phone_parsed, expected);
329            assert_eq!(expected_str, serde_json::json!(phone_parsed));
330            phone = "5555555555";
331            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
332            assert_eq!(phone_parsed, expected);
333            assert_eq!(expected_str, serde_json::json!(phone_parsed));
334            phone = "(510) 864-1234";
335            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
336            expected = PhoneNumber(Some(phonenumber::parse(None, "+15108641234").unwrap()));
337            assert_eq!(phone_parsed, expected);
338            expected_str = "+1 510-864-1234";
339            assert_eq!(expected_str, serde_json::json!(phone_parsed));
340            phone = "(510)8641234";
341            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
342            assert_eq!(phone_parsed, expected);
343            expected_str = "+1 510-864-1234";
344            assert_eq!(expected_str, serde_json::json!(phone_parsed));
345            phone = "";
346            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
347            assert_eq!(phone_parsed, PhoneNumber(None));
348            assert_eq!("", serde_json::json!(phone_parsed));
349            phone = "+49 30  1234 1234";
350            phone_parsed = serde_json::from_str(&format!(r#""{}""#, phone)).unwrap();
351            expected = PhoneNumber(Some(phonenumber::parse(None, phone).unwrap()));
352            assert_eq!(phone_parsed, expected);
353            expected_str = "+49 30 12341234";
354            assert_eq!(expected_str, serde_json::json!(phone_parsed));
355        }
356    }
357}
358
359#[cfg(feature = "requests")]
360pub mod error {
361    #![doc = " Error methods."]
362    #[doc = " Error produced by generated client methods."]
363    pub enum Error {
364        #[doc = " The request did not conform to API requirements."]
365        InvalidRequest(String),
366        #[cfg(feature = "retry")]
367        #[doc = " A server error either due to the data, or with the connection."]
368        CommunicationError(reqwest_middleware::Error),
369        #[doc = " A request error, caused when building the request."]
370        RequestError(reqwest::Error),
371        #[doc = " An expected response whose deserialization failed."]
372        SerdeError {
373            #[doc = " The error."]
374            error: format_serde_error::SerdeError,
375            #[doc = " The response status."]
376            status: reqwest::StatusCode,
377        },
378        #[doc = " An expected error response."]
379        InvalidResponsePayload {
380            #[cfg(feature = "retry")]
381            #[doc = " The error."]
382            error: reqwest_middleware::Error,
383            #[cfg(not(feature = "retry"))]
384            #[doc = " The error."]
385            error: reqwest::Error,
386            #[doc = " The full response."]
387            response: reqwest::Response,
388        },
389        #[doc = " An error from the server."]
390        Server {
391            #[doc = " The text from the body."]
392            body: String,
393            #[doc = " The response status."]
394            status: reqwest::StatusCode,
395        },
396        #[doc = " A response not listed in the API description. This may represent a"]
397        #[doc = " success or failure response; check `status().is_success()`."]
398        UnexpectedResponse(reqwest::Response),
399    }
400
401    impl Error {
402        #[doc = " Returns the status code, if the error was generated from a response."]
403        pub fn status(&self) -> Option<reqwest::StatusCode> {
404            match self {
405                Error::InvalidRequest(_) => None,
406                Error::RequestError(e) => e.status(),
407                #[cfg(feature = "retry")]
408                Error::CommunicationError(reqwest_middleware::Error::Reqwest(e)) => e.status(),
409                #[cfg(feature = "retry")]
410                Error::CommunicationError(reqwest_middleware::Error::Middleware(_)) => None,
411                Error::SerdeError { error: _, status } => Some(*status),
412                Error::InvalidResponsePayload { error: _, response } => Some(response.status()),
413                Error::Server { body: _, status } => Some(*status),
414                Error::UnexpectedResponse(r) => Some(r.status()),
415            }
416        }
417
418        #[doc = " Creates a new error from a response status and a serde error."]
419        pub fn from_serde_error(
420            e: format_serde_error::SerdeError,
421            status: reqwest::StatusCode,
422        ) -> Self {
423            Self::SerdeError { error: e, status }
424        }
425    }
426
427    #[cfg(feature = "retry")]
428    impl From<reqwest_middleware::Error> for Error {
429        fn from(e: reqwest_middleware::Error) -> Self {
430            Self::CommunicationError(e)
431        }
432    }
433
434    impl From<reqwest::Error> for Error {
435        fn from(e: reqwest::Error) -> Self {
436            Self::RequestError(e)
437        }
438    }
439
440    impl From<serde_json::Error> for Error {
441        fn from(e: serde_json::Error) -> Self {
442            Self::SerdeError {
443                error: format_serde_error::SerdeError::new(String::new(), e),
444                status: reqwest::StatusCode::INTERNAL_SERVER_ERROR,
445            }
446        }
447    }
448
449    impl std::fmt::Display for Error {
450        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
451            match self {
452                Error::InvalidRequest(s) => {
453                    write!(f, "Invalid Request: {}", s)
454                }
455                #[cfg(feature = "retry")]
456                Error::CommunicationError(e) => {
457                    write!(f, "Communication Error: {}", e)
458                }
459                Error::RequestError(e) => {
460                    write!(f, "Request Error: {}", e)
461                }
462                Error::SerdeError { error, status: _ } => {
463                    write!(f, "Serde Error: {}", error)
464                }
465                Error::InvalidResponsePayload { error, response: _ } => {
466                    write!(f, "Invalid Response Payload: {}", error)
467                }
468                Error::Server { body, status } => {
469                    write!(f, "Server Error: {} {}", status, body)
470                }
471                Error::UnexpectedResponse(r) => {
472                    write!(f, "Unexpected Response: {:?}", r)
473                }
474            }
475        }
476    }
477
478    impl std::fmt::Debug for Error {
479        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
480            std::fmt::Display::fmt(self, f)
481        }
482    }
483
484    impl std::error::Error for Error {
485        fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
486            match self {
487                #[cfg(feature = "retry")]
488                Error::CommunicationError(e) => Some(e),
489                Error::SerdeError { error, status: _ } => Some(error),
490                Error::InvalidResponsePayload { error, response: _ } => Some(error),
491                _ => None,
492            }
493        }
494    }
495}
496
497#[doc = "The classification of the address."]
498#[derive(
499    serde :: Serialize,
500    serde :: Deserialize,
501    PartialEq,
502    Hash,
503    Debug,
504    Clone,
505    schemars :: JsonSchema,
506    parse_display :: FromStr,
507    parse_display :: Display,
508)]
509#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
510#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
511pub enum Type {
512    #[serde(rename = "HOME")]
513    #[display("HOME")]
514    Home,
515    #[serde(rename = "WORK")]
516    #[display("WORK")]
517    Work,
518    #[serde(rename = "OTHER")]
519    #[display("OTHER")]
520    Other,
521}
522
523#[doc = "The country component, pursuant to SCIM RFC 7643 4.1.2."]
524#[derive(
525    serde :: Serialize,
526    serde :: Deserialize,
527    PartialEq,
528    Hash,
529    Debug,
530    Clone,
531    schemars :: JsonSchema,
532    parse_display :: FromStr,
533    parse_display :: Display,
534)]
535#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
536#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
537pub enum AddressCountry {
538    #[serde(rename = "AF")]
539    #[display("AF")]
540    Af,
541    #[serde(rename = "AX")]
542    #[display("AX")]
543    Ax,
544    #[serde(rename = "AL")]
545    #[display("AL")]
546    Al,
547    #[serde(rename = "DZ")]
548    #[display("DZ")]
549    Dz,
550    #[serde(rename = "AS")]
551    #[display("AS")]
552    As,
553    #[serde(rename = "AD")]
554    #[display("AD")]
555    Ad,
556    #[serde(rename = "AO")]
557    #[display("AO")]
558    Ao,
559    #[serde(rename = "AI")]
560    #[display("AI")]
561    Ai,
562    #[serde(rename = "AQ")]
563    #[display("AQ")]
564    Aq,
565    #[serde(rename = "AG")]
566    #[display("AG")]
567    Ag,
568    #[serde(rename = "AR")]
569    #[display("AR")]
570    Ar,
571    #[serde(rename = "AM")]
572    #[display("AM")]
573    Am,
574    #[serde(rename = "AW")]
575    #[display("AW")]
576    Aw,
577    #[serde(rename = "AU")]
578    #[display("AU")]
579    Au,
580    #[serde(rename = "AT")]
581    #[display("AT")]
582    At,
583    #[serde(rename = "AZ")]
584    #[display("AZ")]
585    Az,
586    #[serde(rename = "BS")]
587    #[display("BS")]
588    Bs,
589    #[serde(rename = "BH")]
590    #[display("BH")]
591    Bh,
592    #[serde(rename = "BD")]
593    #[display("BD")]
594    Bd,
595    #[serde(rename = "BB")]
596    #[display("BB")]
597    Bb,
598    #[serde(rename = "BY")]
599    #[display("BY")]
600    By,
601    #[serde(rename = "BE")]
602    #[display("BE")]
603    Be,
604    #[serde(rename = "BZ")]
605    #[display("BZ")]
606    Bz,
607    #[serde(rename = "BJ")]
608    #[display("BJ")]
609    Bj,
610    #[serde(rename = "BM")]
611    #[display("BM")]
612    Bm,
613    #[serde(rename = "BT")]
614    #[display("BT")]
615    Bt,
616    #[serde(rename = "BO")]
617    #[display("BO")]
618    Bo,
619    #[serde(rename = "BQ")]
620    #[display("BQ")]
621    Bq,
622    #[serde(rename = "BA")]
623    #[display("BA")]
624    Ba,
625    #[serde(rename = "BW")]
626    #[display("BW")]
627    Bw,
628    #[serde(rename = "BV")]
629    #[display("BV")]
630    Bv,
631    #[serde(rename = "BR")]
632    #[display("BR")]
633    Br,
634    #[serde(rename = "IO")]
635    #[display("IO")]
636    Io,
637    #[serde(rename = "BN")]
638    #[display("BN")]
639    Bn,
640    #[serde(rename = "BG")]
641    #[display("BG")]
642    Bg,
643    #[serde(rename = "BF")]
644    #[display("BF")]
645    Bf,
646    #[serde(rename = "BI")]
647    #[display("BI")]
648    Bi,
649    #[serde(rename = "CV")]
650    #[display("CV")]
651    Cv,
652    #[serde(rename = "KH")]
653    #[display("KH")]
654    Kh,
655    #[serde(rename = "CM")]
656    #[display("CM")]
657    Cm,
658    #[serde(rename = "CA")]
659    #[display("CA")]
660    Ca,
661    #[serde(rename = "KY")]
662    #[display("KY")]
663    Ky,
664    #[serde(rename = "CF")]
665    #[display("CF")]
666    Cf,
667    #[serde(rename = "TD")]
668    #[display("TD")]
669    Td,
670    #[serde(rename = "CL")]
671    #[display("CL")]
672    Cl,
673    #[serde(rename = "CN")]
674    #[display("CN")]
675    Cn,
676    #[serde(rename = "CX")]
677    #[display("CX")]
678    Cx,
679    #[serde(rename = "CC")]
680    #[display("CC")]
681    Cc,
682    #[serde(rename = "CO")]
683    #[display("CO")]
684    Co,
685    #[serde(rename = "KM")]
686    #[display("KM")]
687    Km,
688    #[serde(rename = "CG")]
689    #[display("CG")]
690    Cg,
691    #[serde(rename = "CD")]
692    #[display("CD")]
693    Cd,
694    #[serde(rename = "CK")]
695    #[display("CK")]
696    Ck,
697    #[serde(rename = "CR")]
698    #[display("CR")]
699    Cr,
700    #[serde(rename = "CI")]
701    #[display("CI")]
702    Ci,
703    #[serde(rename = "HR")]
704    #[display("HR")]
705    Hr,
706    #[serde(rename = "CW")]
707    #[display("CW")]
708    Cw,
709    #[serde(rename = "CY")]
710    #[display("CY")]
711    Cy,
712    #[serde(rename = "CZ")]
713    #[display("CZ")]
714    Cz,
715    #[serde(rename = "DK")]
716    #[display("DK")]
717    Dk,
718    #[serde(rename = "DJ")]
719    #[display("DJ")]
720    Dj,
721    #[serde(rename = "DM")]
722    #[display("DM")]
723    Dm,
724    #[serde(rename = "DO")]
725    #[display("DO")]
726    Do,
727    #[serde(rename = "EC")]
728    #[display("EC")]
729    Ec,
730    #[serde(rename = "EG")]
731    #[display("EG")]
732    Eg,
733    #[serde(rename = "SV")]
734    #[display("SV")]
735    Sv,
736    #[serde(rename = "GQ")]
737    #[display("GQ")]
738    Gq,
739    #[serde(rename = "ER")]
740    #[display("ER")]
741    Er,
742    #[serde(rename = "EE")]
743    #[display("EE")]
744    Ee,
745    #[serde(rename = "SZ")]
746    #[display("SZ")]
747    Sz,
748    #[serde(rename = "ET")]
749    #[display("ET")]
750    Et,
751    #[serde(rename = "FK")]
752    #[display("FK")]
753    Fk,
754    #[serde(rename = "FO")]
755    #[display("FO")]
756    Fo,
757    #[serde(rename = "FJ")]
758    #[display("FJ")]
759    Fj,
760    #[serde(rename = "FI")]
761    #[display("FI")]
762    Fi,
763    #[serde(rename = "FR")]
764    #[display("FR")]
765    Fr,
766    #[serde(rename = "GF")]
767    #[display("GF")]
768    Gf,
769    #[serde(rename = "PF")]
770    #[display("PF")]
771    Pf,
772    #[serde(rename = "TF")]
773    #[display("TF")]
774    Tf,
775    #[serde(rename = "GA")]
776    #[display("GA")]
777    Ga,
778    #[serde(rename = "GM")]
779    #[display("GM")]
780    Gm,
781    #[serde(rename = "GE")]
782    #[display("GE")]
783    Ge,
784    #[serde(rename = "DE")]
785    #[display("DE")]
786    De,
787    #[serde(rename = "GH")]
788    #[display("GH")]
789    Gh,
790    #[serde(rename = "GI")]
791    #[display("GI")]
792    Gi,
793    #[serde(rename = "GR")]
794    #[display("GR")]
795    Gr,
796    #[serde(rename = "GL")]
797    #[display("GL")]
798    Gl,
799    #[serde(rename = "GD")]
800    #[display("GD")]
801    Gd,
802    #[serde(rename = "GP")]
803    #[display("GP")]
804    Gp,
805    #[serde(rename = "GU")]
806    #[display("GU")]
807    Gu,
808    #[serde(rename = "GT")]
809    #[display("GT")]
810    Gt,
811    #[serde(rename = "GG")]
812    #[display("GG")]
813    Gg,
814    #[serde(rename = "GN")]
815    #[display("GN")]
816    Gn,
817    #[serde(rename = "GW")]
818    #[display("GW")]
819    Gw,
820    #[serde(rename = "GY")]
821    #[display("GY")]
822    Gy,
823    #[serde(rename = "HT")]
824    #[display("HT")]
825    Ht,
826    #[serde(rename = "HM")]
827    #[display("HM")]
828    Hm,
829    #[serde(rename = "VA")]
830    #[display("VA")]
831    Va,
832    #[serde(rename = "HN")]
833    #[display("HN")]
834    Hn,
835    #[serde(rename = "HK")]
836    #[display("HK")]
837    Hk,
838    #[serde(rename = "HU")]
839    #[display("HU")]
840    Hu,
841    #[serde(rename = "IS")]
842    #[display("IS")]
843    Is,
844    #[serde(rename = "IN")]
845    #[display("IN")]
846    In,
847    #[serde(rename = "ID")]
848    #[display("ID")]
849    Id,
850    #[serde(rename = "IQ")]
851    #[display("IQ")]
852    Iq,
853    #[serde(rename = "IE")]
854    #[display("IE")]
855    Ie,
856    #[serde(rename = "IM")]
857    #[display("IM")]
858    Im,
859    #[serde(rename = "IL")]
860    #[display("IL")]
861    Il,
862    #[serde(rename = "IT")]
863    #[display("IT")]
864    It,
865    #[serde(rename = "JM")]
866    #[display("JM")]
867    Jm,
868    #[serde(rename = "JP")]
869    #[display("JP")]
870    Jp,
871    #[serde(rename = "JE")]
872    #[display("JE")]
873    Je,
874    #[serde(rename = "JO")]
875    #[display("JO")]
876    Jo,
877    #[serde(rename = "KZ")]
878    #[display("KZ")]
879    Kz,
880    #[serde(rename = "KE")]
881    #[display("KE")]
882    Ke,
883    #[serde(rename = "KI")]
884    #[display("KI")]
885    Ki,
886    #[serde(rename = "KR")]
887    #[display("KR")]
888    Kr,
889    #[serde(rename = "XK")]
890    #[display("XK")]
891    Xk,
892    #[serde(rename = "KW")]
893    #[display("KW")]
894    Kw,
895    #[serde(rename = "KG")]
896    #[display("KG")]
897    Kg,
898    #[serde(rename = "LA")]
899    #[display("LA")]
900    La,
901    #[serde(rename = "LV")]
902    #[display("LV")]
903    Lv,
904    #[serde(rename = "LB")]
905    #[display("LB")]
906    Lb,
907    #[serde(rename = "LS")]
908    #[display("LS")]
909    Ls,
910    #[serde(rename = "LR")]
911    #[display("LR")]
912    Lr,
913    #[serde(rename = "LY")]
914    #[display("LY")]
915    Ly,
916    #[serde(rename = "LI")]
917    #[display("LI")]
918    Li,
919    #[serde(rename = "LT")]
920    #[display("LT")]
921    Lt,
922    #[serde(rename = "LU")]
923    #[display("LU")]
924    Lu,
925    #[serde(rename = "MO")]
926    #[display("MO")]
927    Mo,
928    #[serde(rename = "MG")]
929    #[display("MG")]
930    Mg,
931    #[serde(rename = "MW")]
932    #[display("MW")]
933    Mw,
934    #[serde(rename = "MY")]
935    #[display("MY")]
936    My,
937    #[serde(rename = "MV")]
938    #[display("MV")]
939    Mv,
940    #[serde(rename = "ML")]
941    #[display("ML")]
942    Ml,
943    #[serde(rename = "MT")]
944    #[display("MT")]
945    Mt,
946    #[serde(rename = "MH")]
947    #[display("MH")]
948    Mh,
949    #[serde(rename = "MQ")]
950    #[display("MQ")]
951    Mq,
952    #[serde(rename = "MR")]
953    #[display("MR")]
954    Mr,
955    #[serde(rename = "MU")]
956    #[display("MU")]
957    Mu,
958    #[serde(rename = "YT")]
959    #[display("YT")]
960    Yt,
961    #[serde(rename = "MX")]
962    #[display("MX")]
963    Mx,
964    #[serde(rename = "FM")]
965    #[display("FM")]
966    Fm,
967    #[serde(rename = "MD")]
968    #[display("MD")]
969    Md,
970    #[serde(rename = "MC")]
971    #[display("MC")]
972    Mc,
973    #[serde(rename = "MN")]
974    #[display("MN")]
975    Mn,
976    #[serde(rename = "ME")]
977    #[display("ME")]
978    Me,
979    #[serde(rename = "MS")]
980    #[display("MS")]
981    Ms,
982    #[serde(rename = "MA")]
983    #[display("MA")]
984    Ma,
985    #[serde(rename = "MZ")]
986    #[display("MZ")]
987    Mz,
988    #[serde(rename = "MM")]
989    #[display("MM")]
990    Mm,
991    #[serde(rename = "NA")]
992    #[display("NA")]
993    Na,
994    #[serde(rename = "NR")]
995    #[display("NR")]
996    Nr,
997    #[serde(rename = "NP")]
998    #[display("NP")]
999    Np,
1000    #[serde(rename = "NL")]
1001    #[display("NL")]
1002    Nl,
1003    #[serde(rename = "AN")]
1004    #[display("AN")]
1005    An,
1006    #[serde(rename = "NC")]
1007    #[display("NC")]
1008    Nc,
1009    #[serde(rename = "NZ")]
1010    #[display("NZ")]
1011    Nz,
1012    #[serde(rename = "NI")]
1013    #[display("NI")]
1014    Ni,
1015    #[serde(rename = "NE")]
1016    #[display("NE")]
1017    Ne,
1018    #[serde(rename = "NG")]
1019    #[display("NG")]
1020    Ng,
1021    #[serde(rename = "NU")]
1022    #[display("NU")]
1023    Nu,
1024    #[serde(rename = "NF")]
1025    #[display("NF")]
1026    Nf,
1027    #[serde(rename = "MK")]
1028    #[display("MK")]
1029    Mk,
1030    #[serde(rename = "MP")]
1031    #[display("MP")]
1032    Mp,
1033    #[serde(rename = "NO")]
1034    #[display("NO")]
1035    No,
1036    #[serde(rename = "OM")]
1037    #[display("OM")]
1038    Om,
1039    #[serde(rename = "PK")]
1040    #[display("PK")]
1041    Pk,
1042    #[serde(rename = "PW")]
1043    #[display("PW")]
1044    Pw,
1045    #[serde(rename = "PS")]
1046    #[display("PS")]
1047    Ps,
1048    #[serde(rename = "PA")]
1049    #[display("PA")]
1050    Pa,
1051    #[serde(rename = "PG")]
1052    #[display("PG")]
1053    Pg,
1054    #[serde(rename = "PY")]
1055    #[display("PY")]
1056    Py,
1057    #[serde(rename = "PE")]
1058    #[display("PE")]
1059    Pe,
1060    #[serde(rename = "PH")]
1061    #[display("PH")]
1062    Ph,
1063    #[serde(rename = "PN")]
1064    #[display("PN")]
1065    Pn,
1066    #[serde(rename = "PL")]
1067    #[display("PL")]
1068    Pl,
1069    #[serde(rename = "PT")]
1070    #[display("PT")]
1071    Pt,
1072    #[serde(rename = "PR")]
1073    #[display("PR")]
1074    Pr,
1075    #[serde(rename = "QA")]
1076    #[display("QA")]
1077    Qa,
1078    #[serde(rename = "RO")]
1079    #[display("RO")]
1080    Ro,
1081    #[serde(rename = "RU")]
1082    #[display("RU")]
1083    Ru,
1084    #[serde(rename = "RW")]
1085    #[display("RW")]
1086    Rw,
1087    #[serde(rename = "RE")]
1088    #[display("RE")]
1089    Re,
1090    #[serde(rename = "BL")]
1091    #[display("BL")]
1092    Bl,
1093    #[serde(rename = "SH")]
1094    #[display("SH")]
1095    Sh,
1096    #[serde(rename = "KN")]
1097    #[display("KN")]
1098    Kn,
1099    #[serde(rename = "LC")]
1100    #[display("LC")]
1101    Lc,
1102    #[serde(rename = "MF")]
1103    #[display("MF")]
1104    Mf,
1105    #[serde(rename = "PM")]
1106    #[display("PM")]
1107    Pm,
1108    #[serde(rename = "VC")]
1109    #[display("VC")]
1110    Vc,
1111    #[serde(rename = "WS")]
1112    #[display("WS")]
1113    Ws,
1114    #[serde(rename = "SM")]
1115    #[display("SM")]
1116    Sm,
1117    #[serde(rename = "ST")]
1118    #[display("ST")]
1119    St,
1120    #[serde(rename = "SA")]
1121    #[display("SA")]
1122    Sa,
1123    #[serde(rename = "SN")]
1124    #[display("SN")]
1125    Sn,
1126    #[serde(rename = "RS")]
1127    #[display("RS")]
1128    Rs,
1129    #[serde(rename = "SC")]
1130    #[display("SC")]
1131    Sc,
1132    #[serde(rename = "SL")]
1133    #[display("SL")]
1134    Sl,
1135    #[serde(rename = "SG")]
1136    #[display("SG")]
1137    Sg,
1138    #[serde(rename = "SX")]
1139    #[display("SX")]
1140    Sx,
1141    #[serde(rename = "SK")]
1142    #[display("SK")]
1143    Sk,
1144    #[serde(rename = "SI")]
1145    #[display("SI")]
1146    Si,
1147    #[serde(rename = "SB")]
1148    #[display("SB")]
1149    Sb,
1150    #[serde(rename = "SO")]
1151    #[display("SO")]
1152    So,
1153    #[serde(rename = "ZA")]
1154    #[display("ZA")]
1155    Za,
1156    #[serde(rename = "GS")]
1157    #[display("GS")]
1158    Gs,
1159    #[serde(rename = "SS")]
1160    #[display("SS")]
1161    Ss,
1162    #[serde(rename = "ES")]
1163    #[display("ES")]
1164    Es,
1165    #[serde(rename = "LK")]
1166    #[display("LK")]
1167    Lk,
1168    #[serde(rename = "SD")]
1169    #[display("SD")]
1170    Sd,
1171    #[serde(rename = "SR")]
1172    #[display("SR")]
1173    Sr,
1174    #[serde(rename = "SJ")]
1175    #[display("SJ")]
1176    Sj,
1177    #[serde(rename = "SE")]
1178    #[display("SE")]
1179    Se,
1180    #[serde(rename = "CH")]
1181    #[display("CH")]
1182    Ch,
1183    #[serde(rename = "TW")]
1184    #[display("TW")]
1185    Tw,
1186    #[serde(rename = "TJ")]
1187    #[display("TJ")]
1188    Tj,
1189    #[serde(rename = "TZ")]
1190    #[display("TZ")]
1191    Tz,
1192    #[serde(rename = "TH")]
1193    #[display("TH")]
1194    Th,
1195    #[serde(rename = "TL")]
1196    #[display("TL")]
1197    Tl,
1198    #[serde(rename = "TG")]
1199    #[display("TG")]
1200    Tg,
1201    #[serde(rename = "TK")]
1202    #[display("TK")]
1203    Tk,
1204    #[serde(rename = "TO")]
1205    #[display("TO")]
1206    To,
1207    #[serde(rename = "TT")]
1208    #[display("TT")]
1209    Tt,
1210    #[serde(rename = "TN")]
1211    #[display("TN")]
1212    Tn,
1213    #[serde(rename = "TR")]
1214    #[display("TR")]
1215    Tr,
1216    #[serde(rename = "TM")]
1217    #[display("TM")]
1218    Tm,
1219    #[serde(rename = "TC")]
1220    #[display("TC")]
1221    Tc,
1222    #[serde(rename = "TV")]
1223    #[display("TV")]
1224    Tv,
1225    #[serde(rename = "UG")]
1226    #[display("UG")]
1227    Ug,
1228    #[serde(rename = "UA")]
1229    #[display("UA")]
1230    Ua,
1231    #[serde(rename = "AE")]
1232    #[display("AE")]
1233    Ae,
1234    #[serde(rename = "GB")]
1235    #[display("GB")]
1236    Gb,
1237    #[serde(rename = "US")]
1238    #[display("US")]
1239    Us,
1240    #[serde(rename = "UM")]
1241    #[display("UM")]
1242    Um,
1243    #[serde(rename = "UY")]
1244    #[display("UY")]
1245    Uy,
1246    #[serde(rename = "UZ")]
1247    #[display("UZ")]
1248    Uz,
1249    #[serde(rename = "VU")]
1250    #[display("VU")]
1251    Vu,
1252    #[serde(rename = "VE")]
1253    #[display("VE")]
1254    Ve,
1255    #[serde(rename = "VN")]
1256    #[display("VN")]
1257    Vn,
1258    #[serde(rename = "VG")]
1259    #[display("VG")]
1260    Vg,
1261    #[serde(rename = "VI")]
1262    #[display("VI")]
1263    Vi,
1264    #[serde(rename = "WF")]
1265    #[display("WF")]
1266    Wf,
1267    #[serde(rename = "EH")]
1268    #[display("EH")]
1269    Eh,
1270    #[serde(rename = "YE")]
1271    #[display("YE")]
1272    Ye,
1273    #[serde(rename = "ZM")]
1274    #[display("ZM")]
1275    Zm,
1276    #[serde(rename = "ZW")]
1277    #[display("ZW")]
1278    Zw,
1279}
1280
1281#[doc = "Address."]
1282#[derive(
1283    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1284)]
1285pub struct Address {
1286    #[doc = "The classification of the address."]
1287    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1288    pub type_: Option<Type>,
1289    #[doc = "The formatted mailing address."]
1290    #[serde(default, skip_serializing_if = "Option::is_none")]
1291    pub formatted: Option<String>,
1292    #[doc = "The full street address component, which may include house number, street name, P.O. \
1293             box, and multi-line extended street address information, pursuant to SCIM RFC 7643 \
1294             4.1.2.."]
1295    #[serde(default, skip_serializing_if = "Option::is_none")]
1296    pub street_address: Option<String>,
1297    #[doc = "The city or locality component."]
1298    #[serde(default, skip_serializing_if = "Option::is_none")]
1299    pub locality: Option<String>,
1300    #[doc = "The state or region component, pursuant to SCIM RFC 7643 4.1.2."]
1301    #[serde(default, skip_serializing_if = "Option::is_none")]
1302    pub region: Option<String>,
1303    #[doc = "The zip code or postal code component, pursuant to SCIM RFC 7643 4.1.2."]
1304    #[serde(default, skip_serializing_if = "Option::is_none")]
1305    pub postal_code: Option<String>,
1306    #[doc = "The country component, pursuant to SCIM RFC 7643 4.1.2."]
1307    #[serde(default, skip_serializing_if = "Option::is_none")]
1308    pub country: Option<AddressCountry>,
1309}
1310
1311impl std::fmt::Display for Address {
1312    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1313        write!(
1314            f,
1315            "{}",
1316            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1317        )
1318    }
1319}
1320
1321#[cfg(feature = "tabled")]
1322impl tabled::Tabled for Address {
1323    const LENGTH: usize = 7;
1324    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1325        vec![
1326            if let Some(type_) = &self.type_ {
1327                format!("{:?}", type_).into()
1328            } else {
1329                String::new().into()
1330            },
1331            if let Some(formatted) = &self.formatted {
1332                format!("{:?}", formatted).into()
1333            } else {
1334                String::new().into()
1335            },
1336            if let Some(street_address) = &self.street_address {
1337                format!("{:?}", street_address).into()
1338            } else {
1339                String::new().into()
1340            },
1341            if let Some(locality) = &self.locality {
1342                format!("{:?}", locality).into()
1343            } else {
1344                String::new().into()
1345            },
1346            if let Some(region) = &self.region {
1347                format!("{:?}", region).into()
1348            } else {
1349                String::new().into()
1350            },
1351            if let Some(postal_code) = &self.postal_code {
1352                format!("{:?}", postal_code).into()
1353            } else {
1354                String::new().into()
1355            },
1356            if let Some(country) = &self.country {
1357                format!("{:?}", country).into()
1358            } else {
1359                String::new().into()
1360            },
1361        ]
1362    }
1363
1364    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1365        vec![
1366            "type_".into(),
1367            "formatted".into(),
1368            "street_address".into(),
1369            "locality".into(),
1370            "region".into(),
1371            "postal_code".into(),
1372            "country".into(),
1373        ]
1374    }
1375}
1376
1377#[doc = "Application status"]
1378#[derive(
1379    serde :: Serialize,
1380    serde :: Deserialize,
1381    PartialEq,
1382    Hash,
1383    Debug,
1384    Clone,
1385    schemars :: JsonSchema,
1386    parse_display :: FromStr,
1387    parse_display :: Display,
1388)]
1389#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
1390#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
1391pub enum Status {
1392    #[serde(rename = "ACTIVE")]
1393    #[display("ACTIVE")]
1394    Active,
1395    #[serde(rename = "REJECTED")]
1396    #[display("REJECTED")]
1397    Rejected,
1398    #[serde(rename = "HIRED")]
1399    #[display("HIRED")]
1400    Hired,
1401    #[serde(rename = "ARCHIVED")]
1402    #[display("ARCHIVED")]
1403    Archived,
1404}
1405
1406#[doc = "Application."]
1407#[derive(
1408    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1409)]
1410pub struct Application {
1411    #[doc = "Identifier field"]
1412    pub id: String,
1413    #[doc = "Record creation date"]
1414    pub created_at: String,
1415    #[doc = "Record update date"]
1416    pub updated_at: String,
1417    #[doc = "Application status"]
1418    #[serde(default, skip_serializing_if = "Option::is_none")]
1419    pub status: Option<Status>,
1420    #[doc = "Application stage"]
1421    #[serde(default, skip_serializing_if = "Option::is_none")]
1422    pub stage: Option<String>,
1423    #[doc = "Application creation date"]
1424    #[serde(default, skip_serializing_if = "Option::is_none")]
1425    pub applied_at: Option<String>,
1426    #[doc = "Job requisition ID"]
1427    #[serde(default, skip_serializing_if = "Option::is_none")]
1428    pub job_id: Option<String>,
1429    #[doc = "Job requisition\n\nExpandable field"]
1430    #[serde(default, skip_serializing_if = "Option::is_none")]
1431    pub job: Option<JobRequisition>,
1432    #[doc = "Application url"]
1433    #[serde(default, skip_serializing_if = "Option::is_none")]
1434    pub url: Option<String>,
1435}
1436
1437impl std::fmt::Display for Application {
1438    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1439        write!(
1440            f,
1441            "{}",
1442            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1443        )
1444    }
1445}
1446
1447#[cfg(feature = "tabled")]
1448impl tabled::Tabled for Application {
1449    const LENGTH: usize = 9;
1450    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1451        vec![
1452            self.id.clone().into(),
1453            self.created_at.clone().into(),
1454            self.updated_at.clone().into(),
1455            if let Some(status) = &self.status {
1456                format!("{:?}", status).into()
1457            } else {
1458                String::new().into()
1459            },
1460            if let Some(stage) = &self.stage {
1461                format!("{:?}", stage).into()
1462            } else {
1463                String::new().into()
1464            },
1465            if let Some(applied_at) = &self.applied_at {
1466                format!("{:?}", applied_at).into()
1467            } else {
1468                String::new().into()
1469            },
1470            if let Some(job_id) = &self.job_id {
1471                format!("{:?}", job_id).into()
1472            } else {
1473                String::new().into()
1474            },
1475            if let Some(job) = &self.job {
1476                format!("{:?}", job).into()
1477            } else {
1478                String::new().into()
1479            },
1480            if let Some(url) = &self.url {
1481                format!("{:?}", url).into()
1482            } else {
1483                String::new().into()
1484            },
1485        ]
1486    }
1487
1488    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1489        vec![
1490            "id".into(),
1491            "created_at".into(),
1492            "updated_at".into(),
1493            "status".into(),
1494            "stage".into(),
1495            "applied_at".into(),
1496            "job_id".into(),
1497            "job".into(),
1498            "url".into(),
1499        ]
1500    }
1501}
1502
1503#[doc = "Break."]
1504#[derive(
1505    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1506)]
1507pub struct Break {
1508    #[doc = "The start time of the break."]
1509    #[serde(default, skip_serializing_if = "Option::is_none")]
1510    pub start_time: Option<String>,
1511    #[doc = "The end time of the break."]
1512    #[serde(default, skip_serializing_if = "Option::is_none")]
1513    pub end_time: Option<String>,
1514    #[doc = "The original start time of the break. If the startTime field has been rounded then \
1515             this contain the start time before the rounding occured."]
1516    #[serde(default, skip_serializing_if = "Option::is_none")]
1517    pub original_start_time: Option<String>,
1518    #[doc = "The original end time of the break. If the endTime field has been rounded then this \
1519             contain the end time before the rounding occured."]
1520    #[serde(default, skip_serializing_if = "Option::is_none")]
1521    pub original_end_time: Option<String>,
1522    #[doc = "The ID of the break type."]
1523    #[serde(default, skip_serializing_if = "Option::is_none")]
1524    pub break_type_id: Option<String>,
1525}
1526
1527impl std::fmt::Display for Break {
1528    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1529        write!(
1530            f,
1531            "{}",
1532            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1533        )
1534    }
1535}
1536
1537#[cfg(feature = "tabled")]
1538impl tabled::Tabled for Break {
1539    const LENGTH: usize = 5;
1540    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1541        vec![
1542            if let Some(start_time) = &self.start_time {
1543                format!("{:?}", start_time).into()
1544            } else {
1545                String::new().into()
1546            },
1547            if let Some(end_time) = &self.end_time {
1548                format!("{:?}", end_time).into()
1549            } else {
1550                String::new().into()
1551            },
1552            if let Some(original_start_time) = &self.original_start_time {
1553                format!("{:?}", original_start_time).into()
1554            } else {
1555                String::new().into()
1556            },
1557            if let Some(original_end_time) = &self.original_end_time {
1558                format!("{:?}", original_end_time).into()
1559            } else {
1560                String::new().into()
1561            },
1562            if let Some(break_type_id) = &self.break_type_id {
1563                format!("{:?}", break_type_id).into()
1564            } else {
1565                String::new().into()
1566            },
1567        ]
1568    }
1569
1570    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1571        vec![
1572            "start_time".into(),
1573            "end_time".into(),
1574            "original_start_time".into(),
1575            "original_end_time".into(),
1576            "break_type_id".into(),
1577        ]
1578    }
1579}
1580
1581#[doc = "BreakRequest."]
1582#[derive(
1583    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1584)]
1585pub struct BreakRequest {
1586    #[doc = "The start time of the break."]
1587    #[serde(default, skip_serializing_if = "Option::is_none")]
1588    pub start_time: Option<String>,
1589    #[doc = "The end time of the break."]
1590    #[serde(default, skip_serializing_if = "Option::is_none")]
1591    pub end_time: Option<String>,
1592    #[doc = "The ID of the break type."]
1593    #[serde(default, skip_serializing_if = "Option::is_none")]
1594    pub break_type_id: Option<String>,
1595}
1596
1597impl std::fmt::Display for BreakRequest {
1598    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1599        write!(
1600            f,
1601            "{}",
1602            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1603        )
1604    }
1605}
1606
1607#[cfg(feature = "tabled")]
1608impl tabled::Tabled for BreakRequest {
1609    const LENGTH: usize = 3;
1610    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1611        vec![
1612            if let Some(start_time) = &self.start_time {
1613                format!("{:?}", start_time).into()
1614            } else {
1615                String::new().into()
1616            },
1617            if let Some(end_time) = &self.end_time {
1618                format!("{:?}", end_time).into()
1619            } else {
1620                String::new().into()
1621            },
1622            if let Some(break_type_id) = &self.break_type_id {
1623                format!("{:?}", break_type_id).into()
1624            } else {
1625                String::new().into()
1626            },
1627        ]
1628    }
1629
1630    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1631        vec![
1632            "start_time".into(),
1633            "end_time".into(),
1634            "break_type_id".into(),
1635        ]
1636    }
1637}
1638
1639#[doc = "Candidate."]
1640#[derive(
1641    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1642)]
1643pub struct Candidate {
1644    #[doc = "Identifier field"]
1645    pub id: String,
1646    #[doc = "Record creation date"]
1647    pub created_at: String,
1648    #[doc = "Record update date"]
1649    pub updated_at: String,
1650    #[doc = "Candidate first name"]
1651    #[serde(default, skip_serializing_if = "Option::is_none")]
1652    pub first_name: Option<String>,
1653    #[doc = "Candidate last name"]
1654    #[serde(default, skip_serializing_if = "Option::is_none")]
1655    pub last_name: Option<String>,
1656    #[doc = "Candidate email"]
1657    #[serde(default, skip_serializing_if = "Option::is_none")]
1658    pub email: Option<String>,
1659    #[doc = "Candidate phone number"]
1660    #[serde(default, skip_serializing_if = "Option::is_none")]
1661    pub phone_number: Option<String>,
1662    #[doc = "Candidate timezone"]
1663    #[serde(default, skip_serializing_if = "Option::is_none")]
1664    pub timezone: Option<String>,
1665}
1666
1667impl std::fmt::Display for Candidate {
1668    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1669        write!(
1670            f,
1671            "{}",
1672            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1673        )
1674    }
1675}
1676
1677#[cfg(feature = "tabled")]
1678impl tabled::Tabled for Candidate {
1679    const LENGTH: usize = 8;
1680    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1681        vec![
1682            self.id.clone().into(),
1683            self.created_at.clone().into(),
1684            self.updated_at.clone().into(),
1685            if let Some(first_name) = &self.first_name {
1686                format!("{:?}", first_name).into()
1687            } else {
1688                String::new().into()
1689            },
1690            if let Some(last_name) = &self.last_name {
1691                format!("{:?}", last_name).into()
1692            } else {
1693                String::new().into()
1694            },
1695            if let Some(email) = &self.email {
1696                format!("{:?}", email).into()
1697            } else {
1698                String::new().into()
1699            },
1700            if let Some(phone_number) = &self.phone_number {
1701                format!("{:?}", phone_number).into()
1702            } else {
1703                String::new().into()
1704            },
1705            if let Some(timezone) = &self.timezone {
1706                format!("{:?}", timezone).into()
1707            } else {
1708                String::new().into()
1709            },
1710        ]
1711    }
1712
1713    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1714        vec![
1715            "id".into(),
1716            "created_at".into(),
1717            "updated_at".into(),
1718            "first_name".into(),
1719            "last_name".into(),
1720            "email".into(),
1721            "phone_number".into(),
1722            "timezone".into(),
1723        ]
1724    }
1725}
1726
1727#[doc = "Company."]
1728#[derive(
1729    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1730)]
1731pub struct Company {
1732    #[doc = "Identifier field"]
1733    pub id: String,
1734    #[doc = "Record creation date"]
1735    pub created_at: String,
1736    #[doc = "Record update date"]
1737    pub updated_at: String,
1738    #[doc = "The company's ultimate holding entity."]
1739    #[serde(default, skip_serializing_if = "Option::is_none")]
1740    pub parent_legal_entity_id: Option<String>,
1741    #[doc = "A list of the company's entities."]
1742    pub legal_entities_id: Vec<String>,
1743    #[doc = "The physical address of the holding entity."]
1744    #[serde(default, skip_serializing_if = "Option::is_none")]
1745    pub physical_address: Option<Address>,
1746    #[doc = "The email address used when registering this company."]
1747    #[serde(default, skip_serializing_if = "Option::is_none")]
1748    pub primary_email: Option<String>,
1749    #[doc = "The legal name of the company."]
1750    #[serde(default, skip_serializing_if = "Option::is_none")]
1751    pub legal_name: Option<String>,
1752    #[doc = "The doing business as name for the company."]
1753    #[serde(default, skip_serializing_if = "Option::is_none")]
1754    pub doing_business_as_name: Option<String>,
1755    #[doc = "The phone number for the company."]
1756    #[serde(default, skip_serializing_if = "Option::is_none")]
1757    pub phone: Option<String>,
1758    #[doc = "The name of the company."]
1759    pub name: String,
1760}
1761
1762impl std::fmt::Display for Company {
1763    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1764        write!(
1765            f,
1766            "{}",
1767            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1768        )
1769    }
1770}
1771
1772#[cfg(feature = "tabled")]
1773impl tabled::Tabled for Company {
1774    const LENGTH: usize = 11;
1775    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1776        vec![
1777            self.id.clone().into(),
1778            self.created_at.clone().into(),
1779            self.updated_at.clone().into(),
1780            if let Some(parent_legal_entity_id) = &self.parent_legal_entity_id {
1781                format!("{:?}", parent_legal_entity_id).into()
1782            } else {
1783                String::new().into()
1784            },
1785            format!("{:?}", self.legal_entities_id).into(),
1786            if let Some(physical_address) = &self.physical_address {
1787                format!("{:?}", physical_address).into()
1788            } else {
1789                String::new().into()
1790            },
1791            if let Some(primary_email) = &self.primary_email {
1792                format!("{:?}", primary_email).into()
1793            } else {
1794                String::new().into()
1795            },
1796            if let Some(legal_name) = &self.legal_name {
1797                format!("{:?}", legal_name).into()
1798            } else {
1799                String::new().into()
1800            },
1801            if let Some(doing_business_as_name) = &self.doing_business_as_name {
1802                format!("{:?}", doing_business_as_name).into()
1803            } else {
1804                String::new().into()
1805            },
1806            if let Some(phone) = &self.phone {
1807                format!("{:?}", phone).into()
1808            } else {
1809                String::new().into()
1810            },
1811            self.name.clone().into(),
1812        ]
1813    }
1814
1815    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1816        vec![
1817            "id".into(),
1818            "created_at".into(),
1819            "updated_at".into(),
1820            "parent_legal_entity_id".into(),
1821            "legal_entities_id".into(),
1822            "physical_address".into(),
1823            "primary_email".into(),
1824            "legal_name".into(),
1825            "doing_business_as_name".into(),
1826            "phone".into(),
1827            "name".into(),
1828        ]
1829    }
1830}
1831
1832#[doc = "The classification of the worker by the company. * `CONTRACTOR`: Contractors are \
1833         self-employed workers who provide services on a short-term or per-project basis and are \
1834         not eligible for tax-withholding or benefits. * `EMPLOYEE`: Employees are hired and \
1835         managed by an employer, work under the employer's direct supervision and control, and are \
1836         protected by law for wages and employment rights."]
1837#[derive(
1838    serde :: Serialize,
1839    serde :: Deserialize,
1840    PartialEq,
1841    Hash,
1842    Debug,
1843    Clone,
1844    schemars :: JsonSchema,
1845    parse_display :: FromStr,
1846    parse_display :: Display,
1847)]
1848#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
1849#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
1850pub enum CompanyEmploymentTypeType {
1851    #[serde(rename = "CONTRACTOR")]
1852    #[display("CONTRACTOR")]
1853    Contractor,
1854    #[serde(rename = "EMPLOYEE")]
1855    #[display("EMPLOYEE")]
1856    Employee,
1857}
1858
1859#[doc = "The compensation period for the employment type. * `SALARIED`: Employees that are paid a \
1860         fixed amount per year. * `HOURLY`: Employees that are paid a wage per hour worked."]
1861#[derive(
1862    serde :: Serialize,
1863    serde :: Deserialize,
1864    PartialEq,
1865    Hash,
1866    Debug,
1867    Clone,
1868    schemars :: JsonSchema,
1869    parse_display :: FromStr,
1870    parse_display :: Display,
1871)]
1872#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
1873#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
1874pub enum CompensationTimePeriod {
1875    #[serde(rename = "HOURLY")]
1876    #[display("HOURLY")]
1877    Hourly,
1878    #[serde(rename = "SALARIED")]
1879    #[display("SALARIED")]
1880    Salaried,
1881}
1882
1883#[doc = "The amount worked for the employment type. * `FULL-TIME`: Full-time is at least 30 hours \
1884         per week. Full-time workers will typically be eligible for benefits. * `PART-TIME`: \
1885         Part-time is less than 30 hours per week. These workers may be eligible for benefits, \
1886         depending on company settings and hours worked. * `TEMPORARY`: These workers are hired on \
1887         a temporary basis. You can specify how each worker with this employment type will be paid \
1888         individually."]
1889#[derive(
1890    serde :: Serialize,
1891    serde :: Deserialize,
1892    PartialEq,
1893    Hash,
1894    Debug,
1895    Clone,
1896    schemars :: JsonSchema,
1897    parse_display :: FromStr,
1898    parse_display :: Display,
1899)]
1900#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
1901#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
1902pub enum AmountWorked {
1903    #[serde(rename = "PART-TIME")]
1904    #[display("PART-TIME")]
1905    PartTime,
1906    #[serde(rename = "FULL-TIME")]
1907    #[display("FULL-TIME")]
1908    FullTime,
1909    #[serde(rename = "TEMPORARY")]
1910    #[display("TEMPORARY")]
1911    Temporary,
1912}
1913
1914#[doc = "CompanyEmploymentType."]
1915#[derive(
1916    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
1917)]
1918pub struct CompanyEmploymentType {
1919    #[doc = "Identifier field"]
1920    pub id: String,
1921    #[doc = "Record creation date"]
1922    pub created_at: String,
1923    #[doc = "Record update date"]
1924    pub updated_at: String,
1925    #[doc = "The display label of the employment type."]
1926    pub label: String,
1927    #[doc = "The name of the employment type for non-custom employment types."]
1928    #[serde(default, skip_serializing_if = "Option::is_none")]
1929    pub name: Option<String>,
1930    #[doc = "The classification of the worker by the company. * `CONTRACTOR`: Contractors are \
1931             self-employed workers who provide services on a short-term or per-project basis and \
1932             are not eligible for tax-withholding or benefits. * `EMPLOYEE`: Employees are hired \
1933             and managed by an employer, work under the employer's direct supervision and \
1934             control, and are protected by law for wages and employment rights."]
1935    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1936    pub type_: Option<CompanyEmploymentTypeType>,
1937    #[doc = "The compensation period for the employment type. * `SALARIED`: Employees that are \
1938             paid a fixed amount per year. * `HOURLY`: Employees that are paid a wage per hour \
1939             worked."]
1940    #[serde(default, skip_serializing_if = "Option::is_none")]
1941    pub compensation_time_period: Option<CompensationTimePeriod>,
1942    #[doc = "The amount worked for the employment type. * `FULL-TIME`: Full-time is at least 30 \
1943             hours per week. Full-time workers will typically be eligible for benefits. * \
1944             `PART-TIME`: Part-time is less than 30 hours per week. These workers may be eligible \
1945             for benefits, depending on company settings and hours worked. * `TEMPORARY`: These \
1946             workers are hired on a temporary basis. You can specify how each worker with this \
1947             employment type will be paid individually."]
1948    #[serde(default, skip_serializing_if = "Option::is_none")]
1949    pub amount_worked: Option<AmountWorked>,
1950}
1951
1952impl std::fmt::Display for CompanyEmploymentType {
1953    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
1954        write!(
1955            f,
1956            "{}",
1957            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
1958        )
1959    }
1960}
1961
1962#[cfg(feature = "tabled")]
1963impl tabled::Tabled for CompanyEmploymentType {
1964    const LENGTH: usize = 8;
1965    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
1966        vec![
1967            self.id.clone().into(),
1968            self.created_at.clone().into(),
1969            self.updated_at.clone().into(),
1970            self.label.clone().into(),
1971            if let Some(name) = &self.name {
1972                format!("{:?}", name).into()
1973            } else {
1974                String::new().into()
1975            },
1976            if let Some(type_) = &self.type_ {
1977                format!("{:?}", type_).into()
1978            } else {
1979                String::new().into()
1980            },
1981            if let Some(compensation_time_period) = &self.compensation_time_period {
1982                format!("{:?}", compensation_time_period).into()
1983            } else {
1984                String::new().into()
1985            },
1986            if let Some(amount_worked) = &self.amount_worked {
1987                format!("{:?}", amount_worked).into()
1988            } else {
1989                String::new().into()
1990            },
1991        ]
1992    }
1993
1994    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
1995        vec![
1996            "id".into(),
1997            "created_at".into(),
1998            "updated_at".into(),
1999            "label".into(),
2000            "name".into(),
2001            "type_".into(),
2002            "compensation_time_period".into(),
2003            "amount_worked".into(),
2004        ]
2005    }
2006}
2007
2008#[doc = "Compensation."]
2009#[derive(
2010    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
2011)]
2012pub struct Compensation {
2013    #[doc = "Identifier field"]
2014    pub id: String,
2015    #[doc = "Record creation date"]
2016    pub created_at: String,
2017    #[doc = "Record update date"]
2018    pub updated_at: String,
2019    #[doc = "The worker's ID."]
2020    #[serde(default, skip_serializing_if = "Option::is_none")]
2021    pub worker_id: Option<String>,
2022    #[doc = "The worker's annual compensation. This calculation assumes 40-hour work weeks for \
2023             workers with an hourly wage."]
2024    #[serde(default, skip_serializing_if = "Option::is_none")]
2025    pub annual_compensation: Option<Currency>,
2026    #[doc = "The worker's annual salary equivalent, for insurance purposes. It will be equal to \
2027             the worker's annual compensation, except for owners that are receiving no \
2028             cashcompensation."]
2029    #[serde(default, skip_serializing_if = "Option::is_none")]
2030    pub annual_salary_equivalent: Option<Currency>,
2031    #[doc = "The worker's hourly wage. This calculation assumes 40-hour work weeks for workers \
2032             with fixed compensation."]
2033    #[serde(default, skip_serializing_if = "Option::is_none")]
2034    pub hourly_wage: Option<Currency>,
2035    #[doc = "The worker's monthly compensation. This calculation assumes 40-hour work weeks for \
2036             workers with an hourly wage."]
2037    #[serde(default, skip_serializing_if = "Option::is_none")]
2038    pub monthly_compensation: Option<Currency>,
2039    #[doc = "The worker's on-target commission."]
2040    #[serde(default, skip_serializing_if = "Option::is_none")]
2041    pub on_target_commission: Option<Currency>,
2042    #[doc = "The worker's hourly wage. This calculation assumes 40-hour work weeks for workers \
2043             with fixed compensation."]
2044    #[serde(default, skip_serializing_if = "Option::is_none")]
2045    pub relocation_reimbursement: Option<Currency>,
2046    #[doc = "The worker's signing bonus."]
2047    #[serde(default, skip_serializing_if = "Option::is_none")]
2048    pub signing_bonus: Option<Currency>,
2049    #[doc = "The worker's target annual bonus amount."]
2050    #[serde(default, skip_serializing_if = "Option::is_none")]
2051    pub target_annual_bonus: Option<Currency>,
2052    #[doc = "The worker's weekly compensation. This calculation assumes 40-hour work weeks for \
2053             workers with an hourly wage."]
2054    #[serde(default, skip_serializing_if = "Option::is_none")]
2055    pub weekly_compensation: Option<Currency>,
2056    #[doc = "The worker's target annual bonus as a percent of annual compensation."]
2057    #[serde(default, skip_serializing_if = "Option::is_none")]
2058    pub target_annual_bonus_percent: Option<f64>,
2059    #[doc = "The worker's bonus schedule."]
2060    #[serde(default, skip_serializing_if = "Option::is_none")]
2061    pub bonus_schedule: Option<String>,
2062    #[doc = "The payment type for an worker's compensation."]
2063    #[serde(default, skip_serializing_if = "Option::is_none")]
2064    pub payment_type: Option<String>,
2065    #[doc = "The payment terms for an worker's compensation."]
2066    #[serde(default, skip_serializing_if = "Option::is_none")]
2067    pub payment_terms: Option<String>,
2068}
2069
2070impl std::fmt::Display for Compensation {
2071    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2072        write!(
2073            f,
2074            "{}",
2075            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2076        )
2077    }
2078}
2079
2080#[cfg(feature = "tabled")]
2081impl tabled::Tabled for Compensation {
2082    const LENGTH: usize = 17;
2083    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
2084        vec![
2085            self.id.clone().into(),
2086            self.created_at.clone().into(),
2087            self.updated_at.clone().into(),
2088            if let Some(worker_id) = &self.worker_id {
2089                format!("{:?}", worker_id).into()
2090            } else {
2091                String::new().into()
2092            },
2093            if let Some(annual_compensation) = &self.annual_compensation {
2094                format!("{:?}", annual_compensation).into()
2095            } else {
2096                String::new().into()
2097            },
2098            if let Some(annual_salary_equivalent) = &self.annual_salary_equivalent {
2099                format!("{:?}", annual_salary_equivalent).into()
2100            } else {
2101                String::new().into()
2102            },
2103            if let Some(hourly_wage) = &self.hourly_wage {
2104                format!("{:?}", hourly_wage).into()
2105            } else {
2106                String::new().into()
2107            },
2108            if let Some(monthly_compensation) = &self.monthly_compensation {
2109                format!("{:?}", monthly_compensation).into()
2110            } else {
2111                String::new().into()
2112            },
2113            if let Some(on_target_commission) = &self.on_target_commission {
2114                format!("{:?}", on_target_commission).into()
2115            } else {
2116                String::new().into()
2117            },
2118            if let Some(relocation_reimbursement) = &self.relocation_reimbursement {
2119                format!("{:?}", relocation_reimbursement).into()
2120            } else {
2121                String::new().into()
2122            },
2123            if let Some(signing_bonus) = &self.signing_bonus {
2124                format!("{:?}", signing_bonus).into()
2125            } else {
2126                String::new().into()
2127            },
2128            if let Some(target_annual_bonus) = &self.target_annual_bonus {
2129                format!("{:?}", target_annual_bonus).into()
2130            } else {
2131                String::new().into()
2132            },
2133            if let Some(weekly_compensation) = &self.weekly_compensation {
2134                format!("{:?}", weekly_compensation).into()
2135            } else {
2136                String::new().into()
2137            },
2138            if let Some(target_annual_bonus_percent) = &self.target_annual_bonus_percent {
2139                format!("{:?}", target_annual_bonus_percent).into()
2140            } else {
2141                String::new().into()
2142            },
2143            if let Some(bonus_schedule) = &self.bonus_schedule {
2144                format!("{:?}", bonus_schedule).into()
2145            } else {
2146                String::new().into()
2147            },
2148            if let Some(payment_type) = &self.payment_type {
2149                format!("{:?}", payment_type).into()
2150            } else {
2151                String::new().into()
2152            },
2153            if let Some(payment_terms) = &self.payment_terms {
2154                format!("{:?}", payment_terms).into()
2155            } else {
2156                String::new().into()
2157            },
2158        ]
2159    }
2160
2161    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
2162        vec![
2163            "id".into(),
2164            "created_at".into(),
2165            "updated_at".into(),
2166            "worker_id".into(),
2167            "annual_compensation".into(),
2168            "annual_salary_equivalent".into(),
2169            "hourly_wage".into(),
2170            "monthly_compensation".into(),
2171            "on_target_commission".into(),
2172            "relocation_reimbursement".into(),
2173            "signing_bonus".into(),
2174            "target_annual_bonus".into(),
2175            "weekly_compensation".into(),
2176            "target_annual_bonus_percent".into(),
2177            "bonus_schedule".into(),
2178            "payment_type".into(),
2179            "payment_terms".into(),
2180        ]
2181    }
2182}
2183
2184#[doc = "The code of the country."]
2185#[derive(
2186    serde :: Serialize,
2187    serde :: Deserialize,
2188    PartialEq,
2189    Hash,
2190    Debug,
2191    Clone,
2192    schemars :: JsonSchema,
2193    parse_display :: FromStr,
2194    parse_display :: Display,
2195)]
2196#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
2197#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
2198pub enum Code {
2199    #[serde(rename = "AF")]
2200    #[display("AF")]
2201    Af,
2202    #[serde(rename = "AX")]
2203    #[display("AX")]
2204    Ax,
2205    #[serde(rename = "AL")]
2206    #[display("AL")]
2207    Al,
2208    #[serde(rename = "DZ")]
2209    #[display("DZ")]
2210    Dz,
2211    #[serde(rename = "AS")]
2212    #[display("AS")]
2213    As,
2214    #[serde(rename = "AD")]
2215    #[display("AD")]
2216    Ad,
2217    #[serde(rename = "AO")]
2218    #[display("AO")]
2219    Ao,
2220    #[serde(rename = "AI")]
2221    #[display("AI")]
2222    Ai,
2223    #[serde(rename = "AQ")]
2224    #[display("AQ")]
2225    Aq,
2226    #[serde(rename = "AG")]
2227    #[display("AG")]
2228    Ag,
2229    #[serde(rename = "AR")]
2230    #[display("AR")]
2231    Ar,
2232    #[serde(rename = "AM")]
2233    #[display("AM")]
2234    Am,
2235    #[serde(rename = "AW")]
2236    #[display("AW")]
2237    Aw,
2238    #[serde(rename = "AU")]
2239    #[display("AU")]
2240    Au,
2241    #[serde(rename = "AT")]
2242    #[display("AT")]
2243    At,
2244    #[serde(rename = "AZ")]
2245    #[display("AZ")]
2246    Az,
2247    #[serde(rename = "BS")]
2248    #[display("BS")]
2249    Bs,
2250    #[serde(rename = "BH")]
2251    #[display("BH")]
2252    Bh,
2253    #[serde(rename = "BD")]
2254    #[display("BD")]
2255    Bd,
2256    #[serde(rename = "BB")]
2257    #[display("BB")]
2258    Bb,
2259    #[serde(rename = "BY")]
2260    #[display("BY")]
2261    By,
2262    #[serde(rename = "BE")]
2263    #[display("BE")]
2264    Be,
2265    #[serde(rename = "BZ")]
2266    #[display("BZ")]
2267    Bz,
2268    #[serde(rename = "BJ")]
2269    #[display("BJ")]
2270    Bj,
2271    #[serde(rename = "BM")]
2272    #[display("BM")]
2273    Bm,
2274    #[serde(rename = "BT")]
2275    #[display("BT")]
2276    Bt,
2277    #[serde(rename = "BO")]
2278    #[display("BO")]
2279    Bo,
2280    #[serde(rename = "BQ")]
2281    #[display("BQ")]
2282    Bq,
2283    #[serde(rename = "BA")]
2284    #[display("BA")]
2285    Ba,
2286    #[serde(rename = "BW")]
2287    #[display("BW")]
2288    Bw,
2289    #[serde(rename = "BV")]
2290    #[display("BV")]
2291    Bv,
2292    #[serde(rename = "BR")]
2293    #[display("BR")]
2294    Br,
2295    #[serde(rename = "IO")]
2296    #[display("IO")]
2297    Io,
2298    #[serde(rename = "BN")]
2299    #[display("BN")]
2300    Bn,
2301    #[serde(rename = "BG")]
2302    #[display("BG")]
2303    Bg,
2304    #[serde(rename = "BF")]
2305    #[display("BF")]
2306    Bf,
2307    #[serde(rename = "BI")]
2308    #[display("BI")]
2309    Bi,
2310    #[serde(rename = "CV")]
2311    #[display("CV")]
2312    Cv,
2313    #[serde(rename = "KH")]
2314    #[display("KH")]
2315    Kh,
2316    #[serde(rename = "CM")]
2317    #[display("CM")]
2318    Cm,
2319    #[serde(rename = "CA")]
2320    #[display("CA")]
2321    Ca,
2322    #[serde(rename = "KY")]
2323    #[display("KY")]
2324    Ky,
2325    #[serde(rename = "CF")]
2326    #[display("CF")]
2327    Cf,
2328    #[serde(rename = "TD")]
2329    #[display("TD")]
2330    Td,
2331    #[serde(rename = "CL")]
2332    #[display("CL")]
2333    Cl,
2334    #[serde(rename = "CN")]
2335    #[display("CN")]
2336    Cn,
2337    #[serde(rename = "CX")]
2338    #[display("CX")]
2339    Cx,
2340    #[serde(rename = "CC")]
2341    #[display("CC")]
2342    Cc,
2343    #[serde(rename = "CO")]
2344    #[display("CO")]
2345    Co,
2346    #[serde(rename = "KM")]
2347    #[display("KM")]
2348    Km,
2349    #[serde(rename = "CG")]
2350    #[display("CG")]
2351    Cg,
2352    #[serde(rename = "CD")]
2353    #[display("CD")]
2354    Cd,
2355    #[serde(rename = "CK")]
2356    #[display("CK")]
2357    Ck,
2358    #[serde(rename = "CR")]
2359    #[display("CR")]
2360    Cr,
2361    #[serde(rename = "CI")]
2362    #[display("CI")]
2363    Ci,
2364    #[serde(rename = "HR")]
2365    #[display("HR")]
2366    Hr,
2367    #[serde(rename = "CW")]
2368    #[display("CW")]
2369    Cw,
2370    #[serde(rename = "CY")]
2371    #[display("CY")]
2372    Cy,
2373    #[serde(rename = "CZ")]
2374    #[display("CZ")]
2375    Cz,
2376    #[serde(rename = "DK")]
2377    #[display("DK")]
2378    Dk,
2379    #[serde(rename = "DJ")]
2380    #[display("DJ")]
2381    Dj,
2382    #[serde(rename = "DM")]
2383    #[display("DM")]
2384    Dm,
2385    #[serde(rename = "DO")]
2386    #[display("DO")]
2387    Do,
2388    #[serde(rename = "EC")]
2389    #[display("EC")]
2390    Ec,
2391    #[serde(rename = "EG")]
2392    #[display("EG")]
2393    Eg,
2394    #[serde(rename = "SV")]
2395    #[display("SV")]
2396    Sv,
2397    #[serde(rename = "GQ")]
2398    #[display("GQ")]
2399    Gq,
2400    #[serde(rename = "ER")]
2401    #[display("ER")]
2402    Er,
2403    #[serde(rename = "EE")]
2404    #[display("EE")]
2405    Ee,
2406    #[serde(rename = "SZ")]
2407    #[display("SZ")]
2408    Sz,
2409    #[serde(rename = "ET")]
2410    #[display("ET")]
2411    Et,
2412    #[serde(rename = "FK")]
2413    #[display("FK")]
2414    Fk,
2415    #[serde(rename = "FO")]
2416    #[display("FO")]
2417    Fo,
2418    #[serde(rename = "FJ")]
2419    #[display("FJ")]
2420    Fj,
2421    #[serde(rename = "FI")]
2422    #[display("FI")]
2423    Fi,
2424    #[serde(rename = "FR")]
2425    #[display("FR")]
2426    Fr,
2427    #[serde(rename = "GF")]
2428    #[display("GF")]
2429    Gf,
2430    #[serde(rename = "PF")]
2431    #[display("PF")]
2432    Pf,
2433    #[serde(rename = "TF")]
2434    #[display("TF")]
2435    Tf,
2436    #[serde(rename = "GA")]
2437    #[display("GA")]
2438    Ga,
2439    #[serde(rename = "GM")]
2440    #[display("GM")]
2441    Gm,
2442    #[serde(rename = "GE")]
2443    #[display("GE")]
2444    Ge,
2445    #[serde(rename = "DE")]
2446    #[display("DE")]
2447    De,
2448    #[serde(rename = "GH")]
2449    #[display("GH")]
2450    Gh,
2451    #[serde(rename = "GI")]
2452    #[display("GI")]
2453    Gi,
2454    #[serde(rename = "GR")]
2455    #[display("GR")]
2456    Gr,
2457    #[serde(rename = "GL")]
2458    #[display("GL")]
2459    Gl,
2460    #[serde(rename = "GD")]
2461    #[display("GD")]
2462    Gd,
2463    #[serde(rename = "GP")]
2464    #[display("GP")]
2465    Gp,
2466    #[serde(rename = "GU")]
2467    #[display("GU")]
2468    Gu,
2469    #[serde(rename = "GT")]
2470    #[display("GT")]
2471    Gt,
2472    #[serde(rename = "GG")]
2473    #[display("GG")]
2474    Gg,
2475    #[serde(rename = "GN")]
2476    #[display("GN")]
2477    Gn,
2478    #[serde(rename = "GW")]
2479    #[display("GW")]
2480    Gw,
2481    #[serde(rename = "GY")]
2482    #[display("GY")]
2483    Gy,
2484    #[serde(rename = "HT")]
2485    #[display("HT")]
2486    Ht,
2487    #[serde(rename = "HM")]
2488    #[display("HM")]
2489    Hm,
2490    #[serde(rename = "VA")]
2491    #[display("VA")]
2492    Va,
2493    #[serde(rename = "HN")]
2494    #[display("HN")]
2495    Hn,
2496    #[serde(rename = "HK")]
2497    #[display("HK")]
2498    Hk,
2499    #[serde(rename = "HU")]
2500    #[display("HU")]
2501    Hu,
2502    #[serde(rename = "IS")]
2503    #[display("IS")]
2504    Is,
2505    #[serde(rename = "IN")]
2506    #[display("IN")]
2507    In,
2508    #[serde(rename = "ID")]
2509    #[display("ID")]
2510    Id,
2511    #[serde(rename = "IQ")]
2512    #[display("IQ")]
2513    Iq,
2514    #[serde(rename = "IE")]
2515    #[display("IE")]
2516    Ie,
2517    #[serde(rename = "IM")]
2518    #[display("IM")]
2519    Im,
2520    #[serde(rename = "IL")]
2521    #[display("IL")]
2522    Il,
2523    #[serde(rename = "IT")]
2524    #[display("IT")]
2525    It,
2526    #[serde(rename = "JM")]
2527    #[display("JM")]
2528    Jm,
2529    #[serde(rename = "JP")]
2530    #[display("JP")]
2531    Jp,
2532    #[serde(rename = "JE")]
2533    #[display("JE")]
2534    Je,
2535    #[serde(rename = "JO")]
2536    #[display("JO")]
2537    Jo,
2538    #[serde(rename = "KZ")]
2539    #[display("KZ")]
2540    Kz,
2541    #[serde(rename = "KE")]
2542    #[display("KE")]
2543    Ke,
2544    #[serde(rename = "KI")]
2545    #[display("KI")]
2546    Ki,
2547    #[serde(rename = "KR")]
2548    #[display("KR")]
2549    Kr,
2550    #[serde(rename = "XK")]
2551    #[display("XK")]
2552    Xk,
2553    #[serde(rename = "KW")]
2554    #[display("KW")]
2555    Kw,
2556    #[serde(rename = "KG")]
2557    #[display("KG")]
2558    Kg,
2559    #[serde(rename = "LA")]
2560    #[display("LA")]
2561    La,
2562    #[serde(rename = "LV")]
2563    #[display("LV")]
2564    Lv,
2565    #[serde(rename = "LB")]
2566    #[display("LB")]
2567    Lb,
2568    #[serde(rename = "LS")]
2569    #[display("LS")]
2570    Ls,
2571    #[serde(rename = "LR")]
2572    #[display("LR")]
2573    Lr,
2574    #[serde(rename = "LY")]
2575    #[display("LY")]
2576    Ly,
2577    #[serde(rename = "LI")]
2578    #[display("LI")]
2579    Li,
2580    #[serde(rename = "LT")]
2581    #[display("LT")]
2582    Lt,
2583    #[serde(rename = "LU")]
2584    #[display("LU")]
2585    Lu,
2586    #[serde(rename = "MO")]
2587    #[display("MO")]
2588    Mo,
2589    #[serde(rename = "MG")]
2590    #[display("MG")]
2591    Mg,
2592    #[serde(rename = "MW")]
2593    #[display("MW")]
2594    Mw,
2595    #[serde(rename = "MY")]
2596    #[display("MY")]
2597    My,
2598    #[serde(rename = "MV")]
2599    #[display("MV")]
2600    Mv,
2601    #[serde(rename = "ML")]
2602    #[display("ML")]
2603    Ml,
2604    #[serde(rename = "MT")]
2605    #[display("MT")]
2606    Mt,
2607    #[serde(rename = "MH")]
2608    #[display("MH")]
2609    Mh,
2610    #[serde(rename = "MQ")]
2611    #[display("MQ")]
2612    Mq,
2613    #[serde(rename = "MR")]
2614    #[display("MR")]
2615    Mr,
2616    #[serde(rename = "MU")]
2617    #[display("MU")]
2618    Mu,
2619    #[serde(rename = "YT")]
2620    #[display("YT")]
2621    Yt,
2622    #[serde(rename = "MX")]
2623    #[display("MX")]
2624    Mx,
2625    #[serde(rename = "FM")]
2626    #[display("FM")]
2627    Fm,
2628    #[serde(rename = "MD")]
2629    #[display("MD")]
2630    Md,
2631    #[serde(rename = "MC")]
2632    #[display("MC")]
2633    Mc,
2634    #[serde(rename = "MN")]
2635    #[display("MN")]
2636    Mn,
2637    #[serde(rename = "ME")]
2638    #[display("ME")]
2639    Me,
2640    #[serde(rename = "MS")]
2641    #[display("MS")]
2642    Ms,
2643    #[serde(rename = "MA")]
2644    #[display("MA")]
2645    Ma,
2646    #[serde(rename = "MZ")]
2647    #[display("MZ")]
2648    Mz,
2649    #[serde(rename = "MM")]
2650    #[display("MM")]
2651    Mm,
2652    #[serde(rename = "NA")]
2653    #[display("NA")]
2654    Na,
2655    #[serde(rename = "NR")]
2656    #[display("NR")]
2657    Nr,
2658    #[serde(rename = "NP")]
2659    #[display("NP")]
2660    Np,
2661    #[serde(rename = "NL")]
2662    #[display("NL")]
2663    Nl,
2664    #[serde(rename = "AN")]
2665    #[display("AN")]
2666    An,
2667    #[serde(rename = "NC")]
2668    #[display("NC")]
2669    Nc,
2670    #[serde(rename = "NZ")]
2671    #[display("NZ")]
2672    Nz,
2673    #[serde(rename = "NI")]
2674    #[display("NI")]
2675    Ni,
2676    #[serde(rename = "NE")]
2677    #[display("NE")]
2678    Ne,
2679    #[serde(rename = "NG")]
2680    #[display("NG")]
2681    Ng,
2682    #[serde(rename = "NU")]
2683    #[display("NU")]
2684    Nu,
2685    #[serde(rename = "NF")]
2686    #[display("NF")]
2687    Nf,
2688    #[serde(rename = "MK")]
2689    #[display("MK")]
2690    Mk,
2691    #[serde(rename = "MP")]
2692    #[display("MP")]
2693    Mp,
2694    #[serde(rename = "NO")]
2695    #[display("NO")]
2696    No,
2697    #[serde(rename = "OM")]
2698    #[display("OM")]
2699    Om,
2700    #[serde(rename = "PK")]
2701    #[display("PK")]
2702    Pk,
2703    #[serde(rename = "PW")]
2704    #[display("PW")]
2705    Pw,
2706    #[serde(rename = "PS")]
2707    #[display("PS")]
2708    Ps,
2709    #[serde(rename = "PA")]
2710    #[display("PA")]
2711    Pa,
2712    #[serde(rename = "PG")]
2713    #[display("PG")]
2714    Pg,
2715    #[serde(rename = "PY")]
2716    #[display("PY")]
2717    Py,
2718    #[serde(rename = "PE")]
2719    #[display("PE")]
2720    Pe,
2721    #[serde(rename = "PH")]
2722    #[display("PH")]
2723    Ph,
2724    #[serde(rename = "PN")]
2725    #[display("PN")]
2726    Pn,
2727    #[serde(rename = "PL")]
2728    #[display("PL")]
2729    Pl,
2730    #[serde(rename = "PT")]
2731    #[display("PT")]
2732    Pt,
2733    #[serde(rename = "PR")]
2734    #[display("PR")]
2735    Pr,
2736    #[serde(rename = "QA")]
2737    #[display("QA")]
2738    Qa,
2739    #[serde(rename = "RO")]
2740    #[display("RO")]
2741    Ro,
2742    #[serde(rename = "RU")]
2743    #[display("RU")]
2744    Ru,
2745    #[serde(rename = "RW")]
2746    #[display("RW")]
2747    Rw,
2748    #[serde(rename = "RE")]
2749    #[display("RE")]
2750    Re,
2751    #[serde(rename = "BL")]
2752    #[display("BL")]
2753    Bl,
2754    #[serde(rename = "SH")]
2755    #[display("SH")]
2756    Sh,
2757    #[serde(rename = "KN")]
2758    #[display("KN")]
2759    Kn,
2760    #[serde(rename = "LC")]
2761    #[display("LC")]
2762    Lc,
2763    #[serde(rename = "MF")]
2764    #[display("MF")]
2765    Mf,
2766    #[serde(rename = "PM")]
2767    #[display("PM")]
2768    Pm,
2769    #[serde(rename = "VC")]
2770    #[display("VC")]
2771    Vc,
2772    #[serde(rename = "WS")]
2773    #[display("WS")]
2774    Ws,
2775    #[serde(rename = "SM")]
2776    #[display("SM")]
2777    Sm,
2778    #[serde(rename = "ST")]
2779    #[display("ST")]
2780    St,
2781    #[serde(rename = "SA")]
2782    #[display("SA")]
2783    Sa,
2784    #[serde(rename = "SN")]
2785    #[display("SN")]
2786    Sn,
2787    #[serde(rename = "RS")]
2788    #[display("RS")]
2789    Rs,
2790    #[serde(rename = "SC")]
2791    #[display("SC")]
2792    Sc,
2793    #[serde(rename = "SL")]
2794    #[display("SL")]
2795    Sl,
2796    #[serde(rename = "SG")]
2797    #[display("SG")]
2798    Sg,
2799    #[serde(rename = "SX")]
2800    #[display("SX")]
2801    Sx,
2802    #[serde(rename = "SK")]
2803    #[display("SK")]
2804    Sk,
2805    #[serde(rename = "SI")]
2806    #[display("SI")]
2807    Si,
2808    #[serde(rename = "SB")]
2809    #[display("SB")]
2810    Sb,
2811    #[serde(rename = "SO")]
2812    #[display("SO")]
2813    So,
2814    #[serde(rename = "ZA")]
2815    #[display("ZA")]
2816    Za,
2817    #[serde(rename = "GS")]
2818    #[display("GS")]
2819    Gs,
2820    #[serde(rename = "SS")]
2821    #[display("SS")]
2822    Ss,
2823    #[serde(rename = "ES")]
2824    #[display("ES")]
2825    Es,
2826    #[serde(rename = "LK")]
2827    #[display("LK")]
2828    Lk,
2829    #[serde(rename = "SD")]
2830    #[display("SD")]
2831    Sd,
2832    #[serde(rename = "SR")]
2833    #[display("SR")]
2834    Sr,
2835    #[serde(rename = "SJ")]
2836    #[display("SJ")]
2837    Sj,
2838    #[serde(rename = "SE")]
2839    #[display("SE")]
2840    Se,
2841    #[serde(rename = "CH")]
2842    #[display("CH")]
2843    Ch,
2844    #[serde(rename = "TW")]
2845    #[display("TW")]
2846    Tw,
2847    #[serde(rename = "TJ")]
2848    #[display("TJ")]
2849    Tj,
2850    #[serde(rename = "TZ")]
2851    #[display("TZ")]
2852    Tz,
2853    #[serde(rename = "TH")]
2854    #[display("TH")]
2855    Th,
2856    #[serde(rename = "TL")]
2857    #[display("TL")]
2858    Tl,
2859    #[serde(rename = "TG")]
2860    #[display("TG")]
2861    Tg,
2862    #[serde(rename = "TK")]
2863    #[display("TK")]
2864    Tk,
2865    #[serde(rename = "TO")]
2866    #[display("TO")]
2867    To,
2868    #[serde(rename = "TT")]
2869    #[display("TT")]
2870    Tt,
2871    #[serde(rename = "TN")]
2872    #[display("TN")]
2873    Tn,
2874    #[serde(rename = "TR")]
2875    #[display("TR")]
2876    Tr,
2877    #[serde(rename = "TM")]
2878    #[display("TM")]
2879    Tm,
2880    #[serde(rename = "TC")]
2881    #[display("TC")]
2882    Tc,
2883    #[serde(rename = "TV")]
2884    #[display("TV")]
2885    Tv,
2886    #[serde(rename = "UG")]
2887    #[display("UG")]
2888    Ug,
2889    #[serde(rename = "UA")]
2890    #[display("UA")]
2891    Ua,
2892    #[serde(rename = "AE")]
2893    #[display("AE")]
2894    Ae,
2895    #[serde(rename = "GB")]
2896    #[display("GB")]
2897    Gb,
2898    #[serde(rename = "US")]
2899    #[display("US")]
2900    Us,
2901    #[serde(rename = "UM")]
2902    #[display("UM")]
2903    Um,
2904    #[serde(rename = "UY")]
2905    #[display("UY")]
2906    Uy,
2907    #[serde(rename = "UZ")]
2908    #[display("UZ")]
2909    Uz,
2910    #[serde(rename = "VU")]
2911    #[display("VU")]
2912    Vu,
2913    #[serde(rename = "VE")]
2914    #[display("VE")]
2915    Ve,
2916    #[serde(rename = "VN")]
2917    #[display("VN")]
2918    Vn,
2919    #[serde(rename = "VG")]
2920    #[display("VG")]
2921    Vg,
2922    #[serde(rename = "VI")]
2923    #[display("VI")]
2924    Vi,
2925    #[serde(rename = "WF")]
2926    #[display("WF")]
2927    Wf,
2928    #[serde(rename = "EH")]
2929    #[display("EH")]
2930    Eh,
2931    #[serde(rename = "YE")]
2932    #[display("YE")]
2933    Ye,
2934    #[serde(rename = "ZM")]
2935    #[display("ZM")]
2936    Zm,
2937    #[serde(rename = "ZW")]
2938    #[display("ZW")]
2939    Zw,
2940}
2941
2942#[doc = "Country."]
2943#[derive(
2944    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
2945)]
2946pub struct Country {
2947    #[doc = "The code of the country."]
2948    pub code: Code,
2949}
2950
2951impl std::fmt::Display for Country {
2952    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2953        write!(
2954            f,
2955            "{}",
2956            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2957        )
2958    }
2959}
2960
2961#[cfg(feature = "tabled")]
2962impl tabled::Tabled for Country {
2963    const LENGTH: usize = 1;
2964    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
2965        vec![format!("{:?}", self.code).into()]
2966    }
2967
2968    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
2969        vec!["code".into()]
2970    }
2971}
2972
2973#[doc = "Currency."]
2974#[derive(
2975    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
2976)]
2977pub struct Currency {
2978    #[doc = "The currency type, ex: USD, EUR, etc."]
2979    #[serde(default, skip_serializing_if = "Option::is_none")]
2980    pub currency_type: Option<String>,
2981    #[doc = "The decimal amount for the currency."]
2982    #[serde(default, skip_serializing_if = "Option::is_none")]
2983    pub value: Option<f64>,
2984}
2985
2986impl std::fmt::Display for Currency {
2987    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
2988        write!(
2989            f,
2990            "{}",
2991            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
2992        )
2993    }
2994}
2995
2996#[cfg(feature = "tabled")]
2997impl tabled::Tabled for Currency {
2998    const LENGTH: usize = 2;
2999    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3000        vec![
3001            if let Some(currency_type) = &self.currency_type {
3002                format!("{:?}", currency_type).into()
3003            } else {
3004                String::new().into()
3005            },
3006            if let Some(value) = &self.value {
3007                format!("{:?}", value).into()
3008            } else {
3009                String::new().into()
3010            },
3011        ]
3012    }
3013
3014    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3015        vec!["currency_type".into(), "value".into()]
3016    }
3017}
3018
3019#[doc = "The data type of the custom field."]
3020#[derive(
3021    serde :: Serialize,
3022    serde :: Deserialize,
3023    PartialEq,
3024    Hash,
3025    Debug,
3026    Clone,
3027    schemars :: JsonSchema,
3028    parse_display :: FromStr,
3029    parse_display :: Display,
3030)]
3031#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
3032#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
3033pub enum CustomFieldType {
3034    #[serde(rename = "TEXT")]
3035    #[display("TEXT")]
3036    Text,
3037    #[serde(rename = "DATE")]
3038    #[display("DATE")]
3039    Date,
3040    #[serde(rename = "NUMBER")]
3041    #[display("NUMBER")]
3042    Number,
3043    #[serde(rename = "CURRENCY")]
3044    #[display("CURRENCY")]
3045    Currency,
3046    #[serde(rename = "PERCENTAGE")]
3047    #[display("PERCENTAGE")]
3048    Percentage,
3049    #[serde(rename = "SELECT")]
3050    #[display("SELECT")]
3051    Select,
3052    #[serde(rename = "FILE")]
3053    #[display("FILE")]
3054    File,
3055    #[serde(rename = "ID")]
3056    #[display("ID")]
3057    Id,
3058    #[serde(rename = "RADIO")]
3059    #[display("RADIO")]
3060    Radio,
3061    #[serde(rename = "TEXTAREA")]
3062    #[display("TEXTAREA")]
3063    Textarea,
3064    #[serde(rename = "RANGE")]
3065    #[display("RANGE")]
3066    Range,
3067    #[serde(rename = "REFERENCE_ID")]
3068    #[display("REFERENCE_ID")]
3069    ReferenceId,
3070    #[serde(rename = "BOOLEAN")]
3071    #[display("BOOLEAN")]
3072    Boolean,
3073    #[serde(rename = "ADDRESS")]
3074    #[display("ADDRESS")]
3075    Address,
3076    #[serde(rename = "OG_REFERENCE_FIELD")]
3077    #[display("OG_REFERENCE_FIELD")]
3078    OgReferenceField,
3079    #[serde(rename = "NATIVE_EDGE")]
3080    #[display("NATIVE_EDGE")]
3081    NativeEdge,
3082    #[serde(rename = "DATETIME")]
3083    #[display("DATETIME")]
3084    Datetime,
3085    #[serde(rename = "EMAIL")]
3086    #[display("EMAIL")]
3087    Email,
3088    #[serde(rename = "URL")]
3089    #[display("URL")]
3090    Url,
3091}
3092
3093#[doc = "CustomField."]
3094#[derive(
3095    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3096)]
3097pub struct CustomField {
3098    #[doc = "Identifier field"]
3099    pub id: String,
3100    #[doc = "Record creation date"]
3101    pub created_at: String,
3102    #[doc = "Record update date"]
3103    pub updated_at: String,
3104    #[doc = "The name of the custom field."]
3105    pub name: String,
3106    #[doc = "The description of the custom field."]
3107    #[serde(default, skip_serializing_if = "Option::is_none")]
3108    pub description: Option<String>,
3109    #[doc = "Whether the custom field is required."]
3110    #[serde(default, skip_serializing_if = "Option::is_none")]
3111    pub required: Option<bool>,
3112    #[doc = "The data type of the custom field."]
3113    #[serde(rename = "type")]
3114    pub type_: CustomFieldType,
3115}
3116
3117impl std::fmt::Display for CustomField {
3118    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3119        write!(
3120            f,
3121            "{}",
3122            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3123        )
3124    }
3125}
3126
3127#[cfg(feature = "tabled")]
3128impl tabled::Tabled for CustomField {
3129    const LENGTH: usize = 7;
3130    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3131        vec![
3132            self.id.clone().into(),
3133            self.created_at.clone().into(),
3134            self.updated_at.clone().into(),
3135            self.name.clone().into(),
3136            if let Some(description) = &self.description {
3137                format!("{:?}", description).into()
3138            } else {
3139                String::new().into()
3140            },
3141            if let Some(required) = &self.required {
3142                format!("{:?}", required).into()
3143            } else {
3144                String::new().into()
3145            },
3146            format!("{:?}", self.type_).into(),
3147        ]
3148    }
3149
3150    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3151        vec![
3152            "id".into(),
3153            "created_at".into(),
3154            "updated_at".into(),
3155            "name".into(),
3156            "description".into(),
3157            "required".into(),
3158            "type_".into(),
3159        ]
3160    }
3161}
3162
3163#[doc = "CustomObject."]
3164#[derive(
3165    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3166)]
3167pub struct CustomObject {
3168    #[doc = "Identifier field"]
3169    pub id: String,
3170    #[doc = "Record creation date"]
3171    pub created_at: String,
3172    #[doc = "Record update date"]
3173    pub updated_at: String,
3174    #[doc = "The name of the custom object"]
3175    pub name: String,
3176    #[doc = "The description of the custom object"]
3177    #[serde(default, skip_serializing_if = "Option::is_none")]
3178    pub description: Option<String>,
3179    #[doc = "The api name of the custom object"]
3180    #[serde(default, skip_serializing_if = "Option::is_none")]
3181    pub api_name: Option<String>,
3182    #[doc = "The plural label of the custom object"]
3183    pub plural_label: String,
3184    #[doc = "The category of the custom object"]
3185    pub category_id: String,
3186    #[doc = "The native category of the custom object if belongs to"]
3187    #[serde(default, skip_serializing_if = "Option::is_none")]
3188    pub native_category_id: Option<String>,
3189    #[doc = "The id of the package which the custom object belongs to"]
3190    #[serde(default, skip_serializing_if = "Option::is_none")]
3191    pub managed_package_install_id: Option<String>,
3192    #[doc = "Whether to record the history of the custom object"]
3193    pub enable_history: bool,
3194    #[doc = "The id of the owner for the custom object"]
3195    #[serde(default, skip_serializing_if = "Option::is_none")]
3196    pub owner_id: Option<String>,
3197}
3198
3199impl std::fmt::Display for CustomObject {
3200    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3201        write!(
3202            f,
3203            "{}",
3204            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3205        )
3206    }
3207}
3208
3209#[cfg(feature = "tabled")]
3210impl tabled::Tabled for CustomObject {
3211    const LENGTH: usize = 12;
3212    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3213        vec![
3214            self.id.clone().into(),
3215            self.created_at.clone().into(),
3216            self.updated_at.clone().into(),
3217            self.name.clone().into(),
3218            if let Some(description) = &self.description {
3219                format!("{:?}", description).into()
3220            } else {
3221                String::new().into()
3222            },
3223            if let Some(api_name) = &self.api_name {
3224                format!("{:?}", api_name).into()
3225            } else {
3226                String::new().into()
3227            },
3228            self.plural_label.clone().into(),
3229            self.category_id.clone().into(),
3230            if let Some(native_category_id) = &self.native_category_id {
3231                format!("{:?}", native_category_id).into()
3232            } else {
3233                String::new().into()
3234            },
3235            if let Some(managed_package_install_id) = &self.managed_package_install_id {
3236                format!("{:?}", managed_package_install_id).into()
3237            } else {
3238                String::new().into()
3239            },
3240            format!("{:?}", self.enable_history).into(),
3241            if let Some(owner_id) = &self.owner_id {
3242                format!("{:?}", owner_id).into()
3243            } else {
3244                String::new().into()
3245            },
3246        ]
3247    }
3248
3249    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3250        vec![
3251            "id".into(),
3252            "created_at".into(),
3253            "updated_at".into(),
3254            "name".into(),
3255            "description".into(),
3256            "api_name".into(),
3257            "plural_label".into(),
3258            "category_id".into(),
3259            "native_category_id".into(),
3260            "managed_package_install_id".into(),
3261            "enable_history".into(),
3262            "owner_id".into(),
3263        ]
3264    }
3265}
3266
3267#[doc = "CustomObjectDataRow."]
3268#[derive(
3269    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3270)]
3271pub struct CustomObjectDataRow {
3272    #[doc = "Identifier field"]
3273    pub id: String,
3274    #[doc = "Record creation date"]
3275    pub created_at: String,
3276    #[doc = "Record update date"]
3277    pub updated_at: String,
3278    #[doc = "The name of the custom object datarow"]
3279    pub name: String,
3280    #[doc = "The external id of the custom object datarow"]
3281    #[serde(default, skip_serializing_if = "Option::is_none")]
3282    pub external_id: Option<String>,
3283    #[doc = "The owner id of the custom object datarow"]
3284    #[serde(default, skip_serializing_if = "Option::is_none")]
3285    pub owner_role_id: Option<String>,
3286    #[doc = "The id of the role who created the custom object datarow"]
3287    #[serde(default, skip_serializing_if = "Option::is_none")]
3288    pub created_by: Option<String>,
3289    #[doc = "The id of the role who made changes to the custom object datarow lastly"]
3290    #[serde(default, skip_serializing_if = "Option::is_none")]
3291    pub last_modified_by: Option<String>,
3292}
3293
3294impl std::fmt::Display for CustomObjectDataRow {
3295    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3296        write!(
3297            f,
3298            "{}",
3299            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3300        )
3301    }
3302}
3303
3304#[cfg(feature = "tabled")]
3305impl tabled::Tabled for CustomObjectDataRow {
3306    const LENGTH: usize = 8;
3307    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3308        vec![
3309            self.id.clone().into(),
3310            self.created_at.clone().into(),
3311            self.updated_at.clone().into(),
3312            self.name.clone().into(),
3313            if let Some(external_id) = &self.external_id {
3314                format!("{:?}", external_id).into()
3315            } else {
3316                String::new().into()
3317            },
3318            if let Some(owner_role_id) = &self.owner_role_id {
3319                format!("{:?}", owner_role_id).into()
3320            } else {
3321                String::new().into()
3322            },
3323            if let Some(created_by) = &self.created_by {
3324                format!("{:?}", created_by).into()
3325            } else {
3326                String::new().into()
3327            },
3328            if let Some(last_modified_by) = &self.last_modified_by {
3329                format!("{:?}", last_modified_by).into()
3330            } else {
3331                String::new().into()
3332            },
3333        ]
3334    }
3335
3336    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3337        vec![
3338            "id".into(),
3339            "created_at".into(),
3340            "updated_at".into(),
3341            "name".into(),
3342            "external_id".into(),
3343            "owner_role_id".into(),
3344            "created_by".into(),
3345            "last_modified_by".into(),
3346        ]
3347    }
3348}
3349
3350#[doc = "CustomObjectField."]
3351#[derive(
3352    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3353)]
3354pub struct CustomObjectField {
3355    #[doc = "Identifier field"]
3356    pub id: String,
3357    #[doc = "Record creation date"]
3358    pub created_at: String,
3359    #[doc = "Record update date"]
3360    pub updated_at: String,
3361    #[doc = "The name of the custom object field"]
3362    pub name: String,
3363    #[doc = "The custom object which the field belongs to"]
3364    pub custom_object: String,
3365    #[doc = "The description of the custom object field"]
3366    #[serde(default, skip_serializing_if = "Option::is_none")]
3367    pub description: Option<String>,
3368    #[doc = "The api name of the custom object field"]
3369    pub api_name: String,
3370    #[doc = "This field specifies whether a particular column value has unique values"]
3371    pub is_unique: bool,
3372    #[doc = "whether the field is imuatable"]
3373    pub is_immutable: bool,
3374    #[doc = "whether the field is standard field"]
3375    pub is_standard: bool,
3376    #[doc = "The id of the package which the custom object field belongs to"]
3377    #[serde(default, skip_serializing_if = "Option::is_none")]
3378    pub managed_package_install_id: Option<String>,
3379    #[doc = "whether the history is enable for the field"]
3380    pub enable_history: bool,
3381}
3382
3383impl std::fmt::Display for CustomObjectField {
3384    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3385        write!(
3386            f,
3387            "{}",
3388            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3389        )
3390    }
3391}
3392
3393#[cfg(feature = "tabled")]
3394impl tabled::Tabled for CustomObjectField {
3395    const LENGTH: usize = 12;
3396    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3397        vec![
3398            self.id.clone().into(),
3399            self.created_at.clone().into(),
3400            self.updated_at.clone().into(),
3401            self.name.clone().into(),
3402            self.custom_object.clone().into(),
3403            if let Some(description) = &self.description {
3404                format!("{:?}", description).into()
3405            } else {
3406                String::new().into()
3407            },
3408            self.api_name.clone().into(),
3409            format!("{:?}", self.is_unique).into(),
3410            format!("{:?}", self.is_immutable).into(),
3411            format!("{:?}", self.is_standard).into(),
3412            if let Some(managed_package_install_id) = &self.managed_package_install_id {
3413                format!("{:?}", managed_package_install_id).into()
3414            } else {
3415                String::new().into()
3416            },
3417            format!("{:?}", self.enable_history).into(),
3418        ]
3419    }
3420
3421    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3422        vec![
3423            "id".into(),
3424            "created_at".into(),
3425            "updated_at".into(),
3426            "name".into(),
3427            "custom_object".into(),
3428            "description".into(),
3429            "api_name".into(),
3430            "is_unique".into(),
3431            "is_immutable".into(),
3432            "is_standard".into(),
3433            "managed_package_install_id".into(),
3434            "enable_history".into(),
3435        ]
3436    }
3437}
3438
3439#[doc = "DayOff."]
3440#[derive(
3441    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3442)]
3443pub struct DayOff {
3444    #[doc = "The date of the day off."]
3445    pub date: String,
3446    #[doc = "The number of minutes taken off for the day."]
3447    pub number_of_minutes_taken_off: f64,
3448}
3449
3450impl std::fmt::Display for DayOff {
3451    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3452        write!(
3453            f,
3454            "{}",
3455            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3456        )
3457    }
3458}
3459
3460#[cfg(feature = "tabled")]
3461impl tabled::Tabled for DayOff {
3462    const LENGTH: usize = 2;
3463    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3464        vec![
3465            self.date.clone().into(),
3466            format!("{:?}", self.number_of_minutes_taken_off).into(),
3467        ]
3468    }
3469
3470    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3471        vec!["date".into(), "number_of_minutes_taken_off".into()]
3472    }
3473}
3474
3475#[doc = "Department."]
3476#[derive(
3477    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3478)]
3479pub struct Department {
3480    #[doc = "Identifier field"]
3481    pub id: String,
3482    #[doc = "Record creation date"]
3483    pub created_at: String,
3484    #[doc = "Record update date"]
3485    pub updated_at: String,
3486    #[doc = "The name of the department."]
3487    pub name: String,
3488    #[doc = "The parent department."]
3489    #[serde(default, skip_serializing_if = "Option::is_none")]
3490    pub parent_id: Option<String>,
3491    #[doc = "The parent department.\n\nExpandable field"]
3492    #[serde(default, skip_serializing_if = "Option::is_none")]
3493    pub parent: Option<Box<Department>>,
3494    #[doc = "Reference code of the department."]
3495    #[serde(default, skip_serializing_if = "Option::is_none")]
3496    pub reference_code: Option<String>,
3497}
3498
3499impl std::fmt::Display for Department {
3500    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3501        write!(
3502            f,
3503            "{}",
3504            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3505        )
3506    }
3507}
3508
3509#[cfg(feature = "tabled")]
3510impl tabled::Tabled for Department {
3511    const LENGTH: usize = 7;
3512    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3513        vec![
3514            self.id.clone().into(),
3515            self.created_at.clone().into(),
3516            self.updated_at.clone().into(),
3517            self.name.clone().into(),
3518            if let Some(parent_id) = &self.parent_id {
3519                format!("{:?}", parent_id).into()
3520            } else {
3521                String::new().into()
3522            },
3523            if let Some(parent) = &self.parent {
3524                format!("{:?}", parent).into()
3525            } else {
3526                String::new().into()
3527            },
3528            if let Some(reference_code) = &self.reference_code {
3529                format!("{:?}", reference_code).into()
3530            } else {
3531                String::new().into()
3532            },
3533        ]
3534    }
3535
3536    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3537        vec![
3538            "id".into(),
3539            "created_at".into(),
3540            "updated_at".into(),
3541            "name".into(),
3542            "parent_id".into(),
3543            "parent".into(),
3544            "reference_code".into(),
3545        ]
3546    }
3547}
3548
3549#[doc = "The classification of the email."]
3550#[derive(
3551    serde :: Serialize,
3552    serde :: Deserialize,
3553    PartialEq,
3554    Hash,
3555    Debug,
3556    Clone,
3557    schemars :: JsonSchema,
3558    parse_display :: FromStr,
3559    parse_display :: Display,
3560)]
3561#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
3562#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
3563pub enum EmailType {
3564    #[serde(rename = "HOME")]
3565    #[display("HOME")]
3566    Home,
3567    #[serde(rename = "WORK")]
3568    #[display("WORK")]
3569    Work,
3570    #[serde(rename = "OTHER")]
3571    #[display("OTHER")]
3572    Other,
3573}
3574
3575#[doc = "Email."]
3576#[derive(
3577    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3578)]
3579pub struct Email {
3580    #[doc = "A valid email address."]
3581    #[serde(default, skip_serializing_if = "Option::is_none")]
3582    pub value: Option<String>,
3583    #[doc = "The classification of the email."]
3584    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
3585    pub type_: Option<EmailType>,
3586    #[doc = "The display value of the email address."]
3587    #[serde(default, skip_serializing_if = "Option::is_none")]
3588    pub display: Option<String>,
3589}
3590
3591impl std::fmt::Display for Email {
3592    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3593        write!(
3594            f,
3595            "{}",
3596            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3597        )
3598    }
3599}
3600
3601#[cfg(feature = "tabled")]
3602impl tabled::Tabled for Email {
3603    const LENGTH: usize = 3;
3604    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3605        vec![
3606            if let Some(value) = &self.value {
3607                format!("{:?}", value).into()
3608            } else {
3609                String::new().into()
3610            },
3611            if let Some(type_) = &self.type_ {
3612                format!("{:?}", type_).into()
3613            } else {
3614                String::new().into()
3615            },
3616            if let Some(display) = &self.display {
3617                format!("{:?}", display).into()
3618            } else {
3619                String::new().into()
3620            },
3621        ]
3622    }
3623
3624    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3625        vec!["value".into(), "type_".into(), "display".into()]
3626    }
3627}
3628
3629#[doc = "EntitlementModel."]
3630#[derive(
3631    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3632)]
3633pub struct EntitlementModel {
3634    #[doc = "Identifier field"]
3635    pub id: String,
3636    #[doc = "Description of the entitlement"]
3637    pub description: String,
3638    #[doc = "Display name of the entitlement"]
3639    pub display_name: String,
3640}
3641
3642impl std::fmt::Display for EntitlementModel {
3643    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3644        write!(
3645            f,
3646            "{}",
3647            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3648        )
3649    }
3650}
3651
3652#[cfg(feature = "tabled")]
3653impl tabled::Tabled for EntitlementModel {
3654    const LENGTH: usize = 3;
3655    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3656        vec![
3657            self.id.clone().into(),
3658            self.description.clone().into(),
3659            self.display_name.clone().into(),
3660        ]
3661    }
3662
3663    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3664        vec!["id".into(), "description".into(), "display_name".into()]
3665    }
3666}
3667
3668#[doc = "JobCode."]
3669#[derive(
3670    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3671)]
3672pub struct JobCode {
3673    #[doc = "Identifier field"]
3674    pub id: String,
3675    #[doc = "Record creation date"]
3676    pub created_at: String,
3677    #[doc = "Record update date"]
3678    pub updated_at: String,
3679    #[doc = "The name of the job dimension."]
3680    pub name: String,
3681    #[doc = "The ID of the job dimension this job code belongs to."]
3682    pub job_dimension_id: String,
3683    #[doc = "The job dimension this job code belongs to.\n\nExpandable field"]
3684    #[serde(default, skip_serializing_if = "Option::is_none")]
3685    pub job_dimension: Option<JobDimension>,
3686    #[doc = "The unique identifier of the job code in an outside system."]
3687    #[serde(default, skip_serializing_if = "Option::is_none")]
3688    pub external_id: Option<String>,
3689    #[doc = "The ID of the job roster group."]
3690    #[serde(default, skip_serializing_if = "Option::is_none")]
3691    pub group_id: Option<String>,
3692}
3693
3694impl std::fmt::Display for JobCode {
3695    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3696        write!(
3697            f,
3698            "{}",
3699            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3700        )
3701    }
3702}
3703
3704#[cfg(feature = "tabled")]
3705impl tabled::Tabled for JobCode {
3706    const LENGTH: usize = 8;
3707    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3708        vec![
3709            self.id.clone().into(),
3710            self.created_at.clone().into(),
3711            self.updated_at.clone().into(),
3712            self.name.clone().into(),
3713            self.job_dimension_id.clone().into(),
3714            if let Some(job_dimension) = &self.job_dimension {
3715                format!("{:?}", job_dimension).into()
3716            } else {
3717                String::new().into()
3718            },
3719            if let Some(external_id) = &self.external_id {
3720                format!("{:?}", external_id).into()
3721            } else {
3722                String::new().into()
3723            },
3724            if let Some(group_id) = &self.group_id {
3725                format!("{:?}", group_id).into()
3726            } else {
3727                String::new().into()
3728            },
3729        ]
3730    }
3731
3732    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3733        vec![
3734            "id".into(),
3735            "created_at".into(),
3736            "updated_at".into(),
3737            "name".into(),
3738            "job_dimension_id".into(),
3739            "job_dimension".into(),
3740            "external_id".into(),
3741            "group_id".into(),
3742        ]
3743    }
3744}
3745
3746#[doc = "JobCodeRequest."]
3747#[derive(
3748    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3749)]
3750pub struct JobCodeRequest {
3751    #[doc = "The name of the job dimension."]
3752    pub name: String,
3753    #[doc = "The ID of the job dimension this job code belongs to."]
3754    pub job_dimension_id: String,
3755    #[doc = "The unique identifier of the job code in an outside system."]
3756    #[serde(default, skip_serializing_if = "Option::is_none")]
3757    pub external_id: Option<String>,
3758}
3759
3760impl std::fmt::Display for JobCodeRequest {
3761    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3762        write!(
3763            f,
3764            "{}",
3765            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3766        )
3767    }
3768}
3769
3770#[cfg(feature = "tabled")]
3771impl tabled::Tabled for JobCodeRequest {
3772    const LENGTH: usize = 3;
3773    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3774        vec![
3775            self.name.clone().into(),
3776            self.job_dimension_id.clone().into(),
3777            if let Some(external_id) = &self.external_id {
3778                format!("{:?}", external_id).into()
3779            } else {
3780                String::new().into()
3781            },
3782        ]
3783    }
3784
3785    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3786        vec![
3787            "name".into(),
3788            "job_dimension_id".into(),
3789            "external_id".into(),
3790        ]
3791    }
3792}
3793
3794#[doc = "JobCodeSummary."]
3795#[derive(
3796    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3797)]
3798pub struct JobCodeSummary {
3799    #[doc = "List of job code ids that this summary is tracking hours for."]
3800    #[serde(default, skip_serializing_if = "Option::is_none")]
3801    pub job_codes_id: Option<Vec<String>>,
3802    #[doc = "The total hours worked for the job codes."]
3803    #[serde(default, skip_serializing_if = "Option::is_none")]
3804    pub hours_worked: Option<f64>,
3805}
3806
3807impl std::fmt::Display for JobCodeSummary {
3808    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3809        write!(
3810            f,
3811            "{}",
3812            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3813        )
3814    }
3815}
3816
3817#[cfg(feature = "tabled")]
3818impl tabled::Tabled for JobCodeSummary {
3819    const LENGTH: usize = 2;
3820    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3821        vec![
3822            if let Some(job_codes_id) = &self.job_codes_id {
3823                format!("{:?}", job_codes_id).into()
3824            } else {
3825                String::new().into()
3826            },
3827            if let Some(hours_worked) = &self.hours_worked {
3828                format!("{:?}", hours_worked).into()
3829            } else {
3830                String::new().into()
3831            },
3832        ]
3833    }
3834
3835    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3836        vec!["job_codes_id".into(), "hours_worked".into()]
3837    }
3838}
3839
3840#[doc = "JobDimension."]
3841#[derive(
3842    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3843)]
3844pub struct JobDimension {
3845    #[doc = "Identifier field"]
3846    pub id: String,
3847    #[doc = "Record creation date"]
3848    pub created_at: String,
3849    #[doc = "Record update date"]
3850    pub updated_at: String,
3851    #[doc = "The name of the job dimension"]
3852    pub name: String,
3853    #[doc = "The unique identifier of the job dimension in a third party system"]
3854    #[serde(default, skip_serializing_if = "Option::is_none")]
3855    pub external_id: Option<String>,
3856}
3857
3858impl std::fmt::Display for JobDimension {
3859    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3860        write!(
3861            f,
3862            "{}",
3863            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3864        )
3865    }
3866}
3867
3868#[cfg(feature = "tabled")]
3869impl tabled::Tabled for JobDimension {
3870    const LENGTH: usize = 5;
3871    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3872        vec![
3873            self.id.clone().into(),
3874            self.created_at.clone().into(),
3875            self.updated_at.clone().into(),
3876            self.name.clone().into(),
3877            if let Some(external_id) = &self.external_id {
3878                format!("{:?}", external_id).into()
3879            } else {
3880                String::new().into()
3881            },
3882        ]
3883    }
3884
3885    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3886        vec![
3887            "id".into(),
3888            "created_at".into(),
3889            "updated_at".into(),
3890            "name".into(),
3891            "external_id".into(),
3892        ]
3893    }
3894}
3895
3896#[doc = "JobDimensionRequest."]
3897#[derive(
3898    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3899)]
3900pub struct JobDimensionRequest {
3901    #[doc = "The name of the job dimension"]
3902    pub name: String,
3903    #[doc = "The unique identifier of the job dimension in a third party system"]
3904    #[serde(default, skip_serializing_if = "Option::is_none")]
3905    pub external_id: Option<String>,
3906}
3907
3908impl std::fmt::Display for JobDimensionRequest {
3909    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3910        write!(
3911            f,
3912            "{}",
3913            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3914        )
3915    }
3916}
3917
3918#[cfg(feature = "tabled")]
3919impl tabled::Tabled for JobDimensionRequest {
3920    const LENGTH: usize = 2;
3921    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
3922        vec![
3923            self.name.clone().into(),
3924            if let Some(external_id) = &self.external_id {
3925                format!("{:?}", external_id).into()
3926            } else {
3927                String::new().into()
3928            },
3929        ]
3930    }
3931
3932    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
3933        vec!["name".into(), "external_id".into()]
3934    }
3935}
3936
3937#[doc = "Job requisition status"]
3938#[derive(
3939    serde :: Serialize,
3940    serde :: Deserialize,
3941    PartialEq,
3942    Hash,
3943    Debug,
3944    Clone,
3945    schemars :: JsonSchema,
3946    parse_display :: FromStr,
3947    parse_display :: Display,
3948)]
3949#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
3950#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
3951pub enum JobRequisitionStatus {
3952    #[serde(rename = "OPEN")]
3953    #[display("OPEN")]
3954    Open,
3955    #[serde(rename = "CLOSED")]
3956    #[display("CLOSED")]
3957    Closed,
3958    #[serde(rename = "PUBLISHED")]
3959    #[display("PUBLISHED")]
3960    Published,
3961    #[serde(rename = "DRAFT")]
3962    #[display("DRAFT")]
3963    Draft,
3964    #[serde(rename = "ARCHIVED")]
3965    #[display("ARCHIVED")]
3966    Archived,
3967}
3968
3969#[doc = "JobRequisition."]
3970#[derive(
3971    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
3972)]
3973pub struct JobRequisition {
3974    #[doc = "Identifier field"]
3975    pub id: String,
3976    #[doc = "Record creation date"]
3977    pub created_at: String,
3978    #[doc = "Record update date"]
3979    pub updated_at: String,
3980    #[doc = "Job requisition name"]
3981    pub name: String,
3982    #[doc = "Job requisition status"]
3983    pub status: JobRequisitionStatus,
3984}
3985
3986impl std::fmt::Display for JobRequisition {
3987    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
3988        write!(
3989            f,
3990            "{}",
3991            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
3992        )
3993    }
3994}
3995
3996#[cfg(feature = "tabled")]
3997impl tabled::Tabled for JobRequisition {
3998    const LENGTH: usize = 5;
3999    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4000        vec![
4001            self.id.clone().into(),
4002            self.created_at.clone().into(),
4003            self.updated_at.clone().into(),
4004            self.name.clone().into(),
4005            format!("{:?}", self.status).into(),
4006        ]
4007    }
4008
4009    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4010        vec![
4011            "id".into(),
4012            "created_at".into(),
4013            "updated_at".into(),
4014            "name".into(),
4015            "status".into(),
4016        ]
4017    }
4018}
4019
4020#[doc = "JobShift."]
4021#[derive(
4022    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4023)]
4024pub struct JobShift {
4025    #[doc = "The start time of the job shift."]
4026    #[serde(default, skip_serializing_if = "Option::is_none")]
4027    pub start_time: Option<String>,
4028    #[doc = "The end time of the job shift."]
4029    #[serde(default, skip_serializing_if = "Option::is_none")]
4030    pub end_time: Option<String>,
4031    #[doc = "The original start time of the job shift. If the startTime field has been rounded \
4032             then this contain the start time before the rounding occured."]
4033    #[serde(default, skip_serializing_if = "Option::is_none")]
4034    pub original_start_time: Option<String>,
4035    #[doc = "The original end time of the job shift. If the endTime field has been rounded then \
4036             this contain the end time before the rounding occured."]
4037    #[serde(default, skip_serializing_if = "Option::is_none")]
4038    pub original_end_time: Option<String>,
4039    #[doc = "The IDs of the job codes associated with the job shift."]
4040    #[serde(default, skip_serializing_if = "Option::is_none")]
4041    pub job_codes_id: Option<Vec<String>>,
4042    #[doc = "Whether the job shift was entered as a duration in hours table"]
4043    #[serde(default, skip_serializing_if = "Option::is_none")]
4044    pub is_hours_only_input: Option<bool>,
4045}
4046
4047impl std::fmt::Display for JobShift {
4048    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4049        write!(
4050            f,
4051            "{}",
4052            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4053        )
4054    }
4055}
4056
4057#[cfg(feature = "tabled")]
4058impl tabled::Tabled for JobShift {
4059    const LENGTH: usize = 6;
4060    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4061        vec![
4062            if let Some(start_time) = &self.start_time {
4063                format!("{:?}", start_time).into()
4064            } else {
4065                String::new().into()
4066            },
4067            if let Some(end_time) = &self.end_time {
4068                format!("{:?}", end_time).into()
4069            } else {
4070                String::new().into()
4071            },
4072            if let Some(original_start_time) = &self.original_start_time {
4073                format!("{:?}", original_start_time).into()
4074            } else {
4075                String::new().into()
4076            },
4077            if let Some(original_end_time) = &self.original_end_time {
4078                format!("{:?}", original_end_time).into()
4079            } else {
4080                String::new().into()
4081            },
4082            if let Some(job_codes_id) = &self.job_codes_id {
4083                format!("{:?}", job_codes_id).into()
4084            } else {
4085                String::new().into()
4086            },
4087            if let Some(is_hours_only_input) = &self.is_hours_only_input {
4088                format!("{:?}", is_hours_only_input).into()
4089            } else {
4090                String::new().into()
4091            },
4092        ]
4093    }
4094
4095    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4096        vec![
4097            "start_time".into(),
4098            "end_time".into(),
4099            "original_start_time".into(),
4100            "original_end_time".into(),
4101            "job_codes_id".into(),
4102            "is_hours_only_input".into(),
4103        ]
4104    }
4105}
4106
4107#[doc = "JobShiftRequest."]
4108#[derive(
4109    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4110)]
4111pub struct JobShiftRequest {
4112    #[doc = "The start time of the job shift."]
4113    #[serde(default, skip_serializing_if = "Option::is_none")]
4114    pub start_time: Option<String>,
4115    #[doc = "The end time of the job shift."]
4116    #[serde(default, skip_serializing_if = "Option::is_none")]
4117    pub end_time: Option<String>,
4118    #[doc = "The duration of the job shift."]
4119    #[serde(default, skip_serializing_if = "Option::is_none")]
4120    pub duration: Option<f64>,
4121    #[doc = "The date of the job shift if using duration."]
4122    #[serde(default, skip_serializing_if = "Option::is_none")]
4123    pub start_date: Option<String>,
4124    #[doc = "The original start time of the job shift. If the startTime field has been rounded \
4125             then this contain the start time before the rounding occured."]
4126    #[serde(default, skip_serializing_if = "Option::is_none")]
4127    pub original_start_time: Option<String>,
4128    #[doc = "The original end time of the job shift. If the endTime field has been rounded then \
4129             this contain the end time before the rounding occured."]
4130    #[serde(default, skip_serializing_if = "Option::is_none")]
4131    pub original_end_time: Option<String>,
4132    #[doc = "The IDs of the job codes associated with the job shift."]
4133    #[serde(default, skip_serializing_if = "Option::is_none")]
4134    pub job_codes_id: Option<Vec<String>>,
4135    #[doc = "Whether the job shift was entered as a duration in hours table"]
4136    #[serde(default, skip_serializing_if = "Option::is_none")]
4137    pub is_hours_only_input: Option<bool>,
4138}
4139
4140impl std::fmt::Display for JobShiftRequest {
4141    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4142        write!(
4143            f,
4144            "{}",
4145            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4146        )
4147    }
4148}
4149
4150#[cfg(feature = "tabled")]
4151impl tabled::Tabled for JobShiftRequest {
4152    const LENGTH: usize = 8;
4153    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4154        vec![
4155            if let Some(start_time) = &self.start_time {
4156                format!("{:?}", start_time).into()
4157            } else {
4158                String::new().into()
4159            },
4160            if let Some(end_time) = &self.end_time {
4161                format!("{:?}", end_time).into()
4162            } else {
4163                String::new().into()
4164            },
4165            if let Some(duration) = &self.duration {
4166                format!("{:?}", duration).into()
4167            } else {
4168                String::new().into()
4169            },
4170            if let Some(start_date) = &self.start_date {
4171                format!("{:?}", start_date).into()
4172            } else {
4173                String::new().into()
4174            },
4175            if let Some(original_start_time) = &self.original_start_time {
4176                format!("{:?}", original_start_time).into()
4177            } else {
4178                String::new().into()
4179            },
4180            if let Some(original_end_time) = &self.original_end_time {
4181                format!("{:?}", original_end_time).into()
4182            } else {
4183                String::new().into()
4184            },
4185            if let Some(job_codes_id) = &self.job_codes_id {
4186                format!("{:?}", job_codes_id).into()
4187            } else {
4188                String::new().into()
4189            },
4190            if let Some(is_hours_only_input) = &self.is_hours_only_input {
4191                format!("{:?}", is_hours_only_input).into()
4192            } else {
4193                String::new().into()
4194            },
4195        ]
4196    }
4197
4198    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4199        vec![
4200            "start_time".into(),
4201            "end_time".into(),
4202            "duration".into(),
4203            "start_date".into(),
4204            "original_start_time".into(),
4205            "original_end_time".into(),
4206            "job_codes_id".into(),
4207            "is_hours_only_input".into(),
4208        ]
4209    }
4210}
4211
4212#[doc = "LeaveBalance."]
4213#[derive(
4214    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4215)]
4216pub struct LeaveBalance {
4217    #[doc = "Identifier field"]
4218    pub id: String,
4219    #[doc = "Record creation date"]
4220    pub created_at: String,
4221    #[doc = "Record update date"]
4222    pub updated_at: String,
4223    #[doc = "The ID of the worker associated with the leave balance."]
4224    pub worker_id: String,
4225    #[doc = "The worker associated with the leave balance.\n\nExpandable field"]
4226    #[serde(default, skip_serializing_if = "Option::is_none")]
4227    pub worker: Option<Worker>,
4228    #[doc = "The ID of the leave type associated with the leave balance."]
4229    #[serde(default, skip_serializing_if = "Option::is_none")]
4230    pub leave_type_id: Option<String>,
4231    #[doc = "The leave type associated with the leave balance.\n\nExpandable field"]
4232    #[serde(default, skip_serializing_if = "Option::is_none")]
4233    pub leave_type: Option<LeaveType>,
4234    #[doc = "Indicates if the leave balance is unlimited."]
4235    #[serde(default, skip_serializing_if = "Option::is_none")]
4236    pub is_balance_unlimited: Option<bool>,
4237    #[doc = "The worker's leave balance including future leave requests. If the leave balance is \
4238             unlimited, this field will be null."]
4239    #[serde(default, skip_serializing_if = "Option::is_none")]
4240    pub balance_including_future_requests: Option<f64>,
4241    #[doc = "The worker's leave balance excluding future leave requests. If the leave balance is \
4242             unlimited, this field will be null."]
4243    #[serde(default, skip_serializing_if = "Option::is_none")]
4244    pub balance_excluding_future_requests: Option<f64>,
4245}
4246
4247impl std::fmt::Display for LeaveBalance {
4248    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4249        write!(
4250            f,
4251            "{}",
4252            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4253        )
4254    }
4255}
4256
4257#[cfg(feature = "tabled")]
4258impl tabled::Tabled for LeaveBalance {
4259    const LENGTH: usize = 10;
4260    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4261        vec![
4262            self.id.clone().into(),
4263            self.created_at.clone().into(),
4264            self.updated_at.clone().into(),
4265            self.worker_id.clone().into(),
4266            if let Some(worker) = &self.worker {
4267                format!("{:?}", worker).into()
4268            } else {
4269                String::new().into()
4270            },
4271            if let Some(leave_type_id) = &self.leave_type_id {
4272                format!("{:?}", leave_type_id).into()
4273            } else {
4274                String::new().into()
4275            },
4276            if let Some(leave_type) = &self.leave_type {
4277                format!("{:?}", leave_type).into()
4278            } else {
4279                String::new().into()
4280            },
4281            if let Some(is_balance_unlimited) = &self.is_balance_unlimited {
4282                format!("{:?}", is_balance_unlimited).into()
4283            } else {
4284                String::new().into()
4285            },
4286            if let Some(balance_including_future_requests) = &self.balance_including_future_requests
4287            {
4288                format!("{:?}", balance_including_future_requests).into()
4289            } else {
4290                String::new().into()
4291            },
4292            if let Some(balance_excluding_future_requests) = &self.balance_excluding_future_requests
4293            {
4294                format!("{:?}", balance_excluding_future_requests).into()
4295            } else {
4296                String::new().into()
4297            },
4298        ]
4299    }
4300
4301    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4302        vec![
4303            "id".into(),
4304            "created_at".into(),
4305            "updated_at".into(),
4306            "worker_id".into(),
4307            "worker".into(),
4308            "leave_type_id".into(),
4309            "leave_type".into(),
4310            "is_balance_unlimited".into(),
4311            "balance_including_future_requests".into(),
4312            "balance_excluding_future_requests".into(),
4313        ]
4314    }
4315}
4316
4317#[doc = "The status of the leave request."]
4318#[derive(
4319    serde :: Serialize,
4320    serde :: Deserialize,
4321    PartialEq,
4322    Hash,
4323    Debug,
4324    Clone,
4325    schemars :: JsonSchema,
4326    parse_display :: FromStr,
4327    parse_display :: Display,
4328)]
4329#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
4330#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
4331pub enum LeaveRequestStatus {
4332    #[serde(rename = "PENDING")]
4333    #[display("PENDING")]
4334    Pending,
4335    #[serde(rename = "APPROVED")]
4336    #[display("APPROVED")]
4337    Approved,
4338    #[serde(rename = "REJECTED")]
4339    #[display("REJECTED")]
4340    Rejected,
4341    #[serde(rename = "CANCELED")]
4342    #[display("CANCELED")]
4343    Canceled,
4344}
4345
4346#[doc = "LeaveRequest."]
4347#[derive(
4348    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4349)]
4350pub struct LeaveRequest {
4351    #[doc = "Identifier field"]
4352    pub id: String,
4353    #[doc = "Record creation date"]
4354    pub created_at: String,
4355    #[doc = "Record update date"]
4356    pub updated_at: String,
4357    #[doc = "The ID of the worker associated with the leave request."]
4358    pub worker_id: String,
4359    #[doc = "The worker associated with the leave request.\n\nExpandable field"]
4360    #[serde(default, skip_serializing_if = "Option::is_none")]
4361    pub worker: Option<Worker>,
4362    #[doc = "The ID of the worker who requested the leave request."]
4363    #[serde(default, skip_serializing_if = "Option::is_none")]
4364    pub requester_id: Option<String>,
4365    #[doc = "The worker who requested the leave request.\n\nExpandable field"]
4366    #[serde(default, skip_serializing_if = "Option::is_none")]
4367    pub requester: Option<Worker>,
4368    #[doc = "The status of the leave request."]
4369    pub status: LeaveRequestStatus,
4370    #[doc = "The start date of the leave request."]
4371    pub start_date: String,
4372    #[doc = "The start time of the leave request."]
4373    #[serde(default, skip_serializing_if = "Option::is_none")]
4374    pub start_time: Option<String>,
4375    #[doc = "The end date of the leave request."]
4376    pub end_date: String,
4377    #[doc = "The end time of the leave request."]
4378    #[serde(default, skip_serializing_if = "Option::is_none")]
4379    pub end_time: Option<String>,
4380    #[doc = "The comments associated with the leave request."]
4381    #[serde(default, skip_serializing_if = "Option::is_none")]
4382    pub comments: Option<String>,
4383    #[doc = "The number of minutes requested for the leave request."]
4384    #[serde(default, skip_serializing_if = "Option::is_none")]
4385    pub number_of_minutes_requested: Option<f64>,
4386    #[doc = "The ID of the leave policy associated with the leave request."]
4387    pub leave_policy_id: String,
4388    #[doc = "The ID of the leave type associated with the leave request."]
4389    #[serde(default, skip_serializing_if = "Option::is_none")]
4390    pub leave_type_id: Option<String>,
4391    #[doc = "The leave type associated with the leave request.\n\nExpandable field"]
4392    #[serde(default, skip_serializing_if = "Option::is_none")]
4393    pub leave_type: Option<LeaveType>,
4394    #[doc = "The reason for the leave request."]
4395    #[serde(default, skip_serializing_if = "Option::is_none")]
4396    pub reason_for_leave: Option<String>,
4397    #[doc = "The ID of the worker who reviewed the leave request."]
4398    #[serde(default, skip_serializing_if = "Option::is_none")]
4399    pub reviewer_id: Option<String>,
4400    #[doc = "The worker who reviewed the leave request.\n\nExpandable field"]
4401    #[serde(default, skip_serializing_if = "Option::is_none")]
4402    pub reviewer: Option<Worker>,
4403    #[doc = "The timestamp the leave request was reviewed."]
4404    #[serde(default, skip_serializing_if = "Option::is_none")]
4405    pub reviewed_at: Option<String>,
4406    #[doc = "The specific dates taken off and the amount of time taken off for each one."]
4407    #[serde(default, skip_serializing_if = "Option::is_none")]
4408    pub days_take_off: Option<Vec<DayOff>>,
4409    #[doc = "Whether the leave request is managed by an external system."]
4410    #[serde(default, skip_serializing_if = "Option::is_none")]
4411    pub is_managed_by_external_system: Option<bool>,
4412}
4413
4414impl std::fmt::Display for LeaveRequest {
4415    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4416        write!(
4417            f,
4418            "{}",
4419            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4420        )
4421    }
4422}
4423
4424#[cfg(feature = "tabled")]
4425impl tabled::Tabled for LeaveRequest {
4426    const LENGTH: usize = 23;
4427    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4428        vec![
4429            self.id.clone().into(),
4430            self.created_at.clone().into(),
4431            self.updated_at.clone().into(),
4432            self.worker_id.clone().into(),
4433            if let Some(worker) = &self.worker {
4434                format!("{:?}", worker).into()
4435            } else {
4436                String::new().into()
4437            },
4438            if let Some(requester_id) = &self.requester_id {
4439                format!("{:?}", requester_id).into()
4440            } else {
4441                String::new().into()
4442            },
4443            if let Some(requester) = &self.requester {
4444                format!("{:?}", requester).into()
4445            } else {
4446                String::new().into()
4447            },
4448            format!("{:?}", self.status).into(),
4449            self.start_date.clone().into(),
4450            if let Some(start_time) = &self.start_time {
4451                format!("{:?}", start_time).into()
4452            } else {
4453                String::new().into()
4454            },
4455            self.end_date.clone().into(),
4456            if let Some(end_time) = &self.end_time {
4457                format!("{:?}", end_time).into()
4458            } else {
4459                String::new().into()
4460            },
4461            if let Some(comments) = &self.comments {
4462                format!("{:?}", comments).into()
4463            } else {
4464                String::new().into()
4465            },
4466            if let Some(number_of_minutes_requested) = &self.number_of_minutes_requested {
4467                format!("{:?}", number_of_minutes_requested).into()
4468            } else {
4469                String::new().into()
4470            },
4471            self.leave_policy_id.clone().into(),
4472            if let Some(leave_type_id) = &self.leave_type_id {
4473                format!("{:?}", leave_type_id).into()
4474            } else {
4475                String::new().into()
4476            },
4477            if let Some(leave_type) = &self.leave_type {
4478                format!("{:?}", leave_type).into()
4479            } else {
4480                String::new().into()
4481            },
4482            if let Some(reason_for_leave) = &self.reason_for_leave {
4483                format!("{:?}", reason_for_leave).into()
4484            } else {
4485                String::new().into()
4486            },
4487            if let Some(reviewer_id) = &self.reviewer_id {
4488                format!("{:?}", reviewer_id).into()
4489            } else {
4490                String::new().into()
4491            },
4492            if let Some(reviewer) = &self.reviewer {
4493                format!("{:?}", reviewer).into()
4494            } else {
4495                String::new().into()
4496            },
4497            if let Some(reviewed_at) = &self.reviewed_at {
4498                format!("{:?}", reviewed_at).into()
4499            } else {
4500                String::new().into()
4501            },
4502            if let Some(days_take_off) = &self.days_take_off {
4503                format!("{:?}", days_take_off).into()
4504            } else {
4505                String::new().into()
4506            },
4507            if let Some(is_managed_by_external_system) = &self.is_managed_by_external_system {
4508                format!("{:?}", is_managed_by_external_system).into()
4509            } else {
4510                String::new().into()
4511            },
4512        ]
4513    }
4514
4515    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4516        vec![
4517            "id".into(),
4518            "created_at".into(),
4519            "updated_at".into(),
4520            "worker_id".into(),
4521            "worker".into(),
4522            "requester_id".into(),
4523            "requester".into(),
4524            "status".into(),
4525            "start_date".into(),
4526            "start_time".into(),
4527            "end_date".into(),
4528            "end_time".into(),
4529            "comments".into(),
4530            "number_of_minutes_requested".into(),
4531            "leave_policy_id".into(),
4532            "leave_type_id".into(),
4533            "leave_type".into(),
4534            "reason_for_leave".into(),
4535            "reviewer_id".into(),
4536            "reviewer".into(),
4537            "reviewed_at".into(),
4538            "days_take_off".into(),
4539            "is_managed_by_external_system".into(),
4540        ]
4541    }
4542}
4543
4544#[doc = "The status of the leave request."]
4545#[derive(
4546    serde :: Serialize,
4547    serde :: Deserialize,
4548    PartialEq,
4549    Hash,
4550    Debug,
4551    Clone,
4552    schemars :: JsonSchema,
4553    parse_display :: FromStr,
4554    parse_display :: Display,
4555)]
4556#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
4557#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
4558pub enum LeaveRequestRequestStatus {
4559    #[serde(rename = "PENDING")]
4560    #[display("PENDING")]
4561    Pending,
4562    #[serde(rename = "APPROVED")]
4563    #[display("APPROVED")]
4564    Approved,
4565    #[serde(rename = "REJECTED")]
4566    #[display("REJECTED")]
4567    Rejected,
4568    #[serde(rename = "CANCELED")]
4569    #[display("CANCELED")]
4570    Canceled,
4571}
4572
4573#[doc = "LeaveRequestRequest."]
4574#[derive(
4575    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4576)]
4577pub struct LeaveRequestRequest {
4578    #[doc = "The ID of the worker associated with the leave request."]
4579    pub worker_id: String,
4580    #[doc = "The ID of the worker who requested the leave request."]
4581    #[serde(default, skip_serializing_if = "Option::is_none")]
4582    pub requester_id: Option<String>,
4583    #[doc = "The status of the leave request."]
4584    pub status: LeaveRequestRequestStatus,
4585    #[doc = "The start date of the leave request."]
4586    pub start_date: String,
4587    #[doc = "The start time of the leave request."]
4588    #[serde(default, skip_serializing_if = "Option::is_none")]
4589    pub start_time: Option<String>,
4590    #[doc = "The end date of the leave request."]
4591    pub end_date: String,
4592    #[doc = "The end time of the leave request."]
4593    #[serde(default, skip_serializing_if = "Option::is_none")]
4594    pub end_time: Option<String>,
4595    #[doc = "The number of hours to take off on the start date."]
4596    #[serde(default, skip_serializing_if = "Option::is_none")]
4597    pub start_date_custom_hours: Option<f64>,
4598    #[doc = "The number of hours to take off on the end date."]
4599    #[serde(default, skip_serializing_if = "Option::is_none")]
4600    pub end_date_custom_hours: Option<f64>,
4601    #[doc = "The comments associated with the leave request."]
4602    #[serde(default, skip_serializing_if = "Option::is_none")]
4603    pub comments: Option<String>,
4604    #[doc = "The ID of the leave policy associated with the leave request."]
4605    pub leave_policy_id: String,
4606    #[doc = "The ID of the leave type associated with the leave request."]
4607    #[serde(default, skip_serializing_if = "Option::is_none")]
4608    pub leave_type_id: Option<String>,
4609    #[doc = "The reason for the leave request."]
4610    #[serde(default, skip_serializing_if = "Option::is_none")]
4611    pub reason_for_leave: Option<String>,
4612    #[doc = "The ID of the worker who reviewed the leave request."]
4613    #[serde(default, skip_serializing_if = "Option::is_none")]
4614    pub reviewer_id: Option<String>,
4615    #[doc = "The timestamp the leave request was reviewed."]
4616    #[serde(default, skip_serializing_if = "Option::is_none")]
4617    pub reviewed_at: Option<String>,
4618}
4619
4620impl std::fmt::Display for LeaveRequestRequest {
4621    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4622        write!(
4623            f,
4624            "{}",
4625            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4626        )
4627    }
4628}
4629
4630#[cfg(feature = "tabled")]
4631impl tabled::Tabled for LeaveRequestRequest {
4632    const LENGTH: usize = 15;
4633    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4634        vec![
4635            self.worker_id.clone().into(),
4636            if let Some(requester_id) = &self.requester_id {
4637                format!("{:?}", requester_id).into()
4638            } else {
4639                String::new().into()
4640            },
4641            format!("{:?}", self.status).into(),
4642            self.start_date.clone().into(),
4643            if let Some(start_time) = &self.start_time {
4644                format!("{:?}", start_time).into()
4645            } else {
4646                String::new().into()
4647            },
4648            self.end_date.clone().into(),
4649            if let Some(end_time) = &self.end_time {
4650                format!("{:?}", end_time).into()
4651            } else {
4652                String::new().into()
4653            },
4654            if let Some(start_date_custom_hours) = &self.start_date_custom_hours {
4655                format!("{:?}", start_date_custom_hours).into()
4656            } else {
4657                String::new().into()
4658            },
4659            if let Some(end_date_custom_hours) = &self.end_date_custom_hours {
4660                format!("{:?}", end_date_custom_hours).into()
4661            } else {
4662                String::new().into()
4663            },
4664            if let Some(comments) = &self.comments {
4665                format!("{:?}", comments).into()
4666            } else {
4667                String::new().into()
4668            },
4669            self.leave_policy_id.clone().into(),
4670            if let Some(leave_type_id) = &self.leave_type_id {
4671                format!("{:?}", leave_type_id).into()
4672            } else {
4673                String::new().into()
4674            },
4675            if let Some(reason_for_leave) = &self.reason_for_leave {
4676                format!("{:?}", reason_for_leave).into()
4677            } else {
4678                String::new().into()
4679            },
4680            if let Some(reviewer_id) = &self.reviewer_id {
4681                format!("{:?}", reviewer_id).into()
4682            } else {
4683                String::new().into()
4684            },
4685            if let Some(reviewed_at) = &self.reviewed_at {
4686                format!("{:?}", reviewed_at).into()
4687            } else {
4688                String::new().into()
4689            },
4690        ]
4691    }
4692
4693    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4694        vec![
4695            "worker_id".into(),
4696            "requester_id".into(),
4697            "status".into(),
4698            "start_date".into(),
4699            "start_time".into(),
4700            "end_date".into(),
4701            "end_time".into(),
4702            "start_date_custom_hours".into(),
4703            "end_date_custom_hours".into(),
4704            "comments".into(),
4705            "leave_policy_id".into(),
4706            "leave_type_id".into(),
4707            "reason_for_leave".into(),
4708            "reviewer_id".into(),
4709            "reviewed_at".into(),
4710        ]
4711    }
4712}
4713
4714#[doc = "LeaveType."]
4715#[derive(
4716    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4717)]
4718pub struct LeaveType {
4719    #[doc = "Identifier field"]
4720    pub id: String,
4721    #[doc = "Record creation date"]
4722    pub created_at: String,
4723    #[doc = "Record update date"]
4724    pub updated_at: String,
4725    #[doc = "The type of leave."]
4726    #[serde(rename = "type")]
4727    pub type_: String,
4728    #[doc = "The name of the leave type."]
4729    pub name: String,
4730    #[doc = "The description of the leave type."]
4731    #[serde(default, skip_serializing_if = "Option::is_none")]
4732    pub description: Option<String>,
4733    #[doc = "Whether the leave is paid."]
4734    pub is_paid: bool,
4735    #[doc = "Whether the leave is managed by an external system."]
4736    pub is_managed_by_external_system: bool,
4737}
4738
4739impl std::fmt::Display for LeaveType {
4740    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4741        write!(
4742            f,
4743            "{}",
4744            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4745        )
4746    }
4747}
4748
4749#[cfg(feature = "tabled")]
4750impl tabled::Tabled for LeaveType {
4751    const LENGTH: usize = 8;
4752    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4753        vec![
4754            self.id.clone().into(),
4755            self.created_at.clone().into(),
4756            self.updated_at.clone().into(),
4757            self.type_.clone().into(),
4758            self.name.clone().into(),
4759            if let Some(description) = &self.description {
4760                format!("{:?}", description).into()
4761            } else {
4762                String::new().into()
4763            },
4764            format!("{:?}", self.is_paid).into(),
4765            format!("{:?}", self.is_managed_by_external_system).into(),
4766        ]
4767    }
4768
4769    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4770        vec![
4771            "id".into(),
4772            "created_at".into(),
4773            "updated_at".into(),
4774            "type_".into(),
4775            "name".into(),
4776            "description".into(),
4777            "is_paid".into(),
4778            "is_managed_by_external_system".into(),
4779        ]
4780    }
4781}
4782
4783#[doc = "The legal entity's level in a hierarchy. * `PARENT`: The legal entity is considered the \
4784         ultimate holding entity. * `SUBSIDIARY`: The legal entity is considered a subsidiary, \
4785         fully or partially held by another. * `BRANCH`: The legal entity is considered a branch, \
4786         associated with a parent legal entity."]
4787#[derive(
4788    serde :: Serialize,
4789    serde :: Deserialize,
4790    PartialEq,
4791    Hash,
4792    Debug,
4793    Clone,
4794    schemars :: JsonSchema,
4795    parse_display :: FromStr,
4796    parse_display :: Display,
4797)]
4798#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
4799#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
4800pub enum EntityLevel {
4801    #[serde(rename = "PARENT")]
4802    #[display("PARENT")]
4803    Parent,
4804    #[serde(rename = "SUBSIDIARY")]
4805    #[display("SUBSIDIARY")]
4806    Subsidiary,
4807    #[serde(rename = "BRANCH")]
4808    #[display("BRANCH")]
4809    Branch,
4810}
4811
4812#[doc = "The legal entity management type in the case of an employer of record (EOR) or \
4813         professional employment organization (PEO). * `PEO`: The legal entity is considered a \
4814         Professional Employment Organization (PEO). * `EOR`: The legal entity is considered an \
4815         Employer of Record (EOR)."]
4816#[derive(
4817    serde :: Serialize,
4818    serde :: Deserialize,
4819    PartialEq,
4820    Hash,
4821    Debug,
4822    Clone,
4823    schemars :: JsonSchema,
4824    parse_display :: FromStr,
4825    parse_display :: Display,
4826)]
4827#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
4828#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
4829pub enum ManagementType {
4830    #[serde(rename = "PEO")]
4831    #[display("PEO")]
4832    Peo,
4833    #[serde(rename = "EOR")]
4834    #[display("EOR")]
4835    Eor,
4836}
4837
4838#[doc = "LegalEntity."]
4839#[derive(
4840    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4841)]
4842pub struct LegalEntity {
4843    #[doc = "Identifier field"]
4844    pub id: String,
4845    #[doc = "Record creation date"]
4846    pub created_at: String,
4847    #[doc = "Record update date"]
4848    pub updated_at: String,
4849    #[doc = "The tax identifier for the legal entity."]
4850    #[serde(default, skip_serializing_if = "Option::is_none")]
4851    pub tax_identifier: Option<String>,
4852    #[doc = "The country the legal entity is based in."]
4853    #[serde(default, skip_serializing_if = "Option::is_none")]
4854    pub country: Option<Country>,
4855    #[doc = "The legal name of the legal entity."]
4856    #[serde(default, skip_serializing_if = "Option::is_none")]
4857    pub legal_name: Option<String>,
4858    #[doc = "The legal entity's level in a hierarchy. * `PARENT`: The legal entity is considered \
4859             the ultimate holding entity. * `SUBSIDIARY`: The legal entity is considered a \
4860             subsidiary, fully or partially held by another. * `BRANCH`: The legal entity is \
4861             considered a branch, associated with a parent legal entity."]
4862    #[serde(default, skip_serializing_if = "Option::is_none")]
4863    pub entity_level: Option<EntityLevel>,
4864    #[doc = "The registration date of the entity."]
4865    #[serde(default, skip_serializing_if = "Option::is_none")]
4866    pub registration_date: Option<String>,
4867    #[doc = "The mailing address of the legal entity."]
4868    #[serde(default, skip_serializing_if = "Option::is_none")]
4869    pub mailing_address: Option<Address>,
4870    #[doc = "The physical address of the legal entity, if it differs from the mailing address."]
4871    #[serde(default, skip_serializing_if = "Option::is_none")]
4872    pub physical_address: Option<Address>,
4873    #[doc = "The parent legal entity."]
4874    #[serde(default, skip_serializing_if = "Option::is_none")]
4875    pub parent_id: Option<String>,
4876    #[doc = "The parent legal entity.\n\nExpandable field"]
4877    #[serde(default, skip_serializing_if = "Option::is_none")]
4878    pub parent: Option<Box<LegalEntity>>,
4879    #[doc = "The legal entity management type in the case of an employer of record (EOR) or \
4880             professional employment organization (PEO). * `PEO`: The legal entity is considered \
4881             a Professional Employment Organization (PEO). * `EOR`: The legal entity is \
4882             considered an Employer of Record (EOR)."]
4883    #[serde(default, skip_serializing_if = "Option::is_none")]
4884    pub management_type: Option<ManagementType>,
4885    #[doc = "The company or organization associated with the legal entity"]
4886    #[serde(default, skip_serializing_if = "Option::is_none")]
4887    pub company_id: Option<String>,
4888    #[doc = "The company or organization associated with the legal entity\n\nExpandable field"]
4889    #[serde(default, skip_serializing_if = "Option::is_none")]
4890    pub company: Option<Company>,
4891}
4892
4893impl std::fmt::Display for LegalEntity {
4894    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
4895        write!(
4896            f,
4897            "{}",
4898            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
4899        )
4900    }
4901}
4902
4903#[cfg(feature = "tabled")]
4904impl tabled::Tabled for LegalEntity {
4905    const LENGTH: usize = 15;
4906    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
4907        vec![
4908            self.id.clone().into(),
4909            self.created_at.clone().into(),
4910            self.updated_at.clone().into(),
4911            if let Some(tax_identifier) = &self.tax_identifier {
4912                format!("{:?}", tax_identifier).into()
4913            } else {
4914                String::new().into()
4915            },
4916            if let Some(country) = &self.country {
4917                format!("{:?}", country).into()
4918            } else {
4919                String::new().into()
4920            },
4921            if let Some(legal_name) = &self.legal_name {
4922                format!("{:?}", legal_name).into()
4923            } else {
4924                String::new().into()
4925            },
4926            if let Some(entity_level) = &self.entity_level {
4927                format!("{:?}", entity_level).into()
4928            } else {
4929                String::new().into()
4930            },
4931            if let Some(registration_date) = &self.registration_date {
4932                format!("{:?}", registration_date).into()
4933            } else {
4934                String::new().into()
4935            },
4936            if let Some(mailing_address) = &self.mailing_address {
4937                format!("{:?}", mailing_address).into()
4938            } else {
4939                String::new().into()
4940            },
4941            if let Some(physical_address) = &self.physical_address {
4942                format!("{:?}", physical_address).into()
4943            } else {
4944                String::new().into()
4945            },
4946            if let Some(parent_id) = &self.parent_id {
4947                format!("{:?}", parent_id).into()
4948            } else {
4949                String::new().into()
4950            },
4951            if let Some(parent) = &self.parent {
4952                format!("{:?}", parent).into()
4953            } else {
4954                String::new().into()
4955            },
4956            if let Some(management_type) = &self.management_type {
4957                format!("{:?}", management_type).into()
4958            } else {
4959                String::new().into()
4960            },
4961            if let Some(company_id) = &self.company_id {
4962                format!("{:?}", company_id).into()
4963            } else {
4964                String::new().into()
4965            },
4966            if let Some(company) = &self.company {
4967                format!("{:?}", company).into()
4968            } else {
4969                String::new().into()
4970            },
4971        ]
4972    }
4973
4974    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
4975        vec![
4976            "id".into(),
4977            "created_at".into(),
4978            "updated_at".into(),
4979            "tax_identifier".into(),
4980            "country".into(),
4981            "legal_name".into(),
4982            "entity_level".into(),
4983            "registration_date".into(),
4984            "mailing_address".into(),
4985            "physical_address".into(),
4986            "parent_id".into(),
4987            "parent".into(),
4988            "management_type".into(),
4989            "company_id".into(),
4990            "company".into(),
4991        ]
4992    }
4993}
4994
4995#[doc = "Level."]
4996#[derive(
4997    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
4998)]
4999pub struct Level {
5000    #[doc = "Identifier field"]
5001    pub id: String,
5002    #[doc = "Record creation date"]
5003    pub created_at: String,
5004    #[doc = "Record update date"]
5005    pub updated_at: String,
5006    #[doc = "The name of the level. Must be unique within the company or organization."]
5007    pub name: String,
5008    #[doc = "The parent level."]
5009    #[serde(default, skip_serializing_if = "Option::is_none")]
5010    pub parent_id: Option<String>,
5011    #[doc = "The parent level.\n\nExpandable field"]
5012    #[serde(default, skip_serializing_if = "Option::is_none")]
5013    pub parent: Option<Box<Level>>,
5014    #[doc = "Global level is used to track the seniority of levels. The higher up a level is \
5015             placed on the page, the more senior and higher-ranked the level. Global level is \
5016             used in workflows, policies, and reports that use the level attribute (e.g., you can \
5017             use Level Lookup to set up a workflow that notifies the nearest person in an \
5018             worker's management chain at or above the specified level)."]
5019    #[serde(default, skip_serializing_if = "Option::is_none")]
5020    pub global_level: Option<i64>,
5021    #[doc = "The description of the level."]
5022    #[serde(default, skip_serializing_if = "Option::is_none")]
5023    pub description: Option<String>,
5024    #[doc = "The rank of the level within its track."]
5025    #[serde(default, skip_serializing_if = "Option::is_none")]
5026    pub rank: Option<i64>,
5027    #[doc = "The track associated with the level, if it's not a global level."]
5028    #[serde(default, skip_serializing_if = "Option::is_none")]
5029    pub track_id: Option<String>,
5030    #[doc = "The track associated with the level, if it's not a global level.\n\nExpandable field"]
5031    #[serde(default, skip_serializing_if = "Option::is_none")]
5032    pub track: Option<Track>,
5033}
5034
5035impl std::fmt::Display for Level {
5036    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5037        write!(
5038            f,
5039            "{}",
5040            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5041        )
5042    }
5043}
5044
5045#[cfg(feature = "tabled")]
5046impl tabled::Tabled for Level {
5047    const LENGTH: usize = 11;
5048    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5049        vec![
5050            self.id.clone().into(),
5051            self.created_at.clone().into(),
5052            self.updated_at.clone().into(),
5053            self.name.clone().into(),
5054            if let Some(parent_id) = &self.parent_id {
5055                format!("{:?}", parent_id).into()
5056            } else {
5057                String::new().into()
5058            },
5059            if let Some(parent) = &self.parent {
5060                format!("{:?}", parent).into()
5061            } else {
5062                String::new().into()
5063            },
5064            if let Some(global_level) = &self.global_level {
5065                format!("{:?}", global_level).into()
5066            } else {
5067                String::new().into()
5068            },
5069            if let Some(description) = &self.description {
5070                format!("{:?}", description).into()
5071            } else {
5072                String::new().into()
5073            },
5074            if let Some(rank) = &self.rank {
5075                format!("{:?}", rank).into()
5076            } else {
5077                String::new().into()
5078            },
5079            if let Some(track_id) = &self.track_id {
5080                format!("{:?}", track_id).into()
5081            } else {
5082                String::new().into()
5083            },
5084            if let Some(track) = &self.track {
5085                format!("{:?}", track).into()
5086            } else {
5087                String::new().into()
5088            },
5089        ]
5090    }
5091
5092    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5093        vec![
5094            "id".into(),
5095            "created_at".into(),
5096            "updated_at".into(),
5097            "name".into(),
5098            "parent_id".into(),
5099            "parent".into(),
5100            "global_level".into(),
5101            "description".into(),
5102            "rank".into(),
5103            "track_id".into(),
5104            "track".into(),
5105        ]
5106    }
5107}
5108
5109#[derive(
5110    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5111)]
5112pub struct Meta {
5113    #[serde(default, skip_serializing_if = "Option::is_none")]
5114    pub redacted_fields: Option<Vec<RedactedField>>,
5115}
5116
5117impl std::fmt::Display for Meta {
5118    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5119        write!(
5120            f,
5121            "{}",
5122            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5123        )
5124    }
5125}
5126
5127#[cfg(feature = "tabled")]
5128impl tabled::Tabled for Meta {
5129    const LENGTH: usize = 1;
5130    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5131        vec![if let Some(redacted_fields) = &self.redacted_fields {
5132            format!("{:?}", redacted_fields).into()
5133        } else {
5134            String::new().into()
5135        }]
5136    }
5137
5138    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5139        vec!["redacted_fields".into()]
5140    }
5141}
5142
5143#[doc = "Meta information for the response."]
5144#[derive(
5145    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5146)]
5147pub struct MetaResponse {
5148    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
5149    pub meta: Option<Meta>,
5150}
5151
5152impl std::fmt::Display for MetaResponse {
5153    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5154        write!(
5155            f,
5156            "{}",
5157            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5158        )
5159    }
5160}
5161
5162#[cfg(feature = "tabled")]
5163impl tabled::Tabled for MetaResponse {
5164    const LENGTH: usize = 1;
5165    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5166        vec![if let Some(meta) = &self.meta {
5167            format!("{:?}", meta).into()
5168        } else {
5169            String::new().into()
5170        }]
5171    }
5172
5173    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5174        vec!["meta".into()]
5175    }
5176}
5177
5178#[doc = "ObjectCategory."]
5179#[derive(
5180    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5181)]
5182pub struct ObjectCategory {
5183    #[doc = "Identifier field"]
5184    pub id: String,
5185    #[doc = "Record creation date"]
5186    pub created_at: String,
5187    #[doc = "Record update date"]
5188    pub updated_at: String,
5189    #[doc = "The name of the Custom Category"]
5190    pub name: String,
5191    #[doc = "The description of the Custom Category"]
5192    #[serde(default, skip_serializing_if = "Option::is_none")]
5193    pub description: Option<String>,
5194}
5195
5196impl std::fmt::Display for ObjectCategory {
5197    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5198        write!(
5199            f,
5200            "{}",
5201            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5202        )
5203    }
5204}
5205
5206#[cfg(feature = "tabled")]
5207impl tabled::Tabled for ObjectCategory {
5208    const LENGTH: usize = 5;
5209    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5210        vec![
5211            self.id.clone().into(),
5212            self.created_at.clone().into(),
5213            self.updated_at.clone().into(),
5214            self.name.clone().into(),
5215            if let Some(description) = &self.description {
5216                format!("{:?}", description).into()
5217            } else {
5218                String::new().into()
5219            },
5220        ]
5221    }
5222
5223    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5224        vec![
5225            "id".into(),
5226            "created_at".into(),
5227            "updated_at".into(),
5228            "name".into(),
5229            "description".into(),
5230        ]
5231    }
5232}
5233
5234#[doc = "PayPeriod."]
5235#[derive(
5236    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5237)]
5238pub struct PayPeriod {
5239    #[doc = "The start date of the pay period."]
5240    #[serde(default, skip_serializing_if = "Option::is_none")]
5241    pub start_date: Option<String>,
5242    #[doc = "The end date of the pay period."]
5243    #[serde(default, skip_serializing_if = "Option::is_none")]
5244    pub end_date: Option<String>,
5245    #[doc = "The ID of the pay schedule associated with the pay period."]
5246    #[serde(default, skip_serializing_if = "Option::is_none")]
5247    pub pay_schedule_id: Option<String>,
5248}
5249
5250impl std::fmt::Display for PayPeriod {
5251    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5252        write!(
5253            f,
5254            "{}",
5255            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5256        )
5257    }
5258}
5259
5260#[cfg(feature = "tabled")]
5261impl tabled::Tabled for PayPeriod {
5262    const LENGTH: usize = 3;
5263    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5264        vec![
5265            if let Some(start_date) = &self.start_date {
5266                format!("{:?}", start_date).into()
5267            } else {
5268                String::new().into()
5269            },
5270            if let Some(end_date) = &self.end_date {
5271                format!("{:?}", end_date).into()
5272            } else {
5273                String::new().into()
5274            },
5275            if let Some(pay_schedule_id) = &self.pay_schedule_id {
5276                format!("{:?}", pay_schedule_id).into()
5277            } else {
5278                String::new().into()
5279            },
5280        ]
5281    }
5282
5283    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5284        vec![
5285            "start_date".into(),
5286            "end_date".into(),
5287            "pay_schedule_id".into(),
5288        ]
5289    }
5290}
5291
5292#[doc = "PayPeriodRequest."]
5293#[derive(
5294    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5295)]
5296pub struct PayPeriodRequest {
5297    #[doc = "The start date of the pay period."]
5298    #[serde(default, skip_serializing_if = "Option::is_none")]
5299    pub start_date: Option<String>,
5300    #[doc = "The end date of the pay period."]
5301    #[serde(default, skip_serializing_if = "Option::is_none")]
5302    pub end_date: Option<String>,
5303    #[doc = "The ID of the pay schedule associated with the pay period."]
5304    #[serde(default, skip_serializing_if = "Option::is_none")]
5305    pub pay_schedule_id: Option<String>,
5306}
5307
5308impl std::fmt::Display for PayPeriodRequest {
5309    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5310        write!(
5311            f,
5312            "{}",
5313            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5314        )
5315    }
5316}
5317
5318#[cfg(feature = "tabled")]
5319impl tabled::Tabled for PayPeriodRequest {
5320    const LENGTH: usize = 3;
5321    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5322        vec![
5323            if let Some(start_date) = &self.start_date {
5324                format!("{:?}", start_date).into()
5325            } else {
5326                String::new().into()
5327            },
5328            if let Some(end_date) = &self.end_date {
5329                format!("{:?}", end_date).into()
5330            } else {
5331                String::new().into()
5332            },
5333            if let Some(pay_schedule_id) = &self.pay_schedule_id {
5334                format!("{:?}", pay_schedule_id).into()
5335            } else {
5336                String::new().into()
5337            },
5338        ]
5339    }
5340
5341    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5342        vec![
5343            "start_date".into(),
5344            "end_date".into(),
5345            "pay_schedule_id".into(),
5346        ]
5347    }
5348}
5349
5350#[doc = "PieceRatePremiums."]
5351#[derive(
5352    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5353)]
5354pub struct PieceRatePremiums {
5355    #[doc = "The pay rate for this piece rate premium."]
5356    #[serde(default, skip_serializing_if = "Option::is_none")]
5357    pub premium_rate: Option<f64>,
5358    #[doc = "The total units produced at the premium rate."]
5359    #[serde(default, skip_serializing_if = "Option::is_none")]
5360    pub premium_units: Option<f64>,
5361}
5362
5363impl std::fmt::Display for PieceRatePremiums {
5364    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5365        write!(
5366            f,
5367            "{}",
5368            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5369        )
5370    }
5371}
5372
5373#[cfg(feature = "tabled")]
5374impl tabled::Tabled for PieceRatePremiums {
5375    const LENGTH: usize = 2;
5376    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5377        vec![
5378            if let Some(premium_rate) = &self.premium_rate {
5379                format!("{:?}", premium_rate).into()
5380            } else {
5381                String::new().into()
5382            },
5383            if let Some(premium_units) = &self.premium_units {
5384                format!("{:?}", premium_units).into()
5385            } else {
5386                String::new().into()
5387            },
5388        ]
5389    }
5390
5391    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5392        vec!["premium_rate".into(), "premium_units".into()]
5393    }
5394}
5395
5396#[doc = "Premiums."]
5397#[derive(
5398    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5399)]
5400pub struct Premiums {
5401    #[doc = "The pay rate for this premium."]
5402    #[serde(default, skip_serializing_if = "Option::is_none")]
5403    pub premium_rate: Option<f64>,
5404    #[doc = "The total hours worked for at the premium rate."]
5405    #[serde(default, skip_serializing_if = "Option::is_none")]
5406    pub premium_hours: Option<f64>,
5407}
5408
5409impl std::fmt::Display for Premiums {
5410    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5411        write!(
5412            f,
5413            "{}",
5414            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5415        )
5416    }
5417}
5418
5419#[cfg(feature = "tabled")]
5420impl tabled::Tabled for Premiums {
5421    const LENGTH: usize = 2;
5422    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5423        vec![
5424            if let Some(premium_rate) = &self.premium_rate {
5425                format!("{:?}", premium_rate).into()
5426            } else {
5427                String::new().into()
5428            },
5429            if let Some(premium_hours) = &self.premium_hours {
5430                format!("{:?}", premium_hours).into()
5431            } else {
5432                String::new().into()
5433            },
5434        ]
5435    }
5436
5437    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5438        vec!["premium_rate".into(), "premium_hours".into()]
5439    }
5440}
5441
5442#[doc = "Prototype."]
5443#[derive(
5444    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5445)]
5446pub struct Prototype {}
5447
5448impl std::fmt::Display for Prototype {
5449    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5450        write!(
5451            f,
5452            "{}",
5453            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5454        )
5455    }
5456}
5457
5458#[cfg(feature = "tabled")]
5459impl tabled::Tabled for Prototype {
5460    const LENGTH: usize = 0;
5461    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5462        vec![]
5463    }
5464
5465    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5466        vec![]
5467    }
5468}
5469
5470#[doc = "PrototypeJob."]
5471#[derive(
5472    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5473)]
5474pub struct PrototypeJob {
5475    #[doc = "Identifier field"]
5476    pub id: String,
5477    #[doc = "Record creation date"]
5478    pub created_at: String,
5479    #[doc = "Record update date"]
5480    pub updated_at: String,
5481    #[doc = "The worker's ID."]
5482    #[serde(default, skip_serializing_if = "Option::is_none")]
5483    pub prototype_id: Option<String>,
5484    #[doc = "Job title"]
5485    #[serde(default, skip_serializing_if = "Option::is_none")]
5486    pub title: Option<String>,
5487    #[doc = "Work location for the job\n\nExpandable field"]
5488    #[serde(default, skip_serializing_if = "Option::is_none")]
5489    pub work_location: Option<PrototypeWorkLocation>,
5490}
5491
5492impl std::fmt::Display for PrototypeJob {
5493    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5494        write!(
5495            f,
5496            "{}",
5497            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5498        )
5499    }
5500}
5501
5502#[cfg(feature = "tabled")]
5503impl tabled::Tabled for PrototypeJob {
5504    const LENGTH: usize = 6;
5505    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5506        vec![
5507            self.id.clone().into(),
5508            self.created_at.clone().into(),
5509            self.updated_at.clone().into(),
5510            if let Some(prototype_id) = &self.prototype_id {
5511                format!("{:?}", prototype_id).into()
5512            } else {
5513                String::new().into()
5514            },
5515            if let Some(title) = &self.title {
5516                format!("{:?}", title).into()
5517            } else {
5518                String::new().into()
5519            },
5520            if let Some(work_location) = &self.work_location {
5521                format!("{:?}", work_location).into()
5522            } else {
5523                String::new().into()
5524            },
5525        ]
5526    }
5527
5528    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5529        vec![
5530            "id".into(),
5531            "created_at".into(),
5532            "updated_at".into(),
5533            "prototype_id".into(),
5534            "title".into(),
5535            "work_location".into(),
5536        ]
5537    }
5538}
5539
5540#[doc = "PrototypeWorkLocation."]
5541#[derive(
5542    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5543)]
5544pub struct PrototypeWorkLocation {
5545    #[doc = "Identifier field"]
5546    pub id: String,
5547    #[doc = "Record creation date"]
5548    pub created_at: String,
5549    #[doc = "Record update date"]
5550    pub updated_at: String,
5551    #[doc = "Address for the work location"]
5552    #[serde(default, skip_serializing_if = "Option::is_none")]
5553    pub address: Option<String>,
5554    #[doc = "Whether the work location is remote"]
5555    #[serde(default, skip_serializing_if = "Option::is_none")]
5556    pub is_remote: Option<bool>,
5557}
5558
5559impl std::fmt::Display for PrototypeWorkLocation {
5560    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5561        write!(
5562            f,
5563            "{}",
5564            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5565        )
5566    }
5567}
5568
5569#[cfg(feature = "tabled")]
5570impl tabled::Tabled for PrototypeWorkLocation {
5571    const LENGTH: usize = 5;
5572    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5573        vec![
5574            self.id.clone().into(),
5575            self.created_at.clone().into(),
5576            self.updated_at.clone().into(),
5577            if let Some(address) = &self.address {
5578                format!("{:?}", address).into()
5579            } else {
5580                String::new().into()
5581            },
5582            if let Some(is_remote) = &self.is_remote {
5583                format!("{:?}", is_remote).into()
5584            } else {
5585                String::new().into()
5586            },
5587        ]
5588    }
5589
5590    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5591        vec![
5592            "id".into(),
5593            "created_at".into(),
5594            "updated_at".into(),
5595            "address".into(),
5596            "is_remote".into(),
5597        ]
5598    }
5599}
5600
5601#[doc = "Info about the redacted fields."]
5602#[derive(
5603    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5604)]
5605pub struct RedactedField {
5606    #[doc = "The name for the redacted field"]
5607    #[serde(default, skip_serializing_if = "Option::is_none")]
5608    pub name: Option<String>,
5609    #[doc = "The reason for the redaction"]
5610    #[serde(default, skip_serializing_if = "Option::is_none")]
5611    pub reason: Option<String>,
5612}
5613
5614impl std::fmt::Display for RedactedField {
5615    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5616        write!(
5617            f,
5618            "{}",
5619            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5620        )
5621    }
5622}
5623
5624#[cfg(feature = "tabled")]
5625impl tabled::Tabled for RedactedField {
5626    const LENGTH: usize = 2;
5627    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5628        vec![
5629            if let Some(name) = &self.name {
5630                format!("{:?}", name).into()
5631            } else {
5632                String::new().into()
5633            },
5634            if let Some(reason) = &self.reason {
5635                format!("{:?}", reason).into()
5636            } else {
5637                String::new().into()
5638            },
5639        ]
5640    }
5641
5642    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5643        vec!["name".into(), "reason".into()]
5644    }
5645}
5646
5647#[derive(
5648    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5649)]
5650pub struct RedactedFieldsRedactedFields {
5651    #[doc = "The name for the redacted field"]
5652    #[serde(default, skip_serializing_if = "Option::is_none")]
5653    pub name: Option<String>,
5654    #[doc = "The reason for the redaction"]
5655    #[serde(default, skip_serializing_if = "Option::is_none")]
5656    pub reason: Option<String>,
5657}
5658
5659impl std::fmt::Display for RedactedFieldsRedactedFields {
5660    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5661        write!(
5662            f,
5663            "{}",
5664            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5665        )
5666    }
5667}
5668
5669#[cfg(feature = "tabled")]
5670impl tabled::Tabled for RedactedFieldsRedactedFields {
5671    const LENGTH: usize = 2;
5672    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5673        vec![
5674            if let Some(name) = &self.name {
5675                format!("{:?}", name).into()
5676            } else {
5677                String::new().into()
5678            },
5679            if let Some(reason) = &self.reason {
5680                format!("{:?}", reason).into()
5681            } else {
5682                String::new().into()
5683            },
5684        ]
5685    }
5686
5687    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5688        vec!["name".into(), "reason".into()]
5689    }
5690}
5691
5692#[doc = "A list of redacted fields."]
5693#[derive(
5694    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5695)]
5696pub struct RedactedFields {
5697    #[serde(default, skip_serializing_if = "Option::is_none")]
5698    pub redacted_fields: Option<Vec<RedactedFieldsRedactedFields>>,
5699}
5700
5701impl std::fmt::Display for RedactedFields {
5702    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5703        write!(
5704            f,
5705            "{}",
5706            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5707        )
5708    }
5709}
5710
5711#[cfg(feature = "tabled")]
5712impl tabled::Tabled for RedactedFields {
5713    const LENGTH: usize = 1;
5714    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5715        vec![if let Some(redacted_fields) = &self.redacted_fields {
5716            format!("{:?}", redacted_fields).into()
5717        } else {
5718            String::new().into()
5719        }]
5720    }
5721
5722    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5723        vec!["redacted_fields".into()]
5724    }
5725}
5726
5727#[doc = "Ssome."]
5728#[derive(
5729    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5730)]
5731pub struct Ssome {
5732    #[doc = "Identifier field"]
5733    pub id: String,
5734    #[doc = "Record creation date"]
5735    pub created_at: String,
5736    #[doc = "Record update date"]
5737    pub updated_at: String,
5738    #[doc = "The user's work email address."]
5739    #[serde(default, skip_serializing_if = "Option::is_none")]
5740    pub work_email: Option<String>,
5741    #[doc = "The company ID of the user."]
5742    #[serde(default, skip_serializing_if = "Option::is_none")]
5743    pub company_id: Option<String>,
5744    #[doc = "The company of the user.\n\nExpandable field"]
5745    #[serde(default, skip_serializing_if = "Option::is_none")]
5746    pub company: Option<Company>,
5747}
5748
5749impl std::fmt::Display for Ssome {
5750    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5751        write!(
5752            f,
5753            "{}",
5754            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5755        )
5756    }
5757}
5758
5759#[cfg(feature = "tabled")]
5760impl tabled::Tabled for Ssome {
5761    const LENGTH: usize = 6;
5762    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5763        vec![
5764            self.id.clone().into(),
5765            self.created_at.clone().into(),
5766            self.updated_at.clone().into(),
5767            if let Some(work_email) = &self.work_email {
5768                format!("{:?}", work_email).into()
5769            } else {
5770                String::new().into()
5771            },
5772            if let Some(company_id) = &self.company_id {
5773                format!("{:?}", company_id).into()
5774            } else {
5775                String::new().into()
5776            },
5777            if let Some(company) = &self.company {
5778                format!("{:?}", company).into()
5779            } else {
5780                String::new().into()
5781            },
5782        ]
5783    }
5784
5785    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5786        vec![
5787            "id".into(),
5788            "created_at".into(),
5789            "updated_at".into(),
5790            "work_email".into(),
5791            "company_id".into(),
5792            "company".into(),
5793        ]
5794    }
5795}
5796
5797#[doc = "Segments."]
5798#[derive(
5799    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5800)]
5801pub struct Segments {
5802    #[doc = "The start time of the segment."]
5803    #[serde(default, skip_serializing_if = "Option::is_none")]
5804    pub start_time: Option<String>,
5805    #[doc = "The end time of the segment."]
5806    #[serde(default, skip_serializing_if = "Option::is_none")]
5807    pub end_time: Option<String>,
5808    #[doc = "The IDs of the job codes associated with the segment."]
5809    #[serde(default, skip_serializing_if = "Option::is_none")]
5810    pub job_codes_id: Option<Vec<String>>,
5811    #[doc = "The multiplier for overtime hours in this segment."]
5812    #[serde(default, skip_serializing_if = "Option::is_none")]
5813    pub ot_multiplier: Option<f64>,
5814    #[doc = "Name of the final earning for the segment."]
5815    #[serde(default, skip_serializing_if = "Option::is_none")]
5816    pub display_name: Option<String>,
5817    #[doc = "The ID of the break type."]
5818    #[serde(default, skip_serializing_if = "Option::is_none")]
5819    pub break_type_id: Option<String>,
5820    #[doc = "The pay rate for this segment."]
5821    #[serde(default, skip_serializing_if = "Option::is_none")]
5822    pub pay_rate: Option<f64>,
5823}
5824
5825impl std::fmt::Display for Segments {
5826    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5827        write!(
5828            f,
5829            "{}",
5830            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5831        )
5832    }
5833}
5834
5835#[cfg(feature = "tabled")]
5836impl tabled::Tabled for Segments {
5837    const LENGTH: usize = 7;
5838    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5839        vec![
5840            if let Some(start_time) = &self.start_time {
5841                format!("{:?}", start_time).into()
5842            } else {
5843                String::new().into()
5844            },
5845            if let Some(end_time) = &self.end_time {
5846                format!("{:?}", end_time).into()
5847            } else {
5848                String::new().into()
5849            },
5850            if let Some(job_codes_id) = &self.job_codes_id {
5851                format!("{:?}", job_codes_id).into()
5852            } else {
5853                String::new().into()
5854            },
5855            if let Some(ot_multiplier) = &self.ot_multiplier {
5856                format!("{:?}", ot_multiplier).into()
5857            } else {
5858                String::new().into()
5859            },
5860            if let Some(display_name) = &self.display_name {
5861                format!("{:?}", display_name).into()
5862            } else {
5863                String::new().into()
5864            },
5865            if let Some(break_type_id) = &self.break_type_id {
5866                format!("{:?}", break_type_id).into()
5867            } else {
5868                String::new().into()
5869            },
5870            if let Some(pay_rate) = &self.pay_rate {
5871                format!("{:?}", pay_rate).into()
5872            } else {
5873                String::new().into()
5874            },
5875        ]
5876    }
5877
5878    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5879        vec![
5880            "start_time".into(),
5881            "end_time".into(),
5882            "job_codes_id".into(),
5883            "ot_multiplier".into(),
5884            "display_name".into(),
5885            "break_type_id".into(),
5886            "pay_rate".into(),
5887        ]
5888    }
5889}
5890
5891#[doc = "ShiftInput."]
5892#[derive(
5893    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5894)]
5895pub struct ShiftInput {
5896    #[doc = "Identifier field"]
5897    pub id: String,
5898    #[doc = "Record creation date"]
5899    pub created_at: String,
5900    #[doc = "Record update date"]
5901    pub updated_at: String,
5902    #[doc = "The creator id associated with the shift input."]
5903    #[serde(default, skip_serializing_if = "Option::is_none")]
5904    pub creator_id: Option<String>,
5905    #[doc = "The creator associated with the shift input.\n\nExpandable field"]
5906    #[serde(default, skip_serializing_if = "Option::is_none")]
5907    pub creator: Option<Worker>,
5908    #[doc = "Name of the shift unit."]
5909    pub name: String,
5910    #[doc = "Prompt for the shift unit."]
5911    pub prompt: String,
5912    #[doc = "Type of shift unit."]
5913    #[serde(rename = "type")]
5914    pub type_: String,
5915    #[doc = "Two letter string designating country code which the shift input is associated."]
5916    pub country_code: String,
5917    #[doc = "The party that manages this shift input"]
5918    #[serde(default, skip_serializing_if = "Option::is_none")]
5919    pub managed_by: Option<String>,
5920}
5921
5922impl std::fmt::Display for ShiftInput {
5923    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5924        write!(
5925            f,
5926            "{}",
5927            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
5928        )
5929    }
5930}
5931
5932#[cfg(feature = "tabled")]
5933impl tabled::Tabled for ShiftInput {
5934    const LENGTH: usize = 10;
5935    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
5936        vec![
5937            self.id.clone().into(),
5938            self.created_at.clone().into(),
5939            self.updated_at.clone().into(),
5940            if let Some(creator_id) = &self.creator_id {
5941                format!("{:?}", creator_id).into()
5942            } else {
5943                String::new().into()
5944            },
5945            if let Some(creator) = &self.creator {
5946                format!("{:?}", creator).into()
5947            } else {
5948                String::new().into()
5949            },
5950            self.name.clone().into(),
5951            self.prompt.clone().into(),
5952            self.type_.clone().into(),
5953            self.country_code.clone().into(),
5954            if let Some(managed_by) = &self.managed_by {
5955                format!("{:?}", managed_by).into()
5956            } else {
5957                String::new().into()
5958            },
5959        ]
5960    }
5961
5962    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
5963        vec![
5964            "id".into(),
5965            "created_at".into(),
5966            "updated_at".into(),
5967            "creator_id".into(),
5968            "creator".into(),
5969            "name".into(),
5970            "prompt".into(),
5971            "type_".into(),
5972            "country_code".into(),
5973            "managed_by".into(),
5974        ]
5975    }
5976}
5977
5978#[doc = "ShiftInputRequest."]
5979#[derive(
5980    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
5981)]
5982pub struct ShiftInputRequest {
5983    #[doc = "The creator id associated with the shift input."]
5984    #[serde(default, skip_serializing_if = "Option::is_none")]
5985    pub creator_id: Option<String>,
5986    #[doc = "Name of the shift unit."]
5987    pub name: String,
5988    #[doc = "Prompt for the shift unit."]
5989    pub prompt: String,
5990    #[doc = "Type of shift unit."]
5991    #[serde(rename = "type")]
5992    pub type_: String,
5993    #[doc = "Two letter string designating country code which the shift input is associated."]
5994    pub country_code: String,
5995}
5996
5997impl std::fmt::Display for ShiftInputRequest {
5998    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
5999        write!(
6000            f,
6001            "{}",
6002            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6003        )
6004    }
6005}
6006
6007#[cfg(feature = "tabled")]
6008impl tabled::Tabled for ShiftInputRequest {
6009    const LENGTH: usize = 5;
6010    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6011        vec![
6012            if let Some(creator_id) = &self.creator_id {
6013                format!("{:?}", creator_id).into()
6014            } else {
6015                String::new().into()
6016            },
6017            self.name.clone().into(),
6018            self.prompt.clone().into(),
6019            self.type_.clone().into(),
6020            self.country_code.clone().into(),
6021        ]
6022    }
6023
6024    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6025        vec![
6026            "creator_id".into(),
6027            "name".into(),
6028            "prompt".into(),
6029            "type_".into(),
6030            "country_code".into(),
6031        ]
6032    }
6033}
6034
6035#[doc = "ShiftInputValue."]
6036#[derive(
6037    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6038)]
6039pub struct ShiftInputValue {
6040    #[doc = "The id of the relevant shift input"]
6041    pub shift_input_id: String,
6042    #[doc = "The id of the role that last added/updated this input."]
6043    #[serde(default, skip_serializing_if = "Option::is_none")]
6044    pub author_id: Option<String>,
6045}
6046
6047impl std::fmt::Display for ShiftInputValue {
6048    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6049        write!(
6050            f,
6051            "{}",
6052            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6053        )
6054    }
6055}
6056
6057#[cfg(feature = "tabled")]
6058impl tabled::Tabled for ShiftInputValue {
6059    const LENGTH: usize = 2;
6060    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6061        vec![
6062            self.shift_input_id.clone().into(),
6063            if let Some(author_id) = &self.author_id {
6064                format!("{:?}", author_id).into()
6065            } else {
6066                String::new().into()
6067            },
6068        ]
6069    }
6070
6071    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6072        vec!["shift_input_id".into(), "author_id".into()]
6073    }
6074}
6075
6076#[doc = "ShiftInputValueRequest."]
6077#[derive(
6078    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6079)]
6080pub struct ShiftInputValueRequest {
6081    #[doc = "The id of the relevant shift input"]
6082    pub shift_input_id: String,
6083    #[doc = "The id of the role that last added/updated this input."]
6084    #[serde(default, skip_serializing_if = "Option::is_none")]
6085    pub author_id: Option<String>,
6086}
6087
6088impl std::fmt::Display for ShiftInputValueRequest {
6089    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6090        write!(
6091            f,
6092            "{}",
6093            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6094        )
6095    }
6096}
6097
6098#[cfg(feature = "tabled")]
6099impl tabled::Tabled for ShiftInputValueRequest {
6100    const LENGTH: usize = 2;
6101    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6102        vec![
6103            self.shift_input_id.clone().into(),
6104            if let Some(author_id) = &self.author_id {
6105                format!("{:?}", author_id).into()
6106            } else {
6107                String::new().into()
6108            },
6109        ]
6110    }
6111
6112    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6113        vec!["shift_input_id".into(), "author_id".into()]
6114    }
6115}
6116
6117#[doc = "Team."]
6118#[derive(
6119    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6120)]
6121pub struct Team {
6122    #[doc = "Identifier field"]
6123    pub id: String,
6124    #[doc = "Record creation date"]
6125    pub created_at: String,
6126    #[doc = "Record update date"]
6127    pub updated_at: String,
6128    #[doc = "The parent team"]
6129    #[serde(default, skip_serializing_if = "Option::is_none")]
6130    pub parent_id: Option<String>,
6131    #[doc = "The parent team\n\nExpandable field"]
6132    #[serde(default, skip_serializing_if = "Option::is_none")]
6133    pub parent: Option<Box<Team>>,
6134    #[doc = "The name of the team."]
6135    pub name: String,
6136}
6137
6138impl std::fmt::Display for Team {
6139    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6140        write!(
6141            f,
6142            "{}",
6143            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6144        )
6145    }
6146}
6147
6148#[cfg(feature = "tabled")]
6149impl tabled::Tabled for Team {
6150    const LENGTH: usize = 6;
6151    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6152        vec![
6153            self.id.clone().into(),
6154            self.created_at.clone().into(),
6155            self.updated_at.clone().into(),
6156            if let Some(parent_id) = &self.parent_id {
6157                format!("{:?}", parent_id).into()
6158            } else {
6159                String::new().into()
6160            },
6161            if let Some(parent) = &self.parent {
6162                format!("{:?}", parent).into()
6163            } else {
6164                String::new().into()
6165            },
6166            self.name.clone().into(),
6167        ]
6168    }
6169
6170    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6171        vec![
6172            "id".into(),
6173            "created_at".into(),
6174            "updated_at".into(),
6175            "parent_id".into(),
6176            "parent".into(),
6177            "name".into(),
6178        ]
6179    }
6180}
6181
6182#[doc = "The termination type indicates whether the termination was voluntary or involuntary."]
6183#[derive(
6184    serde :: Serialize,
6185    serde :: Deserialize,
6186    PartialEq,
6187    Hash,
6188    Debug,
6189    Clone,
6190    schemars :: JsonSchema,
6191    parse_display :: FromStr,
6192    parse_display :: Display,
6193)]
6194#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
6195#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
6196pub enum TerminationDetailsType {
6197    #[serde(rename = "VOLUNTARY")]
6198    #[display("VOLUNTARY")]
6199    Voluntary,
6200    #[serde(rename = "INVOLUNTARY")]
6201    #[display("INVOLUNTARY")]
6202    Involuntary,
6203    #[serde(rename = "RETIREMENT")]
6204    #[display("RETIREMENT")]
6205    Retirement,
6206    #[serde(rename = "DEATH")]
6207    #[display("DEATH")]
6208    Death,
6209    #[serde(rename = "ABANDONMENT")]
6210    #[display("ABANDONMENT")]
6211    Abandonment,
6212    #[serde(rename = "OFFER_DECLINED")]
6213    #[display("OFFER_DECLINED")]
6214    OfferDeclined,
6215    #[serde(rename = "RESCIND")]
6216    #[display("RESCIND")]
6217    Rescind,
6218    #[serde(rename = "RENEGE")]
6219    #[display("RENEGE")]
6220    Renege,
6221}
6222
6223#[doc = "TerminationDetails."]
6224#[derive(
6225    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6226)]
6227pub struct TerminationDetails {
6228    #[doc = "The termination type indicates whether the termination was voluntary or involuntary."]
6229    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
6230    pub type_: Option<TerminationDetailsType>,
6231    #[doc = "This is a description that will be custom to each Rippling company."]
6232    #[serde(default, skip_serializing_if = "Option::is_none")]
6233    pub reason: Option<String>,
6234}
6235
6236impl std::fmt::Display for TerminationDetails {
6237    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6238        write!(
6239            f,
6240            "{}",
6241            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6242        )
6243    }
6244}
6245
6246#[cfg(feature = "tabled")]
6247impl tabled::Tabled for TerminationDetails {
6248    const LENGTH: usize = 2;
6249    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6250        vec![
6251            if let Some(type_) = &self.type_ {
6252                format!("{:?}", type_).into()
6253            } else {
6254                String::new().into()
6255            },
6256            if let Some(reason) = &self.reason {
6257                format!("{:?}", reason).into()
6258            } else {
6259                String::new().into()
6260            },
6261        ]
6262    }
6263
6264    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6265        vec!["type_".into(), "reason".into()]
6266    }
6267}
6268
6269#[doc = "TimeCard."]
6270#[derive(
6271    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6272)]
6273pub struct TimeCard {
6274    #[doc = "Identifier field"]
6275    pub id: String,
6276    #[doc = "Record creation date"]
6277    pub created_at: String,
6278    #[doc = "Record update date"]
6279    pub updated_at: String,
6280    #[doc = "The ID of the worker associated with the time card."]
6281    pub worker_id: String,
6282    #[doc = "The worker associated with the time card.\n\nExpandable field"]
6283    #[serde(default, skip_serializing_if = "Option::is_none")]
6284    pub worker: Option<Worker>,
6285    #[doc = "The pay period associated with the time card."]
6286    #[serde(default, skip_serializing_if = "Option::is_none")]
6287    pub pay_period: Option<PayPeriod>,
6288    #[doc = "The summary of the time card."]
6289    #[serde(default, skip_serializing_if = "Option::is_none")]
6290    pub summary: Option<TimeCardSummary>,
6291}
6292
6293impl std::fmt::Display for TimeCard {
6294    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6295        write!(
6296            f,
6297            "{}",
6298            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6299        )
6300    }
6301}
6302
6303#[cfg(feature = "tabled")]
6304impl tabled::Tabled for TimeCard {
6305    const LENGTH: usize = 7;
6306    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6307        vec![
6308            self.id.clone().into(),
6309            self.created_at.clone().into(),
6310            self.updated_at.clone().into(),
6311            self.worker_id.clone().into(),
6312            if let Some(worker) = &self.worker {
6313                format!("{:?}", worker).into()
6314            } else {
6315                String::new().into()
6316            },
6317            if let Some(pay_period) = &self.pay_period {
6318                format!("{:?}", pay_period).into()
6319            } else {
6320                String::new().into()
6321            },
6322            if let Some(summary) = &self.summary {
6323                format!("{:?}", summary).into()
6324            } else {
6325                String::new().into()
6326            },
6327        ]
6328    }
6329
6330    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6331        vec![
6332            "id".into(),
6333            "created_at".into(),
6334            "updated_at".into(),
6335            "worker_id".into(),
6336            "worker".into(),
6337            "pay_period".into(),
6338            "summary".into(),
6339        ]
6340    }
6341}
6342
6343#[doc = "TimeCardSummary."]
6344#[derive(
6345    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6346)]
6347pub struct TimeCardSummary {
6348    #[doc = "The earnings for the pay period."]
6349    #[serde(default, skip_serializing_if = "Option::is_none")]
6350    pub earnings: Option<f64>,
6351    #[doc = "The amount of hours worked for each job code for the pay period."]
6352    #[serde(default, skip_serializing_if = "Option::is_none")]
6353    pub hours_worked_by_job_code: Option<Vec<JobCodeSummary>>,
6354    #[doc = "The premiums for the pay period."]
6355    #[serde(default, skip_serializing_if = "Option::is_none")]
6356    pub premiums: Option<f64>,
6357    #[doc = "The approved hours for the pay period."]
6358    #[serde(default, skip_serializing_if = "Option::is_none")]
6359    pub approved_hours: Option<f64>,
6360    #[doc = "The paid hours for the pay period."]
6361    #[serde(default, skip_serializing_if = "Option::is_none")]
6362    pub paid_hours: Option<f64>,
6363    #[doc = "The total hours for the pay period."]
6364    #[serde(default, skip_serializing_if = "Option::is_none")]
6365    pub total_hours: Option<f64>,
6366    #[doc = "The total paid time off hours for the pay period."]
6367    #[serde(default, skip_serializing_if = "Option::is_none")]
6368    pub total_paid_time_off_hours: Option<f64>,
6369    #[doc = "The total holiday hours for the pay period."]
6370    #[serde(default, skip_serializing_if = "Option::is_none")]
6371    pub total_holiday_hours: Option<f64>,
6372    #[doc = "The total unpaid time off hours for the pay period."]
6373    #[serde(default, skip_serializing_if = "Option::is_none")]
6374    pub total_unpaid_time_off_hours: Option<f64>,
6375    #[doc = "The total number of regular hours worked during the pay period."]
6376    #[serde(default, skip_serializing_if = "Option::is_none")]
6377    pub regular_hours: Option<f64>,
6378    #[doc = "The total number of overtime hours worked during the pay period."]
6379    #[serde(default, skip_serializing_if = "Option::is_none")]
6380    pub overtime_hours: Option<f64>,
6381    #[doc = "The total number of doubletime hours worked during the pay period."]
6382    #[serde(default, skip_serializing_if = "Option::is_none")]
6383    pub double_overtime_hours: Option<f64>,
6384    #[doc = "The map of time entry to unpaidBreakHours in seconds"]
6385    #[serde(default, skip_serializing_if = "Option::is_none")]
6386    pub unpaid_break_hours_by_entry: Option<f64>,
6387}
6388
6389impl std::fmt::Display for TimeCardSummary {
6390    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6391        write!(
6392            f,
6393            "{}",
6394            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6395        )
6396    }
6397}
6398
6399#[cfg(feature = "tabled")]
6400impl tabled::Tabled for TimeCardSummary {
6401    const LENGTH: usize = 13;
6402    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6403        vec![
6404            if let Some(earnings) = &self.earnings {
6405                format!("{:?}", earnings).into()
6406            } else {
6407                String::new().into()
6408            },
6409            if let Some(hours_worked_by_job_code) = &self.hours_worked_by_job_code {
6410                format!("{:?}", hours_worked_by_job_code).into()
6411            } else {
6412                String::new().into()
6413            },
6414            if let Some(premiums) = &self.premiums {
6415                format!("{:?}", premiums).into()
6416            } else {
6417                String::new().into()
6418            },
6419            if let Some(approved_hours) = &self.approved_hours {
6420                format!("{:?}", approved_hours).into()
6421            } else {
6422                String::new().into()
6423            },
6424            if let Some(paid_hours) = &self.paid_hours {
6425                format!("{:?}", paid_hours).into()
6426            } else {
6427                String::new().into()
6428            },
6429            if let Some(total_hours) = &self.total_hours {
6430                format!("{:?}", total_hours).into()
6431            } else {
6432                String::new().into()
6433            },
6434            if let Some(total_paid_time_off_hours) = &self.total_paid_time_off_hours {
6435                format!("{:?}", total_paid_time_off_hours).into()
6436            } else {
6437                String::new().into()
6438            },
6439            if let Some(total_holiday_hours) = &self.total_holiday_hours {
6440                format!("{:?}", total_holiday_hours).into()
6441            } else {
6442                String::new().into()
6443            },
6444            if let Some(total_unpaid_time_off_hours) = &self.total_unpaid_time_off_hours {
6445                format!("{:?}", total_unpaid_time_off_hours).into()
6446            } else {
6447                String::new().into()
6448            },
6449            if let Some(regular_hours) = &self.regular_hours {
6450                format!("{:?}", regular_hours).into()
6451            } else {
6452                String::new().into()
6453            },
6454            if let Some(overtime_hours) = &self.overtime_hours {
6455                format!("{:?}", overtime_hours).into()
6456            } else {
6457                String::new().into()
6458            },
6459            if let Some(double_overtime_hours) = &self.double_overtime_hours {
6460                format!("{:?}", double_overtime_hours).into()
6461            } else {
6462                String::new().into()
6463            },
6464            if let Some(unpaid_break_hours_by_entry) = &self.unpaid_break_hours_by_entry {
6465                format!("{:?}", unpaid_break_hours_by_entry).into()
6466            } else {
6467                String::new().into()
6468            },
6469        ]
6470    }
6471
6472    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6473        vec![
6474            "earnings".into(),
6475            "hours_worked_by_job_code".into(),
6476            "premiums".into(),
6477            "approved_hours".into(),
6478            "paid_hours".into(),
6479            "total_hours".into(),
6480            "total_paid_time_off_hours".into(),
6481            "total_holiday_hours".into(),
6482            "total_unpaid_time_off_hours".into(),
6483            "regular_hours".into(),
6484            "overtime_hours".into(),
6485            "double_overtime_hours".into(),
6486            "unpaid_break_hours_by_entry".into(),
6487        ]
6488    }
6489}
6490
6491#[doc = "The status of the time entry."]
6492#[derive(
6493    serde :: Serialize,
6494    serde :: Deserialize,
6495    PartialEq,
6496    Hash,
6497    Debug,
6498    Clone,
6499    schemars :: JsonSchema,
6500    parse_display :: FromStr,
6501    parse_display :: Display,
6502)]
6503#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
6504#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
6505pub enum TimeEntryStatus {
6506    #[serde(rename = "DRAFT")]
6507    #[display("DRAFT")]
6508    Draft,
6509    #[serde(rename = "APPROVED")]
6510    #[display("APPROVED")]
6511    Approved,
6512    #[serde(rename = "PAID")]
6513    #[display("PAID")]
6514    Paid,
6515    #[serde(rename = "FINALIZED")]
6516    #[display("FINALIZED")]
6517    Finalized,
6518}
6519
6520#[doc = "TimeEntry."]
6521#[derive(
6522    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6523)]
6524pub struct TimeEntry {
6525    #[doc = "Identifier field"]
6526    pub id: String,
6527    #[doc = "Record creation date"]
6528    pub created_at: String,
6529    #[doc = "Record update date"]
6530    pub updated_at: String,
6531    #[doc = "The ID of the worker associated with the time entry."]
6532    pub worker_id: String,
6533    #[doc = "The worker associated with the time entry.\n\nExpandable field"]
6534    #[serde(default, skip_serializing_if = "Option::is_none")]
6535    pub worker: Option<Worker>,
6536    #[doc = "The start time of the time entry."]
6537    #[serde(default, skip_serializing_if = "Option::is_none")]
6538    pub start_time: Option<String>,
6539    #[doc = "The end time of the time entry."]
6540    #[serde(default, skip_serializing_if = "Option::is_none")]
6541    pub end_time: Option<String>,
6542    #[doc = "The comments associated with the time entry."]
6543    #[serde(default, skip_serializing_if = "Option::is_none")]
6544    pub comments: Option<Vec<TimeEntryComment>>,
6545    #[doc = "The job shifts worked during the time entry."]
6546    #[serde(default, skip_serializing_if = "Option::is_none")]
6547    pub job_shifts: Option<Vec<JobShift>>,
6548    #[doc = "The breaks taken during the time entry."]
6549    #[serde(default, skip_serializing_if = "Option::is_none")]
6550    pub breaks: Option<Vec<Break>>,
6551    #[doc = "The premiums earned during the time entry."]
6552    #[serde(default, skip_serializing_if = "Option::is_none")]
6553    pub premiums: Option<Vec<Premiums>>,
6554    #[doc = "The piece-rate premiums earned during the time entry."]
6555    #[serde(default, skip_serializing_if = "Option::is_none")]
6556    pub piece_rate_premiums: Option<Vec<PieceRatePremiums>>,
6557    #[doc = "The pay rates for each segment of the time entry."]
6558    #[serde(default, skip_serializing_if = "Option::is_none")]
6559    pub segments: Option<Vec<Segments>>,
6560    #[doc = "A summary of the time entry."]
6561    #[serde(default, skip_serializing_if = "Option::is_none")]
6562    pub time_entry_summary: Option<TimeEntrySummary>,
6563    #[doc = "The ID of the time card associated with the time entry."]
6564    #[serde(default, skip_serializing_if = "Option::is_none")]
6565    pub time_card_id: Option<String>,
6566    #[doc = "The time card associated with the time entry.\n\nExpandable field"]
6567    #[serde(default, skip_serializing_if = "Option::is_none")]
6568    pub time_card: Option<TimeCard>,
6569    #[doc = "The tags associated with the time entry."]
6570    #[serde(default, skip_serializing_if = "Option::is_none")]
6571    pub tags: Option<Vec<String>>,
6572    #[doc = "The unique key of the time entry in an outside system. If set, no other time entry \
6573             with the same key can be created."]
6574    #[serde(default, skip_serializing_if = "Option::is_none")]
6575    pub idempotency_key: Option<String>,
6576    #[doc = "Whether the time entry should create an extra hours run."]
6577    #[serde(default, skip_serializing_if = "Option::is_none")]
6578    pub create_extra_hours_run: Option<bool>,
6579    #[doc = "The status of the time entry."]
6580    #[serde(default, skip_serializing_if = "Option::is_none")]
6581    pub status: Option<TimeEntryStatus>,
6582    #[doc = "The pay period associated with the time card."]
6583    #[serde(default, skip_serializing_if = "Option::is_none")]
6584    pub pay_period: Option<PayPeriod>,
6585    #[doc = "Arbitrary shift inputs collected on the time entry"]
6586    #[serde(default, skip_serializing_if = "Option::is_none")]
6587    pub shift_input_values: Option<Vec<ShiftInputValue>>,
6588}
6589
6590impl std::fmt::Display for TimeEntry {
6591    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6592        write!(
6593            f,
6594            "{}",
6595            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6596        )
6597    }
6598}
6599
6600#[cfg(feature = "tabled")]
6601impl tabled::Tabled for TimeEntry {
6602    const LENGTH: usize = 22;
6603    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6604        vec![
6605            self.id.clone().into(),
6606            self.created_at.clone().into(),
6607            self.updated_at.clone().into(),
6608            self.worker_id.clone().into(),
6609            if let Some(worker) = &self.worker {
6610                format!("{:?}", worker).into()
6611            } else {
6612                String::new().into()
6613            },
6614            if let Some(start_time) = &self.start_time {
6615                format!("{:?}", start_time).into()
6616            } else {
6617                String::new().into()
6618            },
6619            if let Some(end_time) = &self.end_time {
6620                format!("{:?}", end_time).into()
6621            } else {
6622                String::new().into()
6623            },
6624            if let Some(comments) = &self.comments {
6625                format!("{:?}", comments).into()
6626            } else {
6627                String::new().into()
6628            },
6629            if let Some(job_shifts) = &self.job_shifts {
6630                format!("{:?}", job_shifts).into()
6631            } else {
6632                String::new().into()
6633            },
6634            if let Some(breaks) = &self.breaks {
6635                format!("{:?}", breaks).into()
6636            } else {
6637                String::new().into()
6638            },
6639            if let Some(premiums) = &self.premiums {
6640                format!("{:?}", premiums).into()
6641            } else {
6642                String::new().into()
6643            },
6644            if let Some(piece_rate_premiums) = &self.piece_rate_premiums {
6645                format!("{:?}", piece_rate_premiums).into()
6646            } else {
6647                String::new().into()
6648            },
6649            if let Some(segments) = &self.segments {
6650                format!("{:?}", segments).into()
6651            } else {
6652                String::new().into()
6653            },
6654            if let Some(time_entry_summary) = &self.time_entry_summary {
6655                format!("{:?}", time_entry_summary).into()
6656            } else {
6657                String::new().into()
6658            },
6659            if let Some(time_card_id) = &self.time_card_id {
6660                format!("{:?}", time_card_id).into()
6661            } else {
6662                String::new().into()
6663            },
6664            if let Some(time_card) = &self.time_card {
6665                format!("{:?}", time_card).into()
6666            } else {
6667                String::new().into()
6668            },
6669            if let Some(tags) = &self.tags {
6670                format!("{:?}", tags).into()
6671            } else {
6672                String::new().into()
6673            },
6674            if let Some(idempotency_key) = &self.idempotency_key {
6675                format!("{:?}", idempotency_key).into()
6676            } else {
6677                String::new().into()
6678            },
6679            if let Some(create_extra_hours_run) = &self.create_extra_hours_run {
6680                format!("{:?}", create_extra_hours_run).into()
6681            } else {
6682                String::new().into()
6683            },
6684            if let Some(status) = &self.status {
6685                format!("{:?}", status).into()
6686            } else {
6687                String::new().into()
6688            },
6689            if let Some(pay_period) = &self.pay_period {
6690                format!("{:?}", pay_period).into()
6691            } else {
6692                String::new().into()
6693            },
6694            if let Some(shift_input_values) = &self.shift_input_values {
6695                format!("{:?}", shift_input_values).into()
6696            } else {
6697                String::new().into()
6698            },
6699        ]
6700    }
6701
6702    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6703        vec![
6704            "id".into(),
6705            "created_at".into(),
6706            "updated_at".into(),
6707            "worker_id".into(),
6708            "worker".into(),
6709            "start_time".into(),
6710            "end_time".into(),
6711            "comments".into(),
6712            "job_shifts".into(),
6713            "breaks".into(),
6714            "premiums".into(),
6715            "piece_rate_premiums".into(),
6716            "segments".into(),
6717            "time_entry_summary".into(),
6718            "time_card_id".into(),
6719            "time_card".into(),
6720            "tags".into(),
6721            "idempotency_key".into(),
6722            "create_extra_hours_run".into(),
6723            "status".into(),
6724            "pay_period".into(),
6725            "shift_input_values".into(),
6726        ]
6727    }
6728}
6729
6730#[doc = "TimeEntryComment."]
6731#[derive(
6732    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6733)]
6734pub struct TimeEntryComment {
6735    #[doc = "The time the comment was created."]
6736    #[serde(default, skip_serializing_if = "Option::is_none")]
6737    pub created_at: Option<String>,
6738    #[doc = "The ID of the worker who made of the comment."]
6739    #[serde(default, skip_serializing_if = "Option::is_none")]
6740    pub author_id: Option<String>,
6741    #[doc = "The text of the comment."]
6742    #[serde(default, skip_serializing_if = "Option::is_none")]
6743    pub text: Option<String>,
6744}
6745
6746impl std::fmt::Display for TimeEntryComment {
6747    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6748        write!(
6749            f,
6750            "{}",
6751            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6752        )
6753    }
6754}
6755
6756#[cfg(feature = "tabled")]
6757impl tabled::Tabled for TimeEntryComment {
6758    const LENGTH: usize = 3;
6759    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6760        vec![
6761            if let Some(created_at) = &self.created_at {
6762                format!("{:?}", created_at).into()
6763            } else {
6764                String::new().into()
6765            },
6766            if let Some(author_id) = &self.author_id {
6767                format!("{:?}", author_id).into()
6768            } else {
6769                String::new().into()
6770            },
6771            if let Some(text) = &self.text {
6772                format!("{:?}", text).into()
6773            } else {
6774                String::new().into()
6775            },
6776        ]
6777    }
6778
6779    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6780        vec!["created_at".into(), "author_id".into(), "text".into()]
6781    }
6782}
6783
6784#[doc = "TimeEntryCommentRequest."]
6785#[derive(
6786    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6787)]
6788pub struct TimeEntryCommentRequest {
6789    #[doc = "The text of the comment."]
6790    #[serde(default, skip_serializing_if = "Option::is_none")]
6791    pub text: Option<String>,
6792}
6793
6794impl std::fmt::Display for TimeEntryCommentRequest {
6795    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6796        write!(
6797            f,
6798            "{}",
6799            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6800        )
6801    }
6802}
6803
6804#[cfg(feature = "tabled")]
6805impl tabled::Tabled for TimeEntryCommentRequest {
6806    const LENGTH: usize = 1;
6807    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6808        vec![if let Some(text) = &self.text {
6809            format!("{:?}", text).into()
6810        } else {
6811            String::new().into()
6812        }]
6813    }
6814
6815    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6816        vec!["text".into()]
6817    }
6818}
6819
6820#[doc = "The status of the time entry."]
6821#[derive(
6822    serde :: Serialize,
6823    serde :: Deserialize,
6824    PartialEq,
6825    Hash,
6826    Debug,
6827    Clone,
6828    schemars :: JsonSchema,
6829    parse_display :: FromStr,
6830    parse_display :: Display,
6831)]
6832#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
6833#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
6834pub enum TimeEntryRequestStatus {
6835    #[serde(rename = "DRAFT")]
6836    #[display("DRAFT")]
6837    Draft,
6838    #[serde(rename = "APPROVED")]
6839    #[display("APPROVED")]
6840    Approved,
6841    #[serde(rename = "PAID")]
6842    #[display("PAID")]
6843    Paid,
6844    #[serde(rename = "FINALIZED")]
6845    #[display("FINALIZED")]
6846    Finalized,
6847}
6848
6849#[doc = "TimeEntryRequest."]
6850#[derive(
6851    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6852)]
6853pub struct TimeEntryRequest {
6854    #[doc = "The ID of the worker associated with the time entry."]
6855    pub worker_id: String,
6856    #[doc = "The duration of the time entry."]
6857    #[serde(default, skip_serializing_if = "Option::is_none")]
6858    pub duration: Option<f64>,
6859    #[doc = "The comments associated with the time entry."]
6860    #[serde(default, skip_serializing_if = "Option::is_none")]
6861    pub comments: Option<Vec<TimeEntryCommentRequest>>,
6862    #[doc = "The job shifts worked during the time entry."]
6863    #[serde(default, skip_serializing_if = "Option::is_none")]
6864    pub job_shifts: Option<Vec<JobShiftRequest>>,
6865    #[doc = "The breaks taken during the time entry."]
6866    #[serde(default, skip_serializing_if = "Option::is_none")]
6867    pub breaks: Option<Vec<BreakRequest>>,
6868    #[doc = "The tags associated with the time entry."]
6869    #[serde(default, skip_serializing_if = "Option::is_none")]
6870    pub tags: Option<Vec<String>>,
6871    #[doc = "The unique key of the time entry in an outside system. If set, no other time entry \
6872             with the same key can be created."]
6873    #[serde(default, skip_serializing_if = "Option::is_none")]
6874    pub idempotency_key: Option<String>,
6875    #[doc = "Whether the time entry should create an extra hours run."]
6876    #[serde(default, skip_serializing_if = "Option::is_none")]
6877    pub create_extra_hours_run: Option<bool>,
6878    #[doc = "The status of the time entry."]
6879    #[serde(default, skip_serializing_if = "Option::is_none")]
6880    pub status: Option<TimeEntryRequestStatus>,
6881    #[doc = "The pay period associated with the time card."]
6882    #[serde(default, skip_serializing_if = "Option::is_none")]
6883    pub pay_period: Option<PayPeriodRequest>,
6884    #[doc = "Arbitrary shift inputs collected on the time entry"]
6885    #[serde(default, skip_serializing_if = "Option::is_none")]
6886    pub shift_input_values: Option<Vec<ShiftInputValueRequest>>,
6887}
6888
6889impl std::fmt::Display for TimeEntryRequest {
6890    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6891        write!(
6892            f,
6893            "{}",
6894            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
6895        )
6896    }
6897}
6898
6899#[cfg(feature = "tabled")]
6900impl tabled::Tabled for TimeEntryRequest {
6901    const LENGTH: usize = 11;
6902    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
6903        vec![
6904            self.worker_id.clone().into(),
6905            if let Some(duration) = &self.duration {
6906                format!("{:?}", duration).into()
6907            } else {
6908                String::new().into()
6909            },
6910            if let Some(comments) = &self.comments {
6911                format!("{:?}", comments).into()
6912            } else {
6913                String::new().into()
6914            },
6915            if let Some(job_shifts) = &self.job_shifts {
6916                format!("{:?}", job_shifts).into()
6917            } else {
6918                String::new().into()
6919            },
6920            if let Some(breaks) = &self.breaks {
6921                format!("{:?}", breaks).into()
6922            } else {
6923                String::new().into()
6924            },
6925            if let Some(tags) = &self.tags {
6926                format!("{:?}", tags).into()
6927            } else {
6928                String::new().into()
6929            },
6930            if let Some(idempotency_key) = &self.idempotency_key {
6931                format!("{:?}", idempotency_key).into()
6932            } else {
6933                String::new().into()
6934            },
6935            if let Some(create_extra_hours_run) = &self.create_extra_hours_run {
6936                format!("{:?}", create_extra_hours_run).into()
6937            } else {
6938                String::new().into()
6939            },
6940            if let Some(status) = &self.status {
6941                format!("{:?}", status).into()
6942            } else {
6943                String::new().into()
6944            },
6945            if let Some(pay_period) = &self.pay_period {
6946                format!("{:?}", pay_period).into()
6947            } else {
6948                String::new().into()
6949            },
6950            if let Some(shift_input_values) = &self.shift_input_values {
6951                format!("{:?}", shift_input_values).into()
6952            } else {
6953                String::new().into()
6954            },
6955        ]
6956    }
6957
6958    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
6959        vec![
6960            "worker_id".into(),
6961            "duration".into(),
6962            "comments".into(),
6963            "job_shifts".into(),
6964            "breaks".into(),
6965            "tags".into(),
6966            "idempotency_key".into(),
6967            "create_extra_hours_run".into(),
6968            "status".into(),
6969            "pay_period".into(),
6970            "shift_input_values".into(),
6971        ]
6972    }
6973}
6974
6975#[doc = "\nDTO used to store the summary of a TimeEntry\n"]
6976#[derive(
6977    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
6978)]
6979pub struct TimeEntrySummary {
6980    #[doc = "The number of overtime hours worked during this time entry."]
6981    #[serde(default, skip_serializing_if = "Option::is_none")]
6982    pub over_time_hours: Option<f64>,
6983    #[doc = "The number of double overtime hours worked during this time entry."]
6984    #[serde(default, skip_serializing_if = "Option::is_none")]
6985    pub double_over_time_hours: Option<f64>,
6986    #[doc = "The number of regular hours worked during this time entry."]
6987    #[serde(default, skip_serializing_if = "Option::is_none")]
6988    pub regular_hours: Option<f64>,
6989    #[doc = "The duration of the time entry."]
6990    #[serde(default, skip_serializing_if = "Option::is_none")]
6991    pub duration: Option<f64>,
6992}
6993
6994impl std::fmt::Display for TimeEntrySummary {
6995    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6996        write!(
6997            f,
6998            "{}",
6999            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7000        )
7001    }
7002}
7003
7004#[cfg(feature = "tabled")]
7005impl tabled::Tabled for TimeEntrySummary {
7006    const LENGTH: usize = 4;
7007    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
7008        vec![
7009            if let Some(over_time_hours) = &self.over_time_hours {
7010                format!("{:?}", over_time_hours).into()
7011            } else {
7012                String::new().into()
7013            },
7014            if let Some(double_over_time_hours) = &self.double_over_time_hours {
7015                format!("{:?}", double_over_time_hours).into()
7016            } else {
7017                String::new().into()
7018            },
7019            if let Some(regular_hours) = &self.regular_hours {
7020                format!("{:?}", regular_hours).into()
7021            } else {
7022                String::new().into()
7023            },
7024            if let Some(duration) = &self.duration {
7025                format!("{:?}", duration).into()
7026            } else {
7027                String::new().into()
7028            },
7029        ]
7030    }
7031
7032    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
7033        vec![
7034            "over_time_hours".into(),
7035            "double_over_time_hours".into(),
7036            "regular_hours".into(),
7037            "duration".into(),
7038        ]
7039    }
7040}
7041
7042#[doc = "Track."]
7043#[derive(
7044    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
7045)]
7046pub struct Track {
7047    #[doc = "Identifier field"]
7048    pub id: String,
7049    #[doc = "Record creation date"]
7050    pub created_at: String,
7051    #[doc = "Record update date"]
7052    pub updated_at: String,
7053    #[doc = "The name of the track. Must be unique within the company or organization."]
7054    pub name: String,
7055}
7056
7057impl std::fmt::Display for Track {
7058    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7059        write!(
7060            f,
7061            "{}",
7062            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7063        )
7064    }
7065}
7066
7067#[cfg(feature = "tabled")]
7068impl tabled::Tabled for Track {
7069    const LENGTH: usize = 4;
7070    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
7071        vec![
7072            self.id.clone().into(),
7073            self.created_at.clone().into(),
7074            self.updated_at.clone().into(),
7075            self.name.clone().into(),
7076        ]
7077    }
7078
7079    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
7080        vec![
7081            "id".into(),
7082            "created_at".into(),
7083            "updated_at".into(),
7084            "name".into(),
7085        ]
7086    }
7087}
7088
7089#[doc = "User."]
7090#[derive(
7091    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
7092)]
7093pub struct User {
7094    #[doc = "Identifier field"]
7095    pub id: String,
7096    #[doc = "Record creation date"]
7097    pub created_at: String,
7098    #[doc = "Record update date"]
7099    pub updated_at: String,
7100    #[doc = "Whether the user is able to access company resources, typically when they are in \
7101             actively engaged with the company and not after off-boarding."]
7102    #[serde(default, skip_serializing_if = "Option::is_none")]
7103    pub active: Option<bool>,
7104    #[doc = "The unique identifier across Rippling used by the User for direct authentication \
7105             into their associated company. Globally unique."]
7106    #[serde(default, skip_serializing_if = "Option::is_none")]
7107    pub username: Option<String>,
7108    #[doc = "The user's name."]
7109    #[serde(default, skip_serializing_if = "Option::is_none")]
7110    pub name: Option<UserName>,
7111    #[doc = "The display name of the user using either the concatenated preferred given and \
7112             family name or username depending on availability."]
7113    #[serde(default, skip_serializing_if = "Option::is_none")]
7114    pub display_name: Option<String>,
7115    #[doc = "The user's email addresses."]
7116    #[serde(default, skip_serializing_if = "Option::is_none")]
7117    pub emails: Option<Vec<Email>>,
7118    #[doc = "The user's phone numbers."]
7119    #[serde(default, skip_serializing_if = "Option::is_none")]
7120    pub phone_numbers: Option<Vec<UserPhoneNumber>>,
7121    #[doc = "The user's addresses."]
7122    #[serde(default, skip_serializing_if = "Option::is_none")]
7123    pub addresses: Option<Vec<UserAddress>>,
7124    #[doc = "The user's photos."]
7125    #[serde(default, skip_serializing_if = "Option::is_none")]
7126    pub photos: Option<Vec<UserPhoto>>,
7127    #[doc = "The User's preferred written or spoken language in the same format of the HTTP \
7128             Accept-Language header, pursuant to Section 5.3.5 of RFC7231."]
7129    #[serde(default, skip_serializing_if = "Option::is_none")]
7130    pub preferred_language: Option<String>,
7131    #[doc = "The User's default location for purposes of localization of currency, date time \
7132             format, or numerical representations pursuant to RFC5646."]
7133    #[serde(default, skip_serializing_if = "Option::is_none")]
7134    pub locale: Option<String>,
7135    #[doc = "The User's current time zone in IANA database Olson format"]
7136    #[serde(default, skip_serializing_if = "Option::is_none")]
7137    pub timezone: Option<String>,
7138}
7139
7140impl std::fmt::Display for User {
7141    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
7142        write!(
7143            f,
7144            "{}",
7145            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
7146        )
7147    }
7148}
7149
7150#[cfg(feature = "tabled")]
7151impl tabled::Tabled for User {
7152    const LENGTH: usize = 14;
7153    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
7154        vec![
7155            self.id.clone().into(),
7156            self.created_at.clone().into(),
7157            self.updated_at.clone().into(),
7158            if let Some(active) = &self.active {
7159                format!("{:?}", active).into()
7160            } else {
7161                String::new().into()
7162            },
7163            if let Some(username) = &self.username {
7164                format!("{:?}", username).into()
7165            } else {
7166                String::new().into()
7167            },
7168            if let Some(name) = &self.name {
7169                format!("{:?}", name).into()
7170            } else {
7171                String::new().into()
7172            },
7173            if let Some(display_name) = &self.display_name {
7174                format!("{:?}", display_name).into()
7175            } else {
7176                String::new().into()
7177            },
7178            if let Some(emails) = &self.emails {
7179                format!("{:?}", emails).into()
7180            } else {
7181                String::new().into()
7182            },
7183            if let Some(phone_numbers) = &self.phone_numbers {
7184                format!("{:?}", phone_numbers).into()
7185            } else {
7186                String::new().into()
7187            },
7188            if let Some(addresses) = &self.addresses {
7189                format!("{:?}", addresses).into()
7190            } else {
7191                String::new().into()
7192            },
7193            if let Some(photos) = &self.photos {
7194                format!("{:?}", photos).into()
7195            } else {
7196                String::new().into()
7197            },
7198            if let Some(preferred_language) = &self.preferred_language {
7199                format!("{:?}", preferred_language).into()
7200            } else {
7201                String::new().into()
7202            },
7203            if let Some(locale) = &self.locale {
7204                format!("{:?}", locale).into()
7205            } else {
7206                String::new().into()
7207            },
7208            if let Some(timezone) = &self.timezone {
7209                format!("{:?}", timezone).into()
7210            } else {
7211                String::new().into()
7212            },
7213        ]
7214    }
7215
7216    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
7217        vec![
7218            "id".into(),
7219            "created_at".into(),
7220            "updated_at".into(),
7221            "active".into(),
7222            "username".into(),
7223            "name".into(),
7224            "display_name".into(),
7225            "emails".into(),
7226            "phone_numbers".into(),
7227            "addresses".into(),
7228            "photos".into(),
7229            "preferred_language".into(),
7230            "locale".into(),
7231            "timezone".into(),
7232        ]
7233    }
7234}
7235
7236#[doc = "The country component, pursuant to SCIM RFC 7643 4.1.2."]
7237#[derive(
7238    serde :: Serialize,
7239    serde :: Deserialize,
7240    PartialEq,
7241    Hash,
7242    Debug,
7243    Clone,
7244    schemars :: JsonSchema,
7245    parse_display :: FromStr,
7246    parse_display :: Display,
7247)]
7248#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
7249#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
7250pub enum UserAddressCountry {
7251    #[serde(rename = "AF")]
7252    #[display("AF")]
7253    Af,
7254    #[serde(rename = "AX")]
7255    #[display("AX")]
7256    Ax,
7257    #[serde(rename = "AL")]
7258    #[display("AL")]
7259    Al,
7260    #[serde(rename = "DZ")]
7261    #[display("DZ")]
7262    Dz,
7263    #[serde(rename = "AS")]
7264    #[display("AS")]
7265    As,
7266    #[serde(rename = "AD")]
7267    #[display("AD")]
7268    Ad,
7269    #[serde(rename = "AO")]
7270    #[display("AO")]
7271    Ao,
7272    #[serde(rename = "AI")]
7273    #[display("AI")]
7274    Ai,
7275    #[serde(rename = "AQ")]
7276    #[display("AQ")]
7277    Aq,
7278    #[serde(rename = "AG")]
7279    #[display("AG")]
7280    Ag,
7281    #[serde(rename = "AR")]
7282    #[display("AR")]
7283    Ar,
7284    #[serde(rename = "AM")]
7285    #[display("AM")]
7286    Am,
7287    #[serde(rename = "AW")]
7288    #[display("AW")]
7289    Aw,
7290    #[serde(rename = "AU")]
7291    #[display("AU")]
7292    Au,
7293    #[serde(rename = "AT")]
7294    #[display("AT")]
7295    At,
7296    #[serde(rename = "AZ")]
7297    #[display("AZ")]
7298    Az,
7299    #[serde(rename = "BS")]
7300    #[display("BS")]
7301    Bs,
7302    #[serde(rename = "BH")]
7303    #[display("BH")]
7304    Bh,
7305    #[serde(rename = "BD")]
7306    #[display("BD")]
7307    Bd,
7308    #[serde(rename = "BB")]
7309    #[display("BB")]
7310    Bb,
7311    #[serde(rename = "BY")]
7312    #[display("BY")]
7313    By,
7314    #[serde(rename = "BE")]
7315    #[display("BE")]
7316    Be,
7317    #[serde(rename = "BZ")]
7318    #[display("BZ")]
7319    Bz,
7320    #[serde(rename = "BJ")]
7321    #[display("BJ")]
7322    Bj,
7323    #[serde(rename = "BM")]
7324    #[display("BM")]
7325    Bm,
7326    #[serde(rename = "BT")]
7327    #[display("BT")]
7328    Bt,
7329    #[serde(rename = "BO")]
7330    #[display("BO")]
7331    Bo,
7332    #[serde(rename = "BQ")]
7333    #[display("BQ")]
7334    Bq,
7335    #[serde(rename = "BA")]
7336    #[display("BA")]
7337    Ba,
7338    #[serde(rename = "BW")]
7339    #[display("BW")]
7340    Bw,
7341    #[serde(rename = "BV")]
7342    #[display("BV")]
7343    Bv,
7344    #[serde(rename = "BR")]
7345    #[display("BR")]
7346    Br,
7347    #[serde(rename = "IO")]
7348    #[display("IO")]
7349    Io,
7350    #[serde(rename = "BN")]
7351    #[display("BN")]
7352    Bn,
7353    #[serde(rename = "BG")]
7354    #[display("BG")]
7355    Bg,
7356    #[serde(rename = "BF")]
7357    #[display("BF")]
7358    Bf,
7359    #[serde(rename = "BI")]
7360    #[display("BI")]
7361    Bi,
7362    #[serde(rename = "CV")]
7363    #[display("CV")]
7364    Cv,
7365    #[serde(rename = "KH")]
7366    #[display("KH")]
7367    Kh,
7368    #[serde(rename = "CM")]
7369    #[display("CM")]
7370    Cm,
7371    #[serde(rename = "CA")]
7372    #[display("CA")]
7373    Ca,
7374    #[serde(rename = "KY")]
7375    #[display("KY")]
7376    Ky,
7377    #[serde(rename = "CF")]
7378    #[display("CF")]
7379    Cf,
7380    #[serde(rename = "TD")]
7381    #[display("TD")]
7382    Td,
7383    #[serde(rename = "CL")]
7384    #[display("CL")]
7385    Cl,
7386    #[serde(rename = "CN")]
7387    #[display("CN")]
7388    Cn,
7389    #[serde(rename = "CX")]
7390    #[display("CX")]
7391    Cx,
7392    #[serde(rename = "CC")]
7393    #[display("CC")]
7394    Cc,
7395    #[serde(rename = "CO")]
7396    #[display("CO")]
7397    Co,
7398    #[serde(rename = "KM")]
7399    #[display("KM")]
7400    Km,
7401    #[serde(rename = "CG")]
7402    #[display("CG")]
7403    Cg,
7404    #[serde(rename = "CD")]
7405    #[display("CD")]
7406    Cd,
7407    #[serde(rename = "CK")]
7408    #[display("CK")]
7409    Ck,
7410    #[serde(rename = "CR")]
7411    #[display("CR")]
7412    Cr,
7413    #[serde(rename = "CI")]
7414    #[display("CI")]
7415    Ci,
7416    #[serde(rename = "HR")]
7417    #[display("HR")]
7418    Hr,
7419    #[serde(rename = "CW")]
7420    #[display("CW")]
7421    Cw,
7422    #[serde(rename = "CY")]
7423    #[display("CY")]
7424    Cy,
7425    #[serde(rename = "CZ")]
7426    #[display("CZ")]
7427    Cz,
7428    #[serde(rename = "DK")]
7429    #[display("DK")]
7430    Dk,
7431    #[serde(rename = "DJ")]
7432    #[display("DJ")]
7433    Dj,
7434    #[serde(rename = "DM")]
7435    #[display("DM")]
7436    Dm,
7437    #[serde(rename = "DO")]
7438    #[display("DO")]
7439    Do,
7440    #[serde(rename = "EC")]
7441    #[display("EC")]
7442    Ec,
7443    #[serde(rename = "EG")]
7444    #[display("EG")]
7445    Eg,
7446    #[serde(rename = "SV")]
7447    #[display("SV")]
7448    Sv,
7449    #[serde(rename = "GQ")]
7450    #[display("GQ")]
7451    Gq,
7452    #[serde(rename = "ER")]
7453    #[display("ER")]
7454    Er,
7455    #[serde(rename = "EE")]
7456    #[display("EE")]
7457    Ee,
7458    #[serde(rename = "SZ")]
7459    #[display("SZ")]
7460    Sz,
7461    #[serde(rename = "ET")]
7462    #[display("ET")]
7463    Et,
7464    #[serde(rename = "FK")]
7465    #[display("FK")]
7466    Fk,
7467    #[serde(rename = "FO")]
7468    #[display("FO")]
7469    Fo,
7470    #[serde(rename = "FJ")]
7471    #[display("FJ")]
7472    Fj,
7473    #[serde(rename = "FI")]
7474    #[display("FI")]
7475    Fi,
7476    #[serde(rename = "FR")]
7477    #[display("FR")]
7478    Fr,
7479    #[serde(rename = "GF")]
7480    #[display("GF")]
7481    Gf,
7482    #[serde(rename = "PF")]
7483    #[display("PF")]
7484    Pf,
7485    #[serde(rename = "TF")]
7486    #[display("TF")]
7487    Tf,
7488    #[serde(rename = "GA")]
7489    #[display("GA")]
7490    Ga,
7491    #[serde(rename = "GM")]
7492    #[display("GM")]
7493    Gm,
7494    #[serde(rename = "GE")]
7495    #[display("GE")]
7496    Ge,
7497    #[serde(rename = "DE")]
7498    #[display("DE")]
7499    De,
7500    #[serde(rename = "GH")]
7501    #[display("GH")]
7502    Gh,
7503    #[serde(rename = "GI")]
7504    #[display("GI")]
7505    Gi,
7506    #[serde(rename = "GR")]
7507    #[display("GR")]
7508    Gr,
7509    #[serde(rename = "GL")]
7510    #[display("GL")]
7511    Gl,
7512    #[serde(rename = "GD")]
7513    #[display("GD")]
7514    Gd,
7515    #[serde(rename = "GP")]
7516    #[display("GP")]
7517    Gp,
7518    #[serde(rename = "GU")]
7519    #[display("GU")]
7520    Gu,
7521    #[serde(rename = "GT")]
7522    #[display("GT")]
7523    Gt,
7524    #[serde(rename = "GG")]
7525    #[display("GG")]
7526    Gg,
7527    #[serde(rename = "GN")]
7528    #[display("GN")]
7529    Gn,
7530    #[serde(rename = "GW")]
7531    #[display("GW")]
7532    Gw,
7533    #[serde(rename = "GY")]
7534    #[display("GY")]
7535    Gy,
7536    #[serde(rename = "HT")]
7537    #[display("HT")]
7538    Ht,
7539    #[serde(rename = "HM")]
7540    #[display("HM")]
7541    Hm,
7542    #[serde(rename = "VA")]
7543    #[display("VA")]
7544    Va,
7545    #[serde(rename = "HN")]
7546    #[display("HN")]
7547    Hn,
7548    #[serde(rename = "HK")]
7549    #[display("HK")]
7550    Hk,
7551    #[serde(rename = "HU")]
7552    #[display("HU")]
7553    Hu,
7554    #[serde(rename = "IS")]
7555    #[display("IS")]
7556    Is,
7557    #[serde(rename = "IN")]
7558    #[display("IN")]
7559    In,
7560    #[serde(rename = "ID")]
7561    #[display("ID")]
7562    Id,
7563    #[serde(rename = "IQ")]
7564    #[display("IQ")]
7565    Iq,
7566    #[serde(rename = "IE")]
7567    #[display("IE")]
7568    Ie,
7569    #[serde(rename = "IM")]
7570    #[display("IM")]
7571    Im,
7572    #[serde(rename = "IL")]
7573    #[display("IL")]
7574    Il,
7575    #[serde(rename = "IT")]
7576    #[display("IT")]
7577    It,
7578    #[serde(rename = "JM")]
7579    #[display("JM")]
7580    Jm,
7581    #[serde(rename = "JP")]
7582    #[display("JP")]
7583    Jp,
7584    #[serde(rename = "JE")]
7585    #[display("JE")]
7586    Je,
7587    #[serde(rename = "JO")]
7588    #[display("JO")]
7589    Jo,
7590    #[serde(rename = "KZ")]
7591    #[display("KZ")]
7592    Kz,
7593    #[serde(rename = "KE")]
7594    #[display("KE")]
7595    Ke,
7596    #[serde(rename = "KI")]
7597    #[display("KI")]
7598    Ki,
7599    #[serde(rename = "KR")]
7600    #[display("KR")]
7601    Kr,
7602    #[serde(rename = "XK")]
7603    #[display("XK")]
7604    Xk,
7605    #[serde(rename = "KW")]
7606    #[display("KW")]
7607    Kw,
7608    #[serde(rename = "KG")]
7609    #[display("KG")]
7610    Kg,
7611    #[serde(rename = "LA")]
7612    #[display("LA")]
7613    La,
7614    #[serde(rename = "LV")]
7615    #[display("LV")]
7616    Lv,
7617    #[serde(rename = "LB")]
7618    #[display("LB")]
7619    Lb,
7620    #[serde(rename = "LS")]
7621    #[display("LS")]
7622    Ls,
7623    #[serde(rename = "LR")]
7624    #[display("LR")]
7625    Lr,
7626    #[serde(rename = "LY")]
7627    #[display("LY")]
7628    Ly,
7629    #[serde(rename = "LI")]
7630    #[display("LI")]
7631    Li,
7632    #[serde(rename = "LT")]
7633    #[display("LT")]
7634    Lt,
7635    #[serde(rename = "LU")]
7636    #[display("LU")]
7637    Lu,
7638    #[serde(rename = "MO")]
7639    #[display("MO")]
7640    Mo,
7641    #[serde(rename = "MG")]
7642    #[display("MG")]
7643    Mg,
7644    #[serde(rename = "MW")]
7645    #[display("MW")]
7646    Mw,
7647    #[serde(rename = "MY")]
7648    #[display("MY")]
7649    My,
7650    #[serde(rename = "MV")]
7651    #[display("MV")]
7652    Mv,
7653    #[serde(rename = "ML")]
7654    #[display("ML")]
7655    Ml,
7656    #[serde(rename = "MT")]
7657    #[display("MT")]
7658    Mt,
7659    #[serde(rename = "MH")]
7660    #[display("MH")]
7661    Mh,
7662    #[serde(rename = "MQ")]
7663    #[display("MQ")]
7664    Mq,
7665    #[serde(rename = "MR")]
7666    #[display("MR")]
7667    Mr,
7668    #[serde(rename = "MU")]
7669    #[display("MU")]
7670    Mu,
7671    #[serde(rename = "YT")]
7672    #[display("YT")]
7673    Yt,
7674    #[serde(rename = "MX")]
7675    #[display("MX")]
7676    Mx,
7677    #[serde(rename = "FM")]
7678    #[display("FM")]
7679    Fm,
7680    #[serde(rename = "MD")]
7681    #[display("MD")]
7682    Md,
7683    #[serde(rename = "MC")]
7684    #[display("MC")]
7685    Mc,
7686    #[serde(rename = "MN")]
7687    #[display("MN")]
7688    Mn,
7689    #[serde(rename = "ME")]
7690    #[display("ME")]
7691    Me,
7692    #[serde(rename = "MS")]
7693    #[display("MS")]
7694    Ms,
7695    #[serde(rename = "MA")]
7696    #[display("MA")]
7697    Ma,
7698    #[serde(rename = "MZ")]
7699    #[display("MZ")]
7700    Mz,
7701    #[serde(rename = "MM")]
7702    #[display("MM")]
7703    Mm,
7704    #[serde(rename = "NA")]
7705    #[display("NA")]
7706    Na,
7707    #[serde(rename = "NR")]
7708    #[display("NR")]
7709    Nr,
7710    #[serde(rename = "NP")]
7711    #[display("NP")]
7712    Np,
7713    #[serde(rename = "NL")]
7714    #[display("NL")]
7715    Nl,
7716    #[serde(rename = "AN")]
7717    #[display("AN")]
7718    An,
7719    #[serde(rename = "NC")]
7720    #[display("NC")]
7721    Nc,
7722    #[serde(rename = "NZ")]
7723    #[display("NZ")]
7724    Nz,
7725    #[serde(rename = "NI")]
7726    #[display("NI")]
7727    Ni,
7728    #[serde(rename = "NE")]
7729    #[display("NE")]
7730    Ne,
7731    #[serde(rename = "NG")]
7732    #[display("NG")]
7733    Ng,
7734    #[serde(rename = "NU")]
7735    #[display("NU")]
7736    Nu,
7737    #[serde(rename = "NF")]
7738    #[display("NF")]
7739    Nf,
7740    #[serde(rename = "MK")]
7741    #[display("MK")]
7742    Mk,
7743    #[serde(rename = "MP")]
7744    #[display("MP")]
7745    Mp,
7746    #[serde(rename = "NO")]
7747    #[display("NO")]
7748    No,
7749    #[serde(rename = "OM")]
7750    #[display("OM")]
7751    Om,
7752    #[serde(rename = "PK")]
7753    #[display("PK")]
7754    Pk,
7755    #[serde(rename = "PW")]
7756    #[display("PW")]
7757    Pw,
7758    #[serde(rename = "PS")]
7759    #[display("PS")]
7760    Ps,
7761    #[serde(rename = "PA")]
7762    #[display("PA")]
7763    Pa,
7764    #[serde(rename = "PG")]
7765    #[display("PG")]
7766    Pg,
7767    #[serde(rename = "PY")]
7768    #[display("PY")]
7769    Py,
7770    #[serde(rename = "PE")]
7771    #[display("PE")]
7772    Pe,
7773    #[serde(rename = "PH")]
7774    #[display("PH")]
7775    Ph,
7776    #[serde(rename = "PN")]
7777    #[display("PN")]
7778    Pn,
7779    #[serde(rename = "PL")]
7780    #[display("PL")]
7781    Pl,
7782    #[serde(rename = "PT")]
7783    #[display("PT")]
7784    Pt,
7785    #[serde(rename = "PR")]
7786    #[display("PR")]
7787    Pr,
7788    #[serde(rename = "QA")]
7789    #[display("QA")]
7790    Qa,
7791    #[serde(rename = "RO")]
7792    #[display("RO")]
7793    Ro,
7794    #[serde(rename = "RU")]
7795    #[display("RU")]
7796    Ru,
7797    #[serde(rename = "RW")]
7798    #[display("RW")]
7799    Rw,
7800    #[serde(rename = "RE")]
7801    #[display("RE")]
7802    Re,
7803    #[serde(rename = "BL")]
7804    #[display("BL")]
7805    Bl,
7806    #[serde(rename = "SH")]
7807    #[display("SH")]
7808    Sh,
7809    #[serde(rename = "KN")]
7810    #[display("KN")]
7811    Kn,
7812    #[serde(rename = "LC")]
7813    #[display("LC")]
7814    Lc,
7815    #[serde(rename = "MF")]
7816    #[display("MF")]
7817    Mf,
7818    #[serde(rename = "PM")]
7819    #[display("PM")]
7820    Pm,
7821    #[serde(rename = "VC")]
7822    #[display("VC")]
7823    Vc,
7824    #[serde(rename = "WS")]
7825    #[display("WS")]
7826    Ws,
7827    #[serde(rename = "SM")]
7828    #[display("SM")]
7829    Sm,
7830    #[serde(rename = "ST")]
7831    #[display("ST")]
7832    St,
7833    #[serde(rename = "SA")]
7834    #[display("SA")]
7835    Sa,
7836    #[serde(rename = "SN")]
7837    #[display("SN")]
7838    Sn,
7839    #[serde(rename = "RS")]
7840    #[display("RS")]
7841    Rs,
7842    #[serde(rename = "SC")]
7843    #[display("SC")]
7844    Sc,
7845    #[serde(rename = "SL")]
7846    #[display("SL")]
7847    Sl,
7848    #[serde(rename = "SG")]
7849    #[display("SG")]
7850    Sg,
7851    #[serde(rename = "SX")]
7852    #[display("SX")]
7853    Sx,
7854    #[serde(rename = "SK")]
7855    #[display("SK")]
7856    Sk,
7857    #[serde(rename = "SI")]
7858    #[display("SI")]
7859    Si,
7860    #[serde(rename = "SB")]
7861    #[display("SB")]
7862    Sb,
7863    #[serde(rename = "SO")]
7864    #[display("SO")]
7865    So,
7866    #[serde(rename = "ZA")]
7867    #[display("ZA")]
7868    Za,
7869    #[serde(rename = "GS")]
7870    #[display("GS")]
7871    Gs,
7872    #[serde(rename = "SS")]
7873    #[display("SS")]
7874    Ss,
7875    #[serde(rename = "ES")]
7876    #[display("ES")]
7877    Es,
7878    #[serde(rename = "LK")]
7879    #[display("LK")]
7880    Lk,
7881    #[serde(rename = "SD")]
7882    #[display("SD")]
7883    Sd,
7884    #[serde(rename = "SR")]
7885    #[display("SR")]
7886    Sr,
7887    #[serde(rename = "SJ")]
7888    #[display("SJ")]
7889    Sj,
7890    #[serde(rename = "SE")]
7891    #[display("SE")]
7892    Se,
7893    #[serde(rename = "CH")]
7894    #[display("CH")]
7895    Ch,
7896    #[serde(rename = "TW")]
7897    #[display("TW")]
7898    Tw,
7899    #[serde(rename = "TJ")]
7900    #[display("TJ")]
7901    Tj,
7902    #[serde(rename = "TZ")]
7903    #[display("TZ")]
7904    Tz,
7905    #[serde(rename = "TH")]
7906    #[display("TH")]
7907    Th,
7908    #[serde(rename = "TL")]
7909    #[display("TL")]
7910    Tl,
7911    #[serde(rename = "TG")]
7912    #[display("TG")]
7913    Tg,
7914    #[serde(rename = "TK")]
7915    #[display("TK")]
7916    Tk,
7917    #[serde(rename = "TO")]
7918    #[display("TO")]
7919    To,
7920    #[serde(rename = "TT")]
7921    #[display("TT")]
7922    Tt,
7923    #[serde(rename = "TN")]
7924    #[display("TN")]
7925    Tn,
7926    #[serde(rename = "TR")]
7927    #[display("TR")]
7928    Tr,
7929    #[serde(rename = "TM")]
7930    #[display("TM")]
7931    Tm,
7932    #[serde(rename = "TC")]
7933    #[display("TC")]
7934    Tc,
7935    #[serde(rename = "TV")]
7936    #[display("TV")]
7937    Tv,
7938    #[serde(rename = "UG")]
7939    #[display("UG")]
7940    Ug,
7941    #[serde(rename = "UA")]
7942    #[display("UA")]
7943    Ua,
7944    #[serde(rename = "AE")]
7945    #[display("AE")]
7946    Ae,
7947    #[serde(rename = "GB")]
7948    #[display("GB")]
7949    Gb,
7950    #[serde(rename = "US")]
7951    #[display("US")]
7952    Us,
7953    #[serde(rename = "UM")]
7954    #[display("UM")]
7955    Um,
7956    #[serde(rename = "UY")]
7957    #[display("UY")]
7958    Uy,
7959    #[serde(rename = "UZ")]
7960    #[display("UZ")]
7961    Uz,
7962    #[serde(rename = "VU")]
7963    #[display("VU")]
7964    Vu,
7965    #[serde(rename = "VE")]
7966    #[display("VE")]
7967    Ve,
7968    #[serde(rename = "VN")]
7969    #[display("VN")]
7970    Vn,
7971    #[serde(rename = "VG")]
7972    #[display("VG")]
7973    Vg,
7974    #[serde(rename = "VI")]
7975    #[display("VI")]
7976    Vi,
7977    #[serde(rename = "WF")]
7978    #[display("WF")]
7979    Wf,
7980    #[serde(rename = "EH")]
7981    #[display("EH")]
7982    Eh,
7983    #[serde(rename = "YE")]
7984    #[display("YE")]
7985    Ye,
7986    #[serde(rename = "ZM")]
7987    #[display("ZM")]
7988    Zm,
7989    #[serde(rename = "ZW")]
7990    #[display("ZW")]
7991    Zw,
7992}
7993
7994#[doc = "UserAddress."]
7995#[derive(
7996    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
7997)]
7998pub struct UserAddress {
7999    #[doc = "The classification of the address."]
8000    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
8001    pub type_: Option<Type>,
8002    #[doc = "The formatted mailing address."]
8003    #[serde(default, skip_serializing_if = "Option::is_none")]
8004    pub formatted: Option<String>,
8005    #[doc = "The full street address component, which may include house number, street name, P.O. \
8006             box, and multi-line extended street address information, pursuant to SCIM RFC 7643 \
8007             4.1.2.."]
8008    #[serde(default, skip_serializing_if = "Option::is_none")]
8009    pub street_address: Option<String>,
8010    #[doc = "The city or locality component."]
8011    #[serde(default, skip_serializing_if = "Option::is_none")]
8012    pub locality: Option<String>,
8013    #[doc = "The state or region component, pursuant to SCIM RFC 7643 4.1.2."]
8014    #[serde(default, skip_serializing_if = "Option::is_none")]
8015    pub region: Option<String>,
8016    #[doc = "The zip code or postal code component, pursuant to SCIM RFC 7643 4.1.2."]
8017    #[serde(default, skip_serializing_if = "Option::is_none")]
8018    pub postal_code: Option<String>,
8019    #[doc = "The country component, pursuant to SCIM RFC 7643 4.1.2."]
8020    #[serde(default, skip_serializing_if = "Option::is_none")]
8021    pub country: Option<UserAddressCountry>,
8022}
8023
8024impl std::fmt::Display for UserAddress {
8025    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8026        write!(
8027            f,
8028            "{}",
8029            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8030        )
8031    }
8032}
8033
8034#[cfg(feature = "tabled")]
8035impl tabled::Tabled for UserAddress {
8036    const LENGTH: usize = 7;
8037    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
8038        vec![
8039            if let Some(type_) = &self.type_ {
8040                format!("{:?}", type_).into()
8041            } else {
8042                String::new().into()
8043            },
8044            if let Some(formatted) = &self.formatted {
8045                format!("{:?}", formatted).into()
8046            } else {
8047                String::new().into()
8048            },
8049            if let Some(street_address) = &self.street_address {
8050                format!("{:?}", street_address).into()
8051            } else {
8052                String::new().into()
8053            },
8054            if let Some(locality) = &self.locality {
8055                format!("{:?}", locality).into()
8056            } else {
8057                String::new().into()
8058            },
8059            if let Some(region) = &self.region {
8060                format!("{:?}", region).into()
8061            } else {
8062                String::new().into()
8063            },
8064            if let Some(postal_code) = &self.postal_code {
8065                format!("{:?}", postal_code).into()
8066            } else {
8067                String::new().into()
8068            },
8069            if let Some(country) = &self.country {
8070                format!("{:?}", country).into()
8071            } else {
8072                String::new().into()
8073            },
8074        ]
8075    }
8076
8077    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
8078        vec![
8079            "type_".into(),
8080            "formatted".into(),
8081            "street_address".into(),
8082            "locality".into(),
8083            "region".into(),
8084            "postal_code".into(),
8085            "country".into(),
8086        ]
8087    }
8088}
8089
8090#[doc = "UserName."]
8091#[derive(
8092    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8093)]
8094pub struct UserName {
8095    #[doc = "The user's full name."]
8096    #[serde(default, skip_serializing_if = "Option::is_none")]
8097    pub formatted: Option<String>,
8098    #[doc = "The given legal name of the user, or first name in most Western languages."]
8099    #[serde(default, skip_serializing_if = "Option::is_none")]
8100    pub given_name: Option<String>,
8101    #[doc = "The middle name(s) of the user."]
8102    #[serde(default, skip_serializing_if = "Option::is_none")]
8103    pub middle_name: Option<String>,
8104    #[doc = "The legal family name of the user, or last name in most Western languages."]
8105    #[serde(default, skip_serializing_if = "Option::is_none")]
8106    pub family_name: Option<String>,
8107    #[doc = "The preferred given name, or first name in most Western languages, by the user."]
8108    #[serde(default, skip_serializing_if = "Option::is_none")]
8109    pub preferred_given_name: Option<String>,
8110    #[doc = "The preferred family name, or last name in most Western languages, by the user."]
8111    #[serde(default, skip_serializing_if = "Option::is_none")]
8112    pub preferred_family_name: Option<String>,
8113}
8114
8115impl std::fmt::Display for UserName {
8116    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8117        write!(
8118            f,
8119            "{}",
8120            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8121        )
8122    }
8123}
8124
8125#[cfg(feature = "tabled")]
8126impl tabled::Tabled for UserName {
8127    const LENGTH: usize = 6;
8128    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
8129        vec![
8130            if let Some(formatted) = &self.formatted {
8131                format!("{:?}", formatted).into()
8132            } else {
8133                String::new().into()
8134            },
8135            if let Some(given_name) = &self.given_name {
8136                format!("{:?}", given_name).into()
8137            } else {
8138                String::new().into()
8139            },
8140            if let Some(middle_name) = &self.middle_name {
8141                format!("{:?}", middle_name).into()
8142            } else {
8143                String::new().into()
8144            },
8145            if let Some(family_name) = &self.family_name {
8146                format!("{:?}", family_name).into()
8147            } else {
8148                String::new().into()
8149            },
8150            if let Some(preferred_given_name) = &self.preferred_given_name {
8151                format!("{:?}", preferred_given_name).into()
8152            } else {
8153                String::new().into()
8154            },
8155            if let Some(preferred_family_name) = &self.preferred_family_name {
8156                format!("{:?}", preferred_family_name).into()
8157            } else {
8158                String::new().into()
8159            },
8160        ]
8161    }
8162
8163    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
8164        vec![
8165            "formatted".into(),
8166            "given_name".into(),
8167            "middle_name".into(),
8168            "family_name".into(),
8169            "preferred_given_name".into(),
8170            "preferred_family_name".into(),
8171        ]
8172    }
8173}
8174
8175#[doc = "The classification of the phone number, pursuant to SCIM RFC 7643 4.1.2."]
8176#[derive(
8177    serde :: Serialize,
8178    serde :: Deserialize,
8179    PartialEq,
8180    Hash,
8181    Debug,
8182    Clone,
8183    schemars :: JsonSchema,
8184    parse_display :: FromStr,
8185    parse_display :: Display,
8186)]
8187#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
8188#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
8189pub enum UserPhoneNumberType {
8190    #[serde(rename = "HOME")]
8191    #[display("HOME")]
8192    Home,
8193    #[serde(rename = "WORK")]
8194    #[display("WORK")]
8195    Work,
8196    #[serde(rename = "MOBILE")]
8197    #[display("MOBILE")]
8198    Mobile,
8199    #[serde(rename = "FAX")]
8200    #[display("FAX")]
8201    Fax,
8202    #[serde(rename = "OTHER")]
8203    #[display("OTHER")]
8204    Other,
8205}
8206
8207#[doc = "UserPhoneNumber."]
8208#[derive(
8209    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8210)]
8211pub struct UserPhoneNumber {
8212    #[doc = "The canonical global phone number pursuant to RFC3966."]
8213    #[serde(default, skip_serializing_if = "Option::is_none")]
8214    pub value: Option<String>,
8215    #[doc = "The classification of the phone number, pursuant to SCIM RFC 7643 4.1.2."]
8216    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
8217    pub type_: Option<UserPhoneNumberType>,
8218    #[doc = "The display value of the phone number."]
8219    #[serde(default, skip_serializing_if = "Option::is_none")]
8220    pub display: Option<String>,
8221}
8222
8223impl std::fmt::Display for UserPhoneNumber {
8224    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8225        write!(
8226            f,
8227            "{}",
8228            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8229        )
8230    }
8231}
8232
8233#[cfg(feature = "tabled")]
8234impl tabled::Tabled for UserPhoneNumber {
8235    const LENGTH: usize = 3;
8236    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
8237        vec![
8238            if let Some(value) = &self.value {
8239                format!("{:?}", value).into()
8240            } else {
8241                String::new().into()
8242            },
8243            if let Some(type_) = &self.type_ {
8244                format!("{:?}", type_).into()
8245            } else {
8246                String::new().into()
8247            },
8248            if let Some(display) = &self.display {
8249                format!("{:?}", display).into()
8250            } else {
8251                String::new().into()
8252            },
8253        ]
8254    }
8255
8256    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
8257        vec!["value".into(), "type_".into(), "display".into()]
8258    }
8259}
8260
8261#[doc = "The classification of the photo."]
8262#[derive(
8263    serde :: Serialize,
8264    serde :: Deserialize,
8265    PartialEq,
8266    Hash,
8267    Debug,
8268    Clone,
8269    schemars :: JsonSchema,
8270    parse_display :: FromStr,
8271    parse_display :: Display,
8272)]
8273#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
8274#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
8275pub enum UserPhotoType {
8276    #[serde(rename = "PHOTO")]
8277    #[display("PHOTO")]
8278    Photo,
8279    #[serde(rename = "THUMBNAIL")]
8280    #[display("THUMBNAIL")]
8281    Thumbnail,
8282}
8283
8284#[doc = "UserPhoto."]
8285#[derive(
8286    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8287)]
8288pub struct UserPhoto {
8289    #[doc = "The URL of the photo."]
8290    #[serde(default, skip_serializing_if = "Option::is_none")]
8291    pub value: Option<String>,
8292    #[doc = "The classification of the photo."]
8293    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
8294    pub type_: Option<UserPhotoType>,
8295}
8296
8297impl std::fmt::Display for UserPhoto {
8298    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8299        write!(
8300            f,
8301            "{}",
8302            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8303        )
8304    }
8305}
8306
8307#[cfg(feature = "tabled")]
8308impl tabled::Tabled for UserPhoto {
8309    const LENGTH: usize = 2;
8310    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
8311        vec![
8312            if let Some(value) = &self.value {
8313                format!("{:?}", value).into()
8314            } else {
8315                String::new().into()
8316            },
8317            if let Some(type_) = &self.type_ {
8318                format!("{:?}", type_).into()
8319            } else {
8320                String::new().into()
8321            },
8322        ]
8323    }
8324
8325    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
8326        vec!["value".into(), "type_".into()]
8327    }
8328}
8329
8330#[doc = "WorkLocation."]
8331#[derive(
8332    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
8333)]
8334pub struct WorkLocation {
8335    #[doc = "Identifier field"]
8336    pub id: String,
8337    #[doc = "Record creation date"]
8338    pub created_at: String,
8339    #[doc = "Record update date"]
8340    pub updated_at: String,
8341    #[doc = "The name of the work location."]
8342    pub name: String,
8343    #[doc = "The address for the work location."]
8344    pub address: Address,
8345}
8346
8347impl std::fmt::Display for WorkLocation {
8348    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
8349        write!(
8350            f,
8351            "{}",
8352            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
8353        )
8354    }
8355}
8356
8357#[cfg(feature = "tabled")]
8358impl tabled::Tabled for WorkLocation {
8359    const LENGTH: usize = 5;
8360    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
8361        vec![
8362            self.id.clone().into(),
8363            self.created_at.clone().into(),
8364            self.updated_at.clone().into(),
8365            self.name.clone().into(),
8366            format!("{:?}", self.address).into(),
8367        ]
8368    }
8369
8370    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
8371        vec![
8372            "id".into(),
8373            "created_at".into(),
8374            "updated_at".into(),
8375            "name".into(),
8376            "address".into(),
8377        ]
8378    }
8379}
8380
8381#[doc = "The worker's country."]
8382#[derive(
8383    serde :: Serialize,
8384    serde :: Deserialize,
8385    PartialEq,
8386    Hash,
8387    Debug,
8388    Clone,
8389    schemars :: JsonSchema,
8390    parse_display :: FromStr,
8391    parse_display :: Display,
8392)]
8393#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
8394#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
8395pub enum WorkerCountry {
8396    #[serde(rename = "AF")]
8397    #[display("AF")]
8398    Af,
8399    #[serde(rename = "AX")]
8400    #[display("AX")]
8401    Ax,
8402    #[serde(rename = "AL")]
8403    #[display("AL")]
8404    Al,
8405    #[serde(rename = "DZ")]
8406    #[display("DZ")]
8407    Dz,
8408    #[serde(rename = "AS")]
8409    #[display("AS")]
8410    As,
8411    #[serde(rename = "AD")]
8412    #[display("AD")]
8413    Ad,
8414    #[serde(rename = "AO")]
8415    #[display("AO")]
8416    Ao,
8417    #[serde(rename = "AI")]
8418    #[display("AI")]
8419    Ai,
8420    #[serde(rename = "AQ")]
8421    #[display("AQ")]
8422    Aq,
8423    #[serde(rename = "AG")]
8424    #[display("AG")]
8425    Ag,
8426    #[serde(rename = "AR")]
8427    #[display("AR")]
8428    Ar,
8429    #[serde(rename = "AM")]
8430    #[display("AM")]
8431    Am,
8432    #[serde(rename = "AW")]
8433    #[display("AW")]
8434    Aw,
8435    #[serde(rename = "AU")]
8436    #[display("AU")]
8437    Au,
8438    #[serde(rename = "AT")]
8439    #[display("AT")]
8440    At,
8441    #[serde(rename = "AZ")]
8442    #[display("AZ")]
8443    Az,
8444    #[serde(rename = "BS")]
8445    #[display("BS")]
8446    Bs,
8447    #[serde(rename = "BH")]
8448    #[display("BH")]
8449    Bh,
8450    #[serde(rename = "BD")]
8451    #[display("BD")]
8452    Bd,
8453    #[serde(rename = "BB")]
8454    #[display("BB")]
8455    Bb,
8456    #[serde(rename = "BY")]
8457    #[display("BY")]
8458    By,
8459    #[serde(rename = "BE")]
8460    #[display("BE")]
8461    Be,
8462    #[serde(rename = "BZ")]
8463    #[display("BZ")]
8464    Bz,
8465    #[serde(rename = "BJ")]
8466    #[display("BJ")]
8467    Bj,
8468    #[serde(rename = "BM")]
8469    #[display("BM")]
8470    Bm,
8471    #[serde(rename = "BT")]
8472    #[display("BT")]
8473    Bt,
8474    #[serde(rename = "BO")]
8475    #[display("BO")]
8476    Bo,
8477    #[serde(rename = "BQ")]
8478    #[display("BQ")]
8479    Bq,
8480    #[serde(rename = "BA")]
8481    #[display("BA")]
8482    Ba,
8483    #[serde(rename = "BW")]
8484    #[display("BW")]
8485    Bw,
8486    #[serde(rename = "BV")]
8487    #[display("BV")]
8488    Bv,
8489    #[serde(rename = "BR")]
8490    #[display("BR")]
8491    Br,
8492    #[serde(rename = "IO")]
8493    #[display("IO")]
8494    Io,
8495    #[serde(rename = "BN")]
8496    #[display("BN")]
8497    Bn,
8498    #[serde(rename = "BG")]
8499    #[display("BG")]
8500    Bg,
8501    #[serde(rename = "BF")]
8502    #[display("BF")]
8503    Bf,
8504    #[serde(rename = "BI")]
8505    #[display("BI")]
8506    Bi,
8507    #[serde(rename = "CV")]
8508    #[display("CV")]
8509    Cv,
8510    #[serde(rename = "KH")]
8511    #[display("KH")]
8512    Kh,
8513    #[serde(rename = "CM")]
8514    #[display("CM")]
8515    Cm,
8516    #[serde(rename = "CA")]
8517    #[display("CA")]
8518    Ca,
8519    #[serde(rename = "KY")]
8520    #[display("KY")]
8521    Ky,
8522    #[serde(rename = "CF")]
8523    #[display("CF")]
8524    Cf,
8525    #[serde(rename = "TD")]
8526    #[display("TD")]
8527    Td,
8528    #[serde(rename = "CL")]
8529    #[display("CL")]
8530    Cl,
8531    #[serde(rename = "CN")]
8532    #[display("CN")]
8533    Cn,
8534    #[serde(rename = "CX")]
8535    #[display("CX")]
8536    Cx,
8537    #[serde(rename = "CC")]
8538    #[display("CC")]
8539    Cc,
8540    #[serde(rename = "CO")]
8541    #[display("CO")]
8542    Co,
8543    #[serde(rename = "KM")]
8544    #[display("KM")]
8545    Km,
8546    #[serde(rename = "CG")]
8547    #[display("CG")]
8548    Cg,
8549    #[serde(rename = "CD")]
8550    #[display("CD")]
8551    Cd,
8552    #[serde(rename = "CK")]
8553    #[display("CK")]
8554    Ck,
8555    #[serde(rename = "CR")]
8556    #[display("CR")]
8557    Cr,
8558    #[serde(rename = "CI")]
8559    #[display("CI")]
8560    Ci,
8561    #[serde(rename = "HR")]
8562    #[display("HR")]
8563    Hr,
8564    #[serde(rename = "CW")]
8565    #[display("CW")]
8566    Cw,
8567    #[serde(rename = "CY")]
8568    #[display("CY")]
8569    Cy,
8570    #[serde(rename = "CZ")]
8571    #[display("CZ")]
8572    Cz,
8573    #[serde(rename = "DK")]
8574    #[display("DK")]
8575    Dk,
8576    #[serde(rename = "DJ")]
8577    #[display("DJ")]
8578    Dj,
8579    #[serde(rename = "DM")]
8580    #[display("DM")]
8581    Dm,
8582    #[serde(rename = "DO")]
8583    #[display("DO")]
8584    Do,
8585    #[serde(rename = "EC")]
8586    #[display("EC")]
8587    Ec,
8588    #[serde(rename = "EG")]
8589    #[display("EG")]
8590    Eg,
8591    #[serde(rename = "SV")]
8592    #[display("SV")]
8593    Sv,
8594    #[serde(rename = "GQ")]
8595    #[display("GQ")]
8596    Gq,
8597    #[serde(rename = "ER")]
8598    #[display("ER")]
8599    Er,
8600    #[serde(rename = "EE")]
8601    #[display("EE")]
8602    Ee,
8603    #[serde(rename = "SZ")]
8604    #[display("SZ")]
8605    Sz,
8606    #[serde(rename = "ET")]
8607    #[display("ET")]
8608    Et,
8609    #[serde(rename = "FK")]
8610    #[display("FK")]
8611    Fk,
8612    #[serde(rename = "FO")]
8613    #[display("FO")]
8614    Fo,
8615    #[serde(rename = "FJ")]
8616    #[display("FJ")]
8617    Fj,
8618    #[serde(rename = "FI")]
8619    #[display("FI")]
8620    Fi,
8621    #[serde(rename = "FR")]
8622    #[display("FR")]
8623    Fr,
8624    #[serde(rename = "GF")]
8625    #[display("GF")]
8626    Gf,
8627    #[serde(rename = "PF")]
8628    #[display("PF")]
8629    Pf,
8630    #[serde(rename = "TF")]
8631    #[display("TF")]
8632    Tf,
8633    #[serde(rename = "GA")]
8634    #[display("GA")]
8635    Ga,
8636    #[serde(rename = "GM")]
8637    #[display("GM")]
8638    Gm,
8639    #[serde(rename = "GE")]
8640    #[display("GE")]
8641    Ge,
8642    #[serde(rename = "DE")]
8643    #[display("DE")]
8644    De,
8645    #[serde(rename = "GH")]
8646    #[display("GH")]
8647    Gh,
8648    #[serde(rename = "GI")]
8649    #[display("GI")]
8650    Gi,
8651    #[serde(rename = "GR")]
8652    #[display("GR")]
8653    Gr,
8654    #[serde(rename = "GL")]
8655    #[display("GL")]
8656    Gl,
8657    #[serde(rename = "GD")]
8658    #[display("GD")]
8659    Gd,
8660    #[serde(rename = "GP")]
8661    #[display("GP")]
8662    Gp,
8663    #[serde(rename = "GU")]
8664    #[display("GU")]
8665    Gu,
8666    #[serde(rename = "GT")]
8667    #[display("GT")]
8668    Gt,
8669    #[serde(rename = "GG")]
8670    #[display("GG")]
8671    Gg,
8672    #[serde(rename = "GN")]
8673    #[display("GN")]
8674    Gn,
8675    #[serde(rename = "GW")]
8676    #[display("GW")]
8677    Gw,
8678    #[serde(rename = "GY")]
8679    #[display("GY")]
8680    Gy,
8681    #[serde(rename = "HT")]
8682    #[display("HT")]
8683    Ht,
8684    #[serde(rename = "HM")]
8685    #[display("HM")]
8686    Hm,
8687    #[serde(rename = "VA")]
8688    #[display("VA")]
8689    Va,
8690    #[serde(rename = "HN")]
8691    #[display("HN")]
8692    Hn,
8693    #[serde(rename = "HK")]
8694    #[display("HK")]
8695    Hk,
8696    #[serde(rename = "HU")]
8697    #[display("HU")]
8698    Hu,
8699    #[serde(rename = "IS")]
8700    #[display("IS")]
8701    Is,
8702    #[serde(rename = "IN")]
8703    #[display("IN")]
8704    In,
8705    #[serde(rename = "ID")]
8706    #[display("ID")]
8707    Id,
8708    #[serde(rename = "IQ")]
8709    #[display("IQ")]
8710    Iq,
8711    #[serde(rename = "IE")]
8712    #[display("IE")]
8713    Ie,
8714    #[serde(rename = "IM")]
8715    #[display("IM")]
8716    Im,
8717    #[serde(rename = "IL")]
8718    #[display("IL")]
8719    Il,
8720    #[serde(rename = "IT")]
8721    #[display("IT")]
8722    It,
8723    #[serde(rename = "JM")]
8724    #[display("JM")]
8725    Jm,
8726    #[serde(rename = "JP")]
8727    #[display("JP")]
8728    Jp,
8729    #[serde(rename = "JE")]
8730    #[display("JE")]
8731    Je,
8732    #[serde(rename = "JO")]
8733    #[display("JO")]
8734    Jo,
8735    #[serde(rename = "KZ")]
8736    #[display("KZ")]
8737    Kz,
8738    #[serde(rename = "KE")]
8739    #[display("KE")]
8740    Ke,
8741    #[serde(rename = "KI")]
8742    #[display("KI")]
8743    Ki,
8744    #[serde(rename = "KR")]
8745    #[display("KR")]
8746    Kr,
8747    #[serde(rename = "XK")]
8748    #[display("XK")]
8749    Xk,
8750    #[serde(rename = "KW")]
8751    #[display("KW")]
8752    Kw,
8753    #[serde(rename = "KG")]
8754    #[display("KG")]
8755    Kg,
8756    #[serde(rename = "LA")]
8757    #[display("LA")]
8758    La,
8759    #[serde(rename = "LV")]
8760    #[display("LV")]
8761    Lv,
8762    #[serde(rename = "LB")]
8763    #[display("LB")]
8764    Lb,
8765    #[serde(rename = "LS")]
8766    #[display("LS")]
8767    Ls,
8768    #[serde(rename = "LR")]
8769    #[display("LR")]
8770    Lr,
8771    #[serde(rename = "LY")]
8772    #[display("LY")]
8773    Ly,
8774    #[serde(rename = "LI")]
8775    #[display("LI")]
8776    Li,
8777    #[serde(rename = "LT")]
8778    #[display("LT")]
8779    Lt,
8780    #[serde(rename = "LU")]
8781    #[display("LU")]
8782    Lu,
8783    #[serde(rename = "MO")]
8784    #[display("MO")]
8785    Mo,
8786    #[serde(rename = "MG")]
8787    #[display("MG")]
8788    Mg,
8789    #[serde(rename = "MW")]
8790    #[display("MW")]
8791    Mw,
8792    #[serde(rename = "MY")]
8793    #[display("MY")]
8794    My,
8795    #[serde(rename = "MV")]
8796    #[display("MV")]
8797    Mv,
8798    #[serde(rename = "ML")]
8799    #[display("ML")]
8800    Ml,
8801    #[serde(rename = "MT")]
8802    #[display("MT")]
8803    Mt,
8804    #[serde(rename = "MH")]
8805    #[display("MH")]
8806    Mh,
8807    #[serde(rename = "MQ")]
8808    #[display("MQ")]
8809    Mq,
8810    #[serde(rename = "MR")]
8811    #[display("MR")]
8812    Mr,
8813    #[serde(rename = "MU")]
8814    #[display("MU")]
8815    Mu,
8816    #[serde(rename = "YT")]
8817    #[display("YT")]
8818    Yt,
8819    #[serde(rename = "MX")]
8820    #[display("MX")]
8821    Mx,
8822    #[serde(rename = "FM")]
8823    #[display("FM")]
8824    Fm,
8825    #[serde(rename = "MD")]
8826    #[display("MD")]
8827    Md,
8828    #[serde(rename = "MC")]
8829    #[display("MC")]
8830    Mc,
8831    #[serde(rename = "MN")]
8832    #[display("MN")]
8833    Mn,
8834    #[serde(rename = "ME")]
8835    #[display("ME")]
8836    Me,
8837    #[serde(rename = "MS")]
8838    #[display("MS")]
8839    Ms,
8840    #[serde(rename = "MA")]
8841    #[display("MA")]
8842    Ma,
8843    #[serde(rename = "MZ")]
8844    #[display("MZ")]
8845    Mz,
8846    #[serde(rename = "MM")]
8847    #[display("MM")]
8848    Mm,
8849    #[serde(rename = "NA")]
8850    #[display("NA")]
8851    Na,
8852    #[serde(rename = "NR")]
8853    #[display("NR")]
8854    Nr,
8855    #[serde(rename = "NP")]
8856    #[display("NP")]
8857    Np,
8858    #[serde(rename = "NL")]
8859    #[display("NL")]
8860    Nl,
8861    #[serde(rename = "AN")]
8862    #[display("AN")]
8863    An,
8864    #[serde(rename = "NC")]
8865    #[display("NC")]
8866    Nc,
8867    #[serde(rename = "NZ")]
8868    #[display("NZ")]
8869    Nz,
8870    #[serde(rename = "NI")]
8871    #[display("NI")]
8872    Ni,
8873    #[serde(rename = "NE")]
8874    #[display("NE")]
8875    Ne,
8876    #[serde(rename = "NG")]
8877    #[display("NG")]
8878    Ng,
8879    #[serde(rename = "NU")]
8880    #[display("NU")]
8881    Nu,
8882    #[serde(rename = "NF")]
8883    #[display("NF")]
8884    Nf,
8885    #[serde(rename = "MK")]
8886    #[display("MK")]
8887    Mk,
8888    #[serde(rename = "MP")]
8889    #[display("MP")]
8890    Mp,
8891    #[serde(rename = "NO")]
8892    #[display("NO")]
8893    No,
8894    #[serde(rename = "OM")]
8895    #[display("OM")]
8896    Om,
8897    #[serde(rename = "PK")]
8898    #[display("PK")]
8899    Pk,
8900    #[serde(rename = "PW")]
8901    #[display("PW")]
8902    Pw,
8903    #[serde(rename = "PS")]
8904    #[display("PS")]
8905    Ps,
8906    #[serde(rename = "PA")]
8907    #[display("PA")]
8908    Pa,
8909    #[serde(rename = "PG")]
8910    #[display("PG")]
8911    Pg,
8912    #[serde(rename = "PY")]
8913    #[display("PY")]
8914    Py,
8915    #[serde(rename = "PE")]
8916    #[display("PE")]
8917    Pe,
8918    #[serde(rename = "PH")]
8919    #[display("PH")]
8920    Ph,
8921    #[serde(rename = "PN")]
8922    #[display("PN")]
8923    Pn,
8924    #[serde(rename = "PL")]
8925    #[display("PL")]
8926    Pl,
8927    #[serde(rename = "PT")]
8928    #[display("PT")]
8929    Pt,
8930    #[serde(rename = "PR")]
8931    #[display("PR")]
8932    Pr,
8933    #[serde(rename = "QA")]
8934    #[display("QA")]
8935    Qa,
8936    #[serde(rename = "RO")]
8937    #[display("RO")]
8938    Ro,
8939    #[serde(rename = "RU")]
8940    #[display("RU")]
8941    Ru,
8942    #[serde(rename = "RW")]
8943    #[display("RW")]
8944    Rw,
8945    #[serde(rename = "RE")]
8946    #[display("RE")]
8947    Re,
8948    #[serde(rename = "BL")]
8949    #[display("BL")]
8950    Bl,
8951    #[serde(rename = "SH")]
8952    #[display("SH")]
8953    Sh,
8954    #[serde(rename = "KN")]
8955    #[display("KN")]
8956    Kn,
8957    #[serde(rename = "LC")]
8958    #[display("LC")]
8959    Lc,
8960    #[serde(rename = "MF")]
8961    #[display("MF")]
8962    Mf,
8963    #[serde(rename = "PM")]
8964    #[display("PM")]
8965    Pm,
8966    #[serde(rename = "VC")]
8967    #[display("VC")]
8968    Vc,
8969    #[serde(rename = "WS")]
8970    #[display("WS")]
8971    Ws,
8972    #[serde(rename = "SM")]
8973    #[display("SM")]
8974    Sm,
8975    #[serde(rename = "ST")]
8976    #[display("ST")]
8977    St,
8978    #[serde(rename = "SA")]
8979    #[display("SA")]
8980    Sa,
8981    #[serde(rename = "SN")]
8982    #[display("SN")]
8983    Sn,
8984    #[serde(rename = "RS")]
8985    #[display("RS")]
8986    Rs,
8987    #[serde(rename = "SC")]
8988    #[display("SC")]
8989    Sc,
8990    #[serde(rename = "SL")]
8991    #[display("SL")]
8992    Sl,
8993    #[serde(rename = "SG")]
8994    #[display("SG")]
8995    Sg,
8996    #[serde(rename = "SX")]
8997    #[display("SX")]
8998    Sx,
8999    #[serde(rename = "SK")]
9000    #[display("SK")]
9001    Sk,
9002    #[serde(rename = "SI")]
9003    #[display("SI")]
9004    Si,
9005    #[serde(rename = "SB")]
9006    #[display("SB")]
9007    Sb,
9008    #[serde(rename = "SO")]
9009    #[display("SO")]
9010    So,
9011    #[serde(rename = "ZA")]
9012    #[display("ZA")]
9013    Za,
9014    #[serde(rename = "GS")]
9015    #[display("GS")]
9016    Gs,
9017    #[serde(rename = "SS")]
9018    #[display("SS")]
9019    Ss,
9020    #[serde(rename = "ES")]
9021    #[display("ES")]
9022    Es,
9023    #[serde(rename = "LK")]
9024    #[display("LK")]
9025    Lk,
9026    #[serde(rename = "SD")]
9027    #[display("SD")]
9028    Sd,
9029    #[serde(rename = "SR")]
9030    #[display("SR")]
9031    Sr,
9032    #[serde(rename = "SJ")]
9033    #[display("SJ")]
9034    Sj,
9035    #[serde(rename = "SE")]
9036    #[display("SE")]
9037    Se,
9038    #[serde(rename = "CH")]
9039    #[display("CH")]
9040    Ch,
9041    #[serde(rename = "TW")]
9042    #[display("TW")]
9043    Tw,
9044    #[serde(rename = "TJ")]
9045    #[display("TJ")]
9046    Tj,
9047    #[serde(rename = "TZ")]
9048    #[display("TZ")]
9049    Tz,
9050    #[serde(rename = "TH")]
9051    #[display("TH")]
9052    Th,
9053    #[serde(rename = "TL")]
9054    #[display("TL")]
9055    Tl,
9056    #[serde(rename = "TG")]
9057    #[display("TG")]
9058    Tg,
9059    #[serde(rename = "TK")]
9060    #[display("TK")]
9061    Tk,
9062    #[serde(rename = "TO")]
9063    #[display("TO")]
9064    To,
9065    #[serde(rename = "TT")]
9066    #[display("TT")]
9067    Tt,
9068    #[serde(rename = "TN")]
9069    #[display("TN")]
9070    Tn,
9071    #[serde(rename = "TR")]
9072    #[display("TR")]
9073    Tr,
9074    #[serde(rename = "TM")]
9075    #[display("TM")]
9076    Tm,
9077    #[serde(rename = "TC")]
9078    #[display("TC")]
9079    Tc,
9080    #[serde(rename = "TV")]
9081    #[display("TV")]
9082    Tv,
9083    #[serde(rename = "UG")]
9084    #[display("UG")]
9085    Ug,
9086    #[serde(rename = "UA")]
9087    #[display("UA")]
9088    Ua,
9089    #[serde(rename = "AE")]
9090    #[display("AE")]
9091    Ae,
9092    #[serde(rename = "GB")]
9093    #[display("GB")]
9094    Gb,
9095    #[serde(rename = "US")]
9096    #[display("US")]
9097    Us,
9098    #[serde(rename = "UM")]
9099    #[display("UM")]
9100    Um,
9101    #[serde(rename = "UY")]
9102    #[display("UY")]
9103    Uy,
9104    #[serde(rename = "UZ")]
9105    #[display("UZ")]
9106    Uz,
9107    #[serde(rename = "VU")]
9108    #[display("VU")]
9109    Vu,
9110    #[serde(rename = "VE")]
9111    #[display("VE")]
9112    Ve,
9113    #[serde(rename = "VN")]
9114    #[display("VN")]
9115    Vn,
9116    #[serde(rename = "VG")]
9117    #[display("VG")]
9118    Vg,
9119    #[serde(rename = "VI")]
9120    #[display("VI")]
9121    Vi,
9122    #[serde(rename = "WF")]
9123    #[display("WF")]
9124    Wf,
9125    #[serde(rename = "EH")]
9126    #[display("EH")]
9127    Eh,
9128    #[serde(rename = "YE")]
9129    #[display("YE")]
9130    Ye,
9131    #[serde(rename = "ZM")]
9132    #[display("ZM")]
9133    Zm,
9134    #[serde(rename = "ZW")]
9135    #[display("ZW")]
9136    Zw,
9137}
9138
9139#[doc = "The worker's status within the organization."]
9140#[derive(
9141    serde :: Serialize,
9142    serde :: Deserialize,
9143    PartialEq,
9144    Hash,
9145    Debug,
9146    Clone,
9147    schemars :: JsonSchema,
9148    parse_display :: FromStr,
9149    parse_display :: Display,
9150)]
9151#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
9152#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
9153pub enum WorkerStatus {
9154    #[serde(rename = "HIRED")]
9155    #[display("HIRED")]
9156    Hired,
9157    #[serde(rename = "ACCEPTED")]
9158    #[display("ACCEPTED")]
9159    Accepted,
9160    #[serde(rename = "ACTIVE")]
9161    #[display("ACTIVE")]
9162    Active,
9163    #[serde(rename = "TERMINATED")]
9164    #[display("TERMINATED")]
9165    Terminated,
9166}
9167
9168#[doc = "The gender of the worker, if specified."]
9169#[derive(
9170    serde :: Serialize,
9171    serde :: Deserialize,
9172    PartialEq,
9173    Hash,
9174    Debug,
9175    Clone,
9176    schemars :: JsonSchema,
9177    parse_display :: FromStr,
9178    parse_display :: Display,
9179)]
9180#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
9181#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
9182pub enum Gender {
9183    #[serde(rename = "MALE")]
9184    #[display("MALE")]
9185    Male,
9186    #[serde(rename = "FEMALE")]
9187    #[display("FEMALE")]
9188    Female,
9189    #[serde(rename = "NONBINARY")]
9190    #[display("NONBINARY")]
9191    Nonbinary,
9192    #[serde(rename = "UNDETERMINED")]
9193    #[display("UNDETERMINED")]
9194    Undetermined,
9195    #[serde(rename = "DIVERSE")]
9196    #[display("DIVERSE")]
9197    Diverse,
9198    #[serde(rename = "DOES_NOT_APPLY")]
9199    #[display("DOES_NOT_APPLY")]
9200    DoesNotApply,
9201}
9202
9203#[doc = "The identified race of the worker, if specified."]
9204#[derive(
9205    serde :: Serialize,
9206    serde :: Deserialize,
9207    PartialEq,
9208    Hash,
9209    Debug,
9210    Clone,
9211    schemars :: JsonSchema,
9212    parse_display :: FromStr,
9213    parse_display :: Display,
9214)]
9215#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
9216#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
9217pub enum Race {
9218    #[serde(rename = "BLACK")]
9219    #[display("BLACK")]
9220    Black,
9221    #[serde(rename = "BROWN")]
9222    #[display("BROWN")]
9223    Brown,
9224    #[serde(rename = "CHINESE")]
9225    #[display("CHINESE")]
9226    Chinese,
9227    #[serde(rename = "EURASIAN")]
9228    #[display("EURASIAN")]
9229    Eurasian,
9230    #[serde(rename = "INDIAN")]
9231    #[display("INDIAN")]
9232    Indian,
9233    #[serde(rename = "INDIGENOUS")]
9234    #[display("INDIGENOUS")]
9235    Indigenous,
9236    #[serde(rename = "WHITE")]
9237    #[display("WHITE")]
9238    White,
9239    #[serde(rename = "YELLOW")]
9240    #[display("YELLOW")]
9241    Yellow,
9242    #[serde(rename = "NOT_INFORMED")]
9243    #[display("NOT_INFORMED")]
9244    NotInformed,
9245    #[serde(rename = "OTHER")]
9246    #[display("OTHER")]
9247    Other,
9248}
9249
9250#[doc = "The identified ethnicity of the worker, if specified."]
9251#[derive(
9252    serde :: Serialize,
9253    serde :: Deserialize,
9254    PartialEq,
9255    Hash,
9256    Debug,
9257    Clone,
9258    schemars :: JsonSchema,
9259    parse_display :: FromStr,
9260    parse_display :: Display,
9261)]
9262#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
9263#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
9264pub enum Ethnicity {
9265    #[serde(rename = "HISPANIC_OR_LATINO")]
9266    #[display("HISPANIC_OR_LATINO")]
9267    HispanicOrLatino,
9268    #[serde(rename = "WHITE")]
9269    #[display("WHITE")]
9270    White,
9271    #[serde(rename = "BLACK_OR_AFRICAN_AMERICAN")]
9272    #[display("BLACK_OR_AFRICAN_AMERICAN")]
9273    BlackOrAfricanAmerican,
9274    #[serde(rename = "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER")]
9275    #[display("NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER")]
9276    NativeHawaiianOrOtherPacificIslander,
9277    #[serde(rename = "ASIAN")]
9278    #[display("ASIAN")]
9279    Asian,
9280    #[serde(rename = "AMERICAN_INDIAN_OR_ALASKA_NATIVE")]
9281    #[display("AMERICAN_INDIAN_OR_ALASKA_NATIVE")]
9282    AmericanIndianOrAlaskaNative,
9283    #[serde(rename = "TWO_OR_MORE_RACES")]
9284    #[display("TWO_OR_MORE_RACES")]
9285    TwoOrMoreRaces,
9286    #[serde(rename = "DECLINE_TO_SELF_IDENTIFY")]
9287    #[display("DECLINE_TO_SELF_IDENTIFY")]
9288    DeclineToSelfIdentify,
9289}
9290
9291#[doc = "The countries that the worker has citizenship in."]
9292#[derive(
9293    serde :: Serialize,
9294    serde :: Deserialize,
9295    PartialEq,
9296    Hash,
9297    Debug,
9298    Clone,
9299    schemars :: JsonSchema,
9300    parse_display :: FromStr,
9301    parse_display :: Display,
9302)]
9303#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
9304#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
9305pub enum Citizenship {
9306    #[serde(rename = "AF")]
9307    #[display("AF")]
9308    Af,
9309    #[serde(rename = "AX")]
9310    #[display("AX")]
9311    Ax,
9312    #[serde(rename = "AL")]
9313    #[display("AL")]
9314    Al,
9315    #[serde(rename = "DZ")]
9316    #[display("DZ")]
9317    Dz,
9318    #[serde(rename = "AS")]
9319    #[display("AS")]
9320    As,
9321    #[serde(rename = "AD")]
9322    #[display("AD")]
9323    Ad,
9324    #[serde(rename = "AO")]
9325    #[display("AO")]
9326    Ao,
9327    #[serde(rename = "AI")]
9328    #[display("AI")]
9329    Ai,
9330    #[serde(rename = "AQ")]
9331    #[display("AQ")]
9332    Aq,
9333    #[serde(rename = "AG")]
9334    #[display("AG")]
9335    Ag,
9336    #[serde(rename = "AR")]
9337    #[display("AR")]
9338    Ar,
9339    #[serde(rename = "AM")]
9340    #[display("AM")]
9341    Am,
9342    #[serde(rename = "AW")]
9343    #[display("AW")]
9344    Aw,
9345    #[serde(rename = "AU")]
9346    #[display("AU")]
9347    Au,
9348    #[serde(rename = "AT")]
9349    #[display("AT")]
9350    At,
9351    #[serde(rename = "AZ")]
9352    #[display("AZ")]
9353    Az,
9354    #[serde(rename = "BS")]
9355    #[display("BS")]
9356    Bs,
9357    #[serde(rename = "BH")]
9358    #[display("BH")]
9359    Bh,
9360    #[serde(rename = "BD")]
9361    #[display("BD")]
9362    Bd,
9363    #[serde(rename = "BB")]
9364    #[display("BB")]
9365    Bb,
9366    #[serde(rename = "BY")]
9367    #[display("BY")]
9368    By,
9369    #[serde(rename = "BE")]
9370    #[display("BE")]
9371    Be,
9372    #[serde(rename = "BZ")]
9373    #[display("BZ")]
9374    Bz,
9375    #[serde(rename = "BJ")]
9376    #[display("BJ")]
9377    Bj,
9378    #[serde(rename = "BM")]
9379    #[display("BM")]
9380    Bm,
9381    #[serde(rename = "BT")]
9382    #[display("BT")]
9383    Bt,
9384    #[serde(rename = "BO")]
9385    #[display("BO")]
9386    Bo,
9387    #[serde(rename = "BQ")]
9388    #[display("BQ")]
9389    Bq,
9390    #[serde(rename = "BA")]
9391    #[display("BA")]
9392    Ba,
9393    #[serde(rename = "BW")]
9394    #[display("BW")]
9395    Bw,
9396    #[serde(rename = "BV")]
9397    #[display("BV")]
9398    Bv,
9399    #[serde(rename = "BR")]
9400    #[display("BR")]
9401    Br,
9402    #[serde(rename = "IO")]
9403    #[display("IO")]
9404    Io,
9405    #[serde(rename = "BN")]
9406    #[display("BN")]
9407    Bn,
9408    #[serde(rename = "BG")]
9409    #[display("BG")]
9410    Bg,
9411    #[serde(rename = "BF")]
9412    #[display("BF")]
9413    Bf,
9414    #[serde(rename = "BI")]
9415    #[display("BI")]
9416    Bi,
9417    #[serde(rename = "CV")]
9418    #[display("CV")]
9419    Cv,
9420    #[serde(rename = "KH")]
9421    #[display("KH")]
9422    Kh,
9423    #[serde(rename = "CM")]
9424    #[display("CM")]
9425    Cm,
9426    #[serde(rename = "CA")]
9427    #[display("CA")]
9428    Ca,
9429    #[serde(rename = "KY")]
9430    #[display("KY")]
9431    Ky,
9432    #[serde(rename = "CF")]
9433    #[display("CF")]
9434    Cf,
9435    #[serde(rename = "TD")]
9436    #[display("TD")]
9437    Td,
9438    #[serde(rename = "CL")]
9439    #[display("CL")]
9440    Cl,
9441    #[serde(rename = "CN")]
9442    #[display("CN")]
9443    Cn,
9444    #[serde(rename = "CX")]
9445    #[display("CX")]
9446    Cx,
9447    #[serde(rename = "CC")]
9448    #[display("CC")]
9449    Cc,
9450    #[serde(rename = "CO")]
9451    #[display("CO")]
9452    Co,
9453    #[serde(rename = "KM")]
9454    #[display("KM")]
9455    Km,
9456    #[serde(rename = "CG")]
9457    #[display("CG")]
9458    Cg,
9459    #[serde(rename = "CD")]
9460    #[display("CD")]
9461    Cd,
9462    #[serde(rename = "CK")]
9463    #[display("CK")]
9464    Ck,
9465    #[serde(rename = "CR")]
9466    #[display("CR")]
9467    Cr,
9468    #[serde(rename = "CI")]
9469    #[display("CI")]
9470    Ci,
9471    #[serde(rename = "HR")]
9472    #[display("HR")]
9473    Hr,
9474    #[serde(rename = "CW")]
9475    #[display("CW")]
9476    Cw,
9477    #[serde(rename = "CY")]
9478    #[display("CY")]
9479    Cy,
9480    #[serde(rename = "CZ")]
9481    #[display("CZ")]
9482    Cz,
9483    #[serde(rename = "DK")]
9484    #[display("DK")]
9485    Dk,
9486    #[serde(rename = "DJ")]
9487    #[display("DJ")]
9488    Dj,
9489    #[serde(rename = "DM")]
9490    #[display("DM")]
9491    Dm,
9492    #[serde(rename = "DO")]
9493    #[display("DO")]
9494    Do,
9495    #[serde(rename = "EC")]
9496    #[display("EC")]
9497    Ec,
9498    #[serde(rename = "EG")]
9499    #[display("EG")]
9500    Eg,
9501    #[serde(rename = "SV")]
9502    #[display("SV")]
9503    Sv,
9504    #[serde(rename = "GQ")]
9505    #[display("GQ")]
9506    Gq,
9507    #[serde(rename = "ER")]
9508    #[display("ER")]
9509    Er,
9510    #[serde(rename = "EE")]
9511    #[display("EE")]
9512    Ee,
9513    #[serde(rename = "SZ")]
9514    #[display("SZ")]
9515    Sz,
9516    #[serde(rename = "ET")]
9517    #[display("ET")]
9518    Et,
9519    #[serde(rename = "FK")]
9520    #[display("FK")]
9521    Fk,
9522    #[serde(rename = "FO")]
9523    #[display("FO")]
9524    Fo,
9525    #[serde(rename = "FJ")]
9526    #[display("FJ")]
9527    Fj,
9528    #[serde(rename = "FI")]
9529    #[display("FI")]
9530    Fi,
9531    #[serde(rename = "FR")]
9532    #[display("FR")]
9533    Fr,
9534    #[serde(rename = "GF")]
9535    #[display("GF")]
9536    Gf,
9537    #[serde(rename = "PF")]
9538    #[display("PF")]
9539    Pf,
9540    #[serde(rename = "TF")]
9541    #[display("TF")]
9542    Tf,
9543    #[serde(rename = "GA")]
9544    #[display("GA")]
9545    Ga,
9546    #[serde(rename = "GM")]
9547    #[display("GM")]
9548    Gm,
9549    #[serde(rename = "GE")]
9550    #[display("GE")]
9551    Ge,
9552    #[serde(rename = "DE")]
9553    #[display("DE")]
9554    De,
9555    #[serde(rename = "GH")]
9556    #[display("GH")]
9557    Gh,
9558    #[serde(rename = "GI")]
9559    #[display("GI")]
9560    Gi,
9561    #[serde(rename = "GR")]
9562    #[display("GR")]
9563    Gr,
9564    #[serde(rename = "GL")]
9565    #[display("GL")]
9566    Gl,
9567    #[serde(rename = "GD")]
9568    #[display("GD")]
9569    Gd,
9570    #[serde(rename = "GP")]
9571    #[display("GP")]
9572    Gp,
9573    #[serde(rename = "GU")]
9574    #[display("GU")]
9575    Gu,
9576    #[serde(rename = "GT")]
9577    #[display("GT")]
9578    Gt,
9579    #[serde(rename = "GG")]
9580    #[display("GG")]
9581    Gg,
9582    #[serde(rename = "GN")]
9583    #[display("GN")]
9584    Gn,
9585    #[serde(rename = "GW")]
9586    #[display("GW")]
9587    Gw,
9588    #[serde(rename = "GY")]
9589    #[display("GY")]
9590    Gy,
9591    #[serde(rename = "HT")]
9592    #[display("HT")]
9593    Ht,
9594    #[serde(rename = "HM")]
9595    #[display("HM")]
9596    Hm,
9597    #[serde(rename = "VA")]
9598    #[display("VA")]
9599    Va,
9600    #[serde(rename = "HN")]
9601    #[display("HN")]
9602    Hn,
9603    #[serde(rename = "HK")]
9604    #[display("HK")]
9605    Hk,
9606    #[serde(rename = "HU")]
9607    #[display("HU")]
9608    Hu,
9609    #[serde(rename = "IS")]
9610    #[display("IS")]
9611    Is,
9612    #[serde(rename = "IN")]
9613    #[display("IN")]
9614    In,
9615    #[serde(rename = "ID")]
9616    #[display("ID")]
9617    Id,
9618    #[serde(rename = "IQ")]
9619    #[display("IQ")]
9620    Iq,
9621    #[serde(rename = "IE")]
9622    #[display("IE")]
9623    Ie,
9624    #[serde(rename = "IM")]
9625    #[display("IM")]
9626    Im,
9627    #[serde(rename = "IL")]
9628    #[display("IL")]
9629    Il,
9630    #[serde(rename = "IT")]
9631    #[display("IT")]
9632    It,
9633    #[serde(rename = "JM")]
9634    #[display("JM")]
9635    Jm,
9636    #[serde(rename = "JP")]
9637    #[display("JP")]
9638    Jp,
9639    #[serde(rename = "JE")]
9640    #[display("JE")]
9641    Je,
9642    #[serde(rename = "JO")]
9643    #[display("JO")]
9644    Jo,
9645    #[serde(rename = "KZ")]
9646    #[display("KZ")]
9647    Kz,
9648    #[serde(rename = "KE")]
9649    #[display("KE")]
9650    Ke,
9651    #[serde(rename = "KI")]
9652    #[display("KI")]
9653    Ki,
9654    #[serde(rename = "KR")]
9655    #[display("KR")]
9656    Kr,
9657    #[serde(rename = "XK")]
9658    #[display("XK")]
9659    Xk,
9660    #[serde(rename = "KW")]
9661    #[display("KW")]
9662    Kw,
9663    #[serde(rename = "KG")]
9664    #[display("KG")]
9665    Kg,
9666    #[serde(rename = "LA")]
9667    #[display("LA")]
9668    La,
9669    #[serde(rename = "LV")]
9670    #[display("LV")]
9671    Lv,
9672    #[serde(rename = "LB")]
9673    #[display("LB")]
9674    Lb,
9675    #[serde(rename = "LS")]
9676    #[display("LS")]
9677    Ls,
9678    #[serde(rename = "LR")]
9679    #[display("LR")]
9680    Lr,
9681    #[serde(rename = "LY")]
9682    #[display("LY")]
9683    Ly,
9684    #[serde(rename = "LI")]
9685    #[display("LI")]
9686    Li,
9687    #[serde(rename = "LT")]
9688    #[display("LT")]
9689    Lt,
9690    #[serde(rename = "LU")]
9691    #[display("LU")]
9692    Lu,
9693    #[serde(rename = "MO")]
9694    #[display("MO")]
9695    Mo,
9696    #[serde(rename = "MG")]
9697    #[display("MG")]
9698    Mg,
9699    #[serde(rename = "MW")]
9700    #[display("MW")]
9701    Mw,
9702    #[serde(rename = "MY")]
9703    #[display("MY")]
9704    My,
9705    #[serde(rename = "MV")]
9706    #[display("MV")]
9707    Mv,
9708    #[serde(rename = "ML")]
9709    #[display("ML")]
9710    Ml,
9711    #[serde(rename = "MT")]
9712    #[display("MT")]
9713    Mt,
9714    #[serde(rename = "MH")]
9715    #[display("MH")]
9716    Mh,
9717    #[serde(rename = "MQ")]
9718    #[display("MQ")]
9719    Mq,
9720    #[serde(rename = "MR")]
9721    #[display("MR")]
9722    Mr,
9723    #[serde(rename = "MU")]
9724    #[display("MU")]
9725    Mu,
9726    #[serde(rename = "YT")]
9727    #[display("YT")]
9728    Yt,
9729    #[serde(rename = "MX")]
9730    #[display("MX")]
9731    Mx,
9732    #[serde(rename = "FM")]
9733    #[display("FM")]
9734    Fm,
9735    #[serde(rename = "MD")]
9736    #[display("MD")]
9737    Md,
9738    #[serde(rename = "MC")]
9739    #[display("MC")]
9740    Mc,
9741    #[serde(rename = "MN")]
9742    #[display("MN")]
9743    Mn,
9744    #[serde(rename = "ME")]
9745    #[display("ME")]
9746    Me,
9747    #[serde(rename = "MS")]
9748    #[display("MS")]
9749    Ms,
9750    #[serde(rename = "MA")]
9751    #[display("MA")]
9752    Ma,
9753    #[serde(rename = "MZ")]
9754    #[display("MZ")]
9755    Mz,
9756    #[serde(rename = "MM")]
9757    #[display("MM")]
9758    Mm,
9759    #[serde(rename = "NA")]
9760    #[display("NA")]
9761    Na,
9762    #[serde(rename = "NR")]
9763    #[display("NR")]
9764    Nr,
9765    #[serde(rename = "NP")]
9766    #[display("NP")]
9767    Np,
9768    #[serde(rename = "NL")]
9769    #[display("NL")]
9770    Nl,
9771    #[serde(rename = "AN")]
9772    #[display("AN")]
9773    An,
9774    #[serde(rename = "NC")]
9775    #[display("NC")]
9776    Nc,
9777    #[serde(rename = "NZ")]
9778    #[display("NZ")]
9779    Nz,
9780    #[serde(rename = "NI")]
9781    #[display("NI")]
9782    Ni,
9783    #[serde(rename = "NE")]
9784    #[display("NE")]
9785    Ne,
9786    #[serde(rename = "NG")]
9787    #[display("NG")]
9788    Ng,
9789    #[serde(rename = "NU")]
9790    #[display("NU")]
9791    Nu,
9792    #[serde(rename = "NF")]
9793    #[display("NF")]
9794    Nf,
9795    #[serde(rename = "MK")]
9796    #[display("MK")]
9797    Mk,
9798    #[serde(rename = "MP")]
9799    #[display("MP")]
9800    Mp,
9801    #[serde(rename = "NO")]
9802    #[display("NO")]
9803    No,
9804    #[serde(rename = "OM")]
9805    #[display("OM")]
9806    Om,
9807    #[serde(rename = "PK")]
9808    #[display("PK")]
9809    Pk,
9810    #[serde(rename = "PW")]
9811    #[display("PW")]
9812    Pw,
9813    #[serde(rename = "PS")]
9814    #[display("PS")]
9815    Ps,
9816    #[serde(rename = "PA")]
9817    #[display("PA")]
9818    Pa,
9819    #[serde(rename = "PG")]
9820    #[display("PG")]
9821    Pg,
9822    #[serde(rename = "PY")]
9823    #[display("PY")]
9824    Py,
9825    #[serde(rename = "PE")]
9826    #[display("PE")]
9827    Pe,
9828    #[serde(rename = "PH")]
9829    #[display("PH")]
9830    Ph,
9831    #[serde(rename = "PN")]
9832    #[display("PN")]
9833    Pn,
9834    #[serde(rename = "PL")]
9835    #[display("PL")]
9836    Pl,
9837    #[serde(rename = "PT")]
9838    #[display("PT")]
9839    Pt,
9840    #[serde(rename = "PR")]
9841    #[display("PR")]
9842    Pr,
9843    #[serde(rename = "QA")]
9844    #[display("QA")]
9845    Qa,
9846    #[serde(rename = "RO")]
9847    #[display("RO")]
9848    Ro,
9849    #[serde(rename = "RU")]
9850    #[display("RU")]
9851    Ru,
9852    #[serde(rename = "RW")]
9853    #[display("RW")]
9854    Rw,
9855    #[serde(rename = "RE")]
9856    #[display("RE")]
9857    Re,
9858    #[serde(rename = "BL")]
9859    #[display("BL")]
9860    Bl,
9861    #[serde(rename = "SH")]
9862    #[display("SH")]
9863    Sh,
9864    #[serde(rename = "KN")]
9865    #[display("KN")]
9866    Kn,
9867    #[serde(rename = "LC")]
9868    #[display("LC")]
9869    Lc,
9870    #[serde(rename = "MF")]
9871    #[display("MF")]
9872    Mf,
9873    #[serde(rename = "PM")]
9874    #[display("PM")]
9875    Pm,
9876    #[serde(rename = "VC")]
9877    #[display("VC")]
9878    Vc,
9879    #[serde(rename = "WS")]
9880    #[display("WS")]
9881    Ws,
9882    #[serde(rename = "SM")]
9883    #[display("SM")]
9884    Sm,
9885    #[serde(rename = "ST")]
9886    #[display("ST")]
9887    St,
9888    #[serde(rename = "SA")]
9889    #[display("SA")]
9890    Sa,
9891    #[serde(rename = "SN")]
9892    #[display("SN")]
9893    Sn,
9894    #[serde(rename = "RS")]
9895    #[display("RS")]
9896    Rs,
9897    #[serde(rename = "SC")]
9898    #[display("SC")]
9899    Sc,
9900    #[serde(rename = "SL")]
9901    #[display("SL")]
9902    Sl,
9903    #[serde(rename = "SG")]
9904    #[display("SG")]
9905    Sg,
9906    #[serde(rename = "SX")]
9907    #[display("SX")]
9908    Sx,
9909    #[serde(rename = "SK")]
9910    #[display("SK")]
9911    Sk,
9912    #[serde(rename = "SI")]
9913    #[display("SI")]
9914    Si,
9915    #[serde(rename = "SB")]
9916    #[display("SB")]
9917    Sb,
9918    #[serde(rename = "SO")]
9919    #[display("SO")]
9920    So,
9921    #[serde(rename = "ZA")]
9922    #[display("ZA")]
9923    Za,
9924    #[serde(rename = "GS")]
9925    #[display("GS")]
9926    Gs,
9927    #[serde(rename = "SS")]
9928    #[display("SS")]
9929    Ss,
9930    #[serde(rename = "ES")]
9931    #[display("ES")]
9932    Es,
9933    #[serde(rename = "LK")]
9934    #[display("LK")]
9935    Lk,
9936    #[serde(rename = "SD")]
9937    #[display("SD")]
9938    Sd,
9939    #[serde(rename = "SR")]
9940    #[display("SR")]
9941    Sr,
9942    #[serde(rename = "SJ")]
9943    #[display("SJ")]
9944    Sj,
9945    #[serde(rename = "SE")]
9946    #[display("SE")]
9947    Se,
9948    #[serde(rename = "CH")]
9949    #[display("CH")]
9950    Ch,
9951    #[serde(rename = "TW")]
9952    #[display("TW")]
9953    Tw,
9954    #[serde(rename = "TJ")]
9955    #[display("TJ")]
9956    Tj,
9957    #[serde(rename = "TZ")]
9958    #[display("TZ")]
9959    Tz,
9960    #[serde(rename = "TH")]
9961    #[display("TH")]
9962    Th,
9963    #[serde(rename = "TL")]
9964    #[display("TL")]
9965    Tl,
9966    #[serde(rename = "TG")]
9967    #[display("TG")]
9968    Tg,
9969    #[serde(rename = "TK")]
9970    #[display("TK")]
9971    Tk,
9972    #[serde(rename = "TO")]
9973    #[display("TO")]
9974    To,
9975    #[serde(rename = "TT")]
9976    #[display("TT")]
9977    Tt,
9978    #[serde(rename = "TN")]
9979    #[display("TN")]
9980    Tn,
9981    #[serde(rename = "TR")]
9982    #[display("TR")]
9983    Tr,
9984    #[serde(rename = "TM")]
9985    #[display("TM")]
9986    Tm,
9987    #[serde(rename = "TC")]
9988    #[display("TC")]
9989    Tc,
9990    #[serde(rename = "TV")]
9991    #[display("TV")]
9992    Tv,
9993    #[serde(rename = "UG")]
9994    #[display("UG")]
9995    Ug,
9996    #[serde(rename = "UA")]
9997    #[display("UA")]
9998    Ua,
9999    #[serde(rename = "AE")]
10000    #[display("AE")]
10001    Ae,
10002    #[serde(rename = "GB")]
10003    #[display("GB")]
10004    Gb,
10005    #[serde(rename = "US")]
10006    #[display("US")]
10007    Us,
10008    #[serde(rename = "UM")]
10009    #[display("UM")]
10010    Um,
10011    #[serde(rename = "UY")]
10012    #[display("UY")]
10013    Uy,
10014    #[serde(rename = "UZ")]
10015    #[display("UZ")]
10016    Uz,
10017    #[serde(rename = "VU")]
10018    #[display("VU")]
10019    Vu,
10020    #[serde(rename = "VE")]
10021    #[display("VE")]
10022    Ve,
10023    #[serde(rename = "VN")]
10024    #[display("VN")]
10025    Vn,
10026    #[serde(rename = "VG")]
10027    #[display("VG")]
10028    Vg,
10029    #[serde(rename = "VI")]
10030    #[display("VI")]
10031    Vi,
10032    #[serde(rename = "WF")]
10033    #[display("WF")]
10034    Wf,
10035    #[serde(rename = "EH")]
10036    #[display("EH")]
10037    Eh,
10038    #[serde(rename = "YE")]
10039    #[display("YE")]
10040    Ye,
10041    #[serde(rename = "ZM")]
10042    #[display("ZM")]
10043    Zm,
10044    #[serde(rename = "ZW")]
10045    #[display("ZW")]
10046    Zw,
10047}
10048
10049#[doc = "Worker."]
10050#[derive(
10051    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10052)]
10053pub struct Worker {
10054    #[doc = "Identifier field"]
10055    pub id: String,
10056    #[doc = "Record creation date"]
10057    pub created_at: String,
10058    #[doc = "Record update date"]
10059    pub updated_at: String,
10060    #[doc = "The worker's associated user."]
10061    #[serde(default, skip_serializing_if = "Option::is_none")]
10062    pub user_id: Option<String>,
10063    #[doc = "The worker's associated user.\n\nExpandable field"]
10064    #[serde(default, skip_serializing_if = "Option::is_none")]
10065    pub user: Option<User>,
10066    #[doc = "The worker's manager."]
10067    #[serde(default, skip_serializing_if = "Option::is_none")]
10068    pub manager_id: Option<String>,
10069    #[doc = "The worker's manager.\n\nExpandable field"]
10070    #[serde(default, skip_serializing_if = "Option::is_none")]
10071    pub manager: Option<Box<Worker>>,
10072    #[doc = "The worker's associated legal entity."]
10073    #[serde(default, skip_serializing_if = "Option::is_none")]
10074    pub legal_entity_id: Option<String>,
10075    #[doc = "The worker's associated legal entity.\n\nExpandable field"]
10076    #[serde(default, skip_serializing_if = "Option::is_none")]
10077    pub legal_entity: Option<LegalEntity>,
10078    #[doc = "The worker's country."]
10079    #[serde(default, skip_serializing_if = "Option::is_none")]
10080    pub country: Option<WorkerCountry>,
10081    #[doc = "The start date of the worker."]
10082    #[serde(default, skip_serializing_if = "Option::is_none")]
10083    pub start_date: Option<String>,
10084    #[doc = "The end date of the worker."]
10085    #[serde(default, skip_serializing_if = "Option::is_none")]
10086    pub end_date: Option<String>,
10087    #[doc = "The worker's number within the organization."]
10088    #[serde(default, skip_serializing_if = "Option::is_none")]
10089    pub number: Option<i64>,
10090    #[doc = "The worker's associated work email address."]
10091    #[serde(default, skip_serializing_if = "Option::is_none")]
10092    pub work_email: Option<String>,
10093    #[doc = "The worker's associated personal email address."]
10094    #[serde(default, skip_serializing_if = "Option::is_none")]
10095    pub personal_email: Option<String>,
10096    #[doc = "The worker's status within the organization."]
10097    #[serde(default, skip_serializing_if = "Option::is_none")]
10098    pub status: Option<WorkerStatus>,
10099    #[doc = "The location that the worker is mapped to for tax purposes. In the case that a \
10100             worker is remote, the location's type is remote."]
10101    #[serde(default, skip_serializing_if = "Option::is_none")]
10102    pub location: Option<WorkerLocation>,
10103    #[doc = "The worker's employment type."]
10104    #[serde(default, skip_serializing_if = "Option::is_none")]
10105    pub employment_type_id: Option<String>,
10106    #[doc = "The worker's employment type.\n\nExpandable field"]
10107    #[serde(default, skip_serializing_if = "Option::is_none")]
10108    pub employment_type: Option<CompanyEmploymentType>,
10109    #[doc = "The gender of the worker, if specified."]
10110    #[serde(default, skip_serializing_if = "Option::is_none")]
10111    pub gender: Option<Gender>,
10112    #[doc = "The worker's date of birth."]
10113    #[serde(default, skip_serializing_if = "Option::is_none")]
10114    pub date_of_birth: Option<String>,
10115    #[doc = "The identified race of the worker, if specified."]
10116    #[serde(default, skip_serializing_if = "Option::is_none")]
10117    pub race: Option<Race>,
10118    #[doc = "The identified ethnicity of the worker, if specified."]
10119    #[serde(default, skip_serializing_if = "Option::is_none")]
10120    pub ethnicity: Option<Ethnicity>,
10121    #[doc = "The countries that the worker has citizenship in."]
10122    #[serde(default, skip_serializing_if = "Option::is_none")]
10123    pub citizenship: Option<Citizenship>,
10124    #[doc = "The compensation package for the worker."]
10125    #[serde(default, skip_serializing_if = "Option::is_none")]
10126    pub compensation_id: Option<String>,
10127    #[doc = "The compensation package for the worker.\n\nExpandable field"]
10128    #[serde(default, skip_serializing_if = "Option::is_none")]
10129    pub compensation: Option<Compensation>,
10130    #[doc = "The worker's assigned department."]
10131    #[serde(default, skip_serializing_if = "Option::is_none")]
10132    pub department_id: Option<String>,
10133    #[doc = "The worker's assigned department.\n\nExpandable field"]
10134    #[serde(default, skip_serializing_if = "Option::is_none")]
10135    pub department: Option<Department>,
10136    #[doc = "The worker's assigned teams."]
10137    #[serde(default, skip_serializing_if = "Option::is_none")]
10138    pub teams_id: Option<Vec<String>>,
10139    #[doc = "The worker's assigned teams.\n\nExpandable field"]
10140    #[serde(default, skip_serializing_if = "Option::is_none")]
10141    pub teams: Option<Vec<Team>>,
10142    #[doc = "The worker's title."]
10143    #[serde(default, skip_serializing_if = "Option::is_none")]
10144    pub title: Option<String>,
10145    #[doc = "The level of the worker."]
10146    #[serde(default, skip_serializing_if = "Option::is_none")]
10147    pub level_id: Option<String>,
10148    #[doc = "The level of the worker.\n\nExpandable field"]
10149    #[serde(default, skip_serializing_if = "Option::is_none")]
10150    pub level: Option<Level>,
10151    #[doc = "The details of the worker's termination, if applicable."]
10152    #[serde(default, skip_serializing_if = "Option::is_none")]
10153    pub termination_details: Option<TerminationDetails>,
10154    #[doc = "Custom fields for the worker\n\nExpandable field"]
10155    #[serde(default, skip_serializing_if = "Option::is_none")]
10156    pub custom_fields: Option<Vec<std::collections::HashMap<String, serde_json::Value>>>,
10157}
10158
10159impl std::fmt::Display for Worker {
10160    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10161        write!(
10162            f,
10163            "{}",
10164            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10165        )
10166    }
10167}
10168
10169#[cfg(feature = "tabled")]
10170impl tabled::Tabled for Worker {
10171    const LENGTH: usize = 35;
10172    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10173        vec![
10174            self.id.clone().into(),
10175            self.created_at.clone().into(),
10176            self.updated_at.clone().into(),
10177            if let Some(user_id) = &self.user_id {
10178                format!("{:?}", user_id).into()
10179            } else {
10180                String::new().into()
10181            },
10182            if let Some(user) = &self.user {
10183                format!("{:?}", user).into()
10184            } else {
10185                String::new().into()
10186            },
10187            if let Some(manager_id) = &self.manager_id {
10188                format!("{:?}", manager_id).into()
10189            } else {
10190                String::new().into()
10191            },
10192            if let Some(manager) = &self.manager {
10193                format!("{:?}", manager).into()
10194            } else {
10195                String::new().into()
10196            },
10197            if let Some(legal_entity_id) = &self.legal_entity_id {
10198                format!("{:?}", legal_entity_id).into()
10199            } else {
10200                String::new().into()
10201            },
10202            if let Some(legal_entity) = &self.legal_entity {
10203                format!("{:?}", legal_entity).into()
10204            } else {
10205                String::new().into()
10206            },
10207            if let Some(country) = &self.country {
10208                format!("{:?}", country).into()
10209            } else {
10210                String::new().into()
10211            },
10212            if let Some(start_date) = &self.start_date {
10213                format!("{:?}", start_date).into()
10214            } else {
10215                String::new().into()
10216            },
10217            if let Some(end_date) = &self.end_date {
10218                format!("{:?}", end_date).into()
10219            } else {
10220                String::new().into()
10221            },
10222            if let Some(number) = &self.number {
10223                format!("{:?}", number).into()
10224            } else {
10225                String::new().into()
10226            },
10227            if let Some(work_email) = &self.work_email {
10228                format!("{:?}", work_email).into()
10229            } else {
10230                String::new().into()
10231            },
10232            if let Some(personal_email) = &self.personal_email {
10233                format!("{:?}", personal_email).into()
10234            } else {
10235                String::new().into()
10236            },
10237            if let Some(status) = &self.status {
10238                format!("{:?}", status).into()
10239            } else {
10240                String::new().into()
10241            },
10242            if let Some(location) = &self.location {
10243                format!("{:?}", location).into()
10244            } else {
10245                String::new().into()
10246            },
10247            if let Some(employment_type_id) = &self.employment_type_id {
10248                format!("{:?}", employment_type_id).into()
10249            } else {
10250                String::new().into()
10251            },
10252            if let Some(employment_type) = &self.employment_type {
10253                format!("{:?}", employment_type).into()
10254            } else {
10255                String::new().into()
10256            },
10257            if let Some(gender) = &self.gender {
10258                format!("{:?}", gender).into()
10259            } else {
10260                String::new().into()
10261            },
10262            if let Some(date_of_birth) = &self.date_of_birth {
10263                format!("{:?}", date_of_birth).into()
10264            } else {
10265                String::new().into()
10266            },
10267            if let Some(race) = &self.race {
10268                format!("{:?}", race).into()
10269            } else {
10270                String::new().into()
10271            },
10272            if let Some(ethnicity) = &self.ethnicity {
10273                format!("{:?}", ethnicity).into()
10274            } else {
10275                String::new().into()
10276            },
10277            if let Some(citizenship) = &self.citizenship {
10278                format!("{:?}", citizenship).into()
10279            } else {
10280                String::new().into()
10281            },
10282            if let Some(compensation_id) = &self.compensation_id {
10283                format!("{:?}", compensation_id).into()
10284            } else {
10285                String::new().into()
10286            },
10287            if let Some(compensation) = &self.compensation {
10288                format!("{:?}", compensation).into()
10289            } else {
10290                String::new().into()
10291            },
10292            if let Some(department_id) = &self.department_id {
10293                format!("{:?}", department_id).into()
10294            } else {
10295                String::new().into()
10296            },
10297            if let Some(department) = &self.department {
10298                format!("{:?}", department).into()
10299            } else {
10300                String::new().into()
10301            },
10302            if let Some(teams_id) = &self.teams_id {
10303                format!("{:?}", teams_id).into()
10304            } else {
10305                String::new().into()
10306            },
10307            if let Some(teams) = &self.teams {
10308                format!("{:?}", teams).into()
10309            } else {
10310                String::new().into()
10311            },
10312            if let Some(title) = &self.title {
10313                format!("{:?}", title).into()
10314            } else {
10315                String::new().into()
10316            },
10317            if let Some(level_id) = &self.level_id {
10318                format!("{:?}", level_id).into()
10319            } else {
10320                String::new().into()
10321            },
10322            if let Some(level) = &self.level {
10323                format!("{:?}", level).into()
10324            } else {
10325                String::new().into()
10326            },
10327            if let Some(termination_details) = &self.termination_details {
10328                format!("{:?}", termination_details).into()
10329            } else {
10330                String::new().into()
10331            },
10332            if let Some(custom_fields) = &self.custom_fields {
10333                format!("{:?}", custom_fields).into()
10334            } else {
10335                String::new().into()
10336            },
10337        ]
10338    }
10339
10340    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10341        vec![
10342            "id".into(),
10343            "created_at".into(),
10344            "updated_at".into(),
10345            "user_id".into(),
10346            "user".into(),
10347            "manager_id".into(),
10348            "manager".into(),
10349            "legal_entity_id".into(),
10350            "legal_entity".into(),
10351            "country".into(),
10352            "start_date".into(),
10353            "end_date".into(),
10354            "number".into(),
10355            "work_email".into(),
10356            "personal_email".into(),
10357            "status".into(),
10358            "location".into(),
10359            "employment_type_id".into(),
10360            "employment_type".into(),
10361            "gender".into(),
10362            "date_of_birth".into(),
10363            "race".into(),
10364            "ethnicity".into(),
10365            "citizenship".into(),
10366            "compensation_id".into(),
10367            "compensation".into(),
10368            "department_id".into(),
10369            "department".into(),
10370            "teams_id".into(),
10371            "teams".into(),
10372            "title".into(),
10373            "level_id".into(),
10374            "level".into(),
10375            "termination_details".into(),
10376            "custom_fields".into(),
10377        ]
10378    }
10379}
10380
10381#[doc = "The type of location."]
10382#[derive(
10383    serde :: Serialize,
10384    serde :: Deserialize,
10385    PartialEq,
10386    Hash,
10387    Debug,
10388    Clone,
10389    schemars :: JsonSchema,
10390    parse_display :: FromStr,
10391    parse_display :: Display,
10392)]
10393#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
10394#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
10395pub enum WorkerLocationType {
10396    #[serde(rename = "REMOTE")]
10397    #[display("REMOTE")]
10398    Remote,
10399    #[serde(rename = "WORK")]
10400    #[display("WORK")]
10401    Work,
10402}
10403
10404#[doc = "WorkerLocation."]
10405#[derive(
10406    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10407)]
10408pub struct WorkerLocation {
10409    #[doc = "The type of location."]
10410    #[serde(rename = "type")]
10411    pub type_: WorkerLocationType,
10412}
10413
10414impl std::fmt::Display for WorkerLocation {
10415    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10416        write!(
10417            f,
10418            "{}",
10419            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10420        )
10421    }
10422}
10423
10424#[cfg(feature = "tabled")]
10425impl tabled::Tabled for WorkerLocation {
10426    const LENGTH: usize = 1;
10427    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10428        vec![format!("{:?}", self.type_).into()]
10429    }
10430
10431    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10432        vec!["type_".into()]
10433    }
10434}
10435
10436#[derive(
10437    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10438)]
10439pub struct ListCandidatesResponse {
10440    #[doc = "A list of redacted fields."]
10441    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
10442    pub meta: Option<RedactedFields>,
10443    pub results: Vec<Candidate>,
10444    #[doc = "A link to the next page of responses."]
10445    #[serde(default, skip_serializing_if = "Option::is_none")]
10446    pub next_link: Option<String>,
10447}
10448
10449impl std::fmt::Display for ListCandidatesResponse {
10450    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10451        write!(
10452            f,
10453            "{}",
10454            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10455        )
10456    }
10457}
10458
10459#[cfg(feature = "requests")]
10460impl crate::types::paginate::Pagination for ListCandidatesResponse {
10461    type Item = Candidate;
10462    fn has_more_pages(&self) -> bool {
10463        self.next_link.is_some()
10464    }
10465
10466    fn next_page_token(&self) -> Option<String> {
10467        self.next_link.clone()
10468    }
10469
10470    fn next_page(
10471        &self,
10472        req: reqwest::Request,
10473    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
10474        let mut req = req.try_clone().ok_or_else(|| {
10475            crate::types::error::Error::InvalidRequest(format!(
10476                "failed to clone request: {:?}",
10477                req
10478            ))
10479        })?;
10480        req.url_mut()
10481            .query_pairs_mut()
10482            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
10483        Ok(req)
10484    }
10485
10486    fn items(&self) -> Vec<Self::Item> {
10487        self.results.clone()
10488    }
10489}
10490
10491#[cfg(feature = "tabled")]
10492impl tabled::Tabled for ListCandidatesResponse {
10493    const LENGTH: usize = 3;
10494    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10495        vec![
10496            if let Some(meta) = &self.meta {
10497                format!("{:?}", meta).into()
10498            } else {
10499                String::new().into()
10500            },
10501            format!("{:?}", self.results).into(),
10502            if let Some(next_link) = &self.next_link {
10503                format!("{:?}", next_link).into()
10504            } else {
10505                String::new().into()
10506            },
10507        ]
10508    }
10509
10510    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10511        vec!["meta".into(), "results".into(), "next_link".into()]
10512    }
10513}
10514
10515#[derive(
10516    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10517)]
10518pub struct ListCandidateApplicationsResponse {
10519    #[doc = "A list of redacted fields."]
10520    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
10521    pub meta: Option<RedactedFields>,
10522    pub results: Vec<Application>,
10523    #[doc = "A link to the next page of responses."]
10524    #[serde(default, skip_serializing_if = "Option::is_none")]
10525    pub next_link: Option<String>,
10526}
10527
10528impl std::fmt::Display for ListCandidateApplicationsResponse {
10529    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10530        write!(
10531            f,
10532            "{}",
10533            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10534        )
10535    }
10536}
10537
10538#[cfg(feature = "requests")]
10539impl crate::types::paginate::Pagination for ListCandidateApplicationsResponse {
10540    type Item = Application;
10541    fn has_more_pages(&self) -> bool {
10542        self.next_link.is_some()
10543    }
10544
10545    fn next_page_token(&self) -> Option<String> {
10546        self.next_link.clone()
10547    }
10548
10549    fn next_page(
10550        &self,
10551        req: reqwest::Request,
10552    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
10553        let mut req = req.try_clone().ok_or_else(|| {
10554            crate::types::error::Error::InvalidRequest(format!(
10555                "failed to clone request: {:?}",
10556                req
10557            ))
10558        })?;
10559        req.url_mut()
10560            .query_pairs_mut()
10561            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
10562        Ok(req)
10563    }
10564
10565    fn items(&self) -> Vec<Self::Item> {
10566        self.results.clone()
10567    }
10568}
10569
10570#[cfg(feature = "tabled")]
10571impl tabled::Tabled for ListCandidateApplicationsResponse {
10572    const LENGTH: usize = 3;
10573    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10574        vec![
10575            if let Some(meta) = &self.meta {
10576                format!("{:?}", meta).into()
10577            } else {
10578                String::new().into()
10579            },
10580            format!("{:?}", self.results).into(),
10581            if let Some(next_link) = &self.next_link {
10582                format!("{:?}", next_link).into()
10583            } else {
10584                String::new().into()
10585            },
10586        ]
10587    }
10588
10589    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10590        vec!["meta".into(), "results".into(), "next_link".into()]
10591    }
10592}
10593
10594#[derive(
10595    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10596)]
10597pub struct ListCompaniesResponse {
10598    #[doc = "A list of redacted fields."]
10599    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
10600    pub meta: Option<RedactedFields>,
10601    pub results: Vec<Company>,
10602    #[doc = "A link to the next page of responses."]
10603    #[serde(default, skip_serializing_if = "Option::is_none")]
10604    pub next_link: Option<String>,
10605}
10606
10607impl std::fmt::Display for ListCompaniesResponse {
10608    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10609        write!(
10610            f,
10611            "{}",
10612            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10613        )
10614    }
10615}
10616
10617#[cfg(feature = "requests")]
10618impl crate::types::paginate::Pagination for ListCompaniesResponse {
10619    type Item = Company;
10620    fn has_more_pages(&self) -> bool {
10621        self.next_link.is_some()
10622    }
10623
10624    fn next_page_token(&self) -> Option<String> {
10625        self.next_link.clone()
10626    }
10627
10628    fn next_page(
10629        &self,
10630        req: reqwest::Request,
10631    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
10632        let mut req = req.try_clone().ok_or_else(|| {
10633            crate::types::error::Error::InvalidRequest(format!(
10634                "failed to clone request: {:?}",
10635                req
10636            ))
10637        })?;
10638        req.url_mut()
10639            .query_pairs_mut()
10640            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
10641        Ok(req)
10642    }
10643
10644    fn items(&self) -> Vec<Self::Item> {
10645        self.results.clone()
10646    }
10647}
10648
10649#[cfg(feature = "tabled")]
10650impl tabled::Tabled for ListCompaniesResponse {
10651    const LENGTH: usize = 3;
10652    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10653        vec![
10654            if let Some(meta) = &self.meta {
10655                format!("{:?}", meta).into()
10656            } else {
10657                String::new().into()
10658            },
10659            format!("{:?}", self.results).into(),
10660            if let Some(next_link) = &self.next_link {
10661                format!("{:?}", next_link).into()
10662            } else {
10663                String::new().into()
10664            },
10665        ]
10666    }
10667
10668    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10669        vec!["meta".into(), "results".into(), "next_link".into()]
10670    }
10671}
10672
10673#[derive(
10674    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10675)]
10676pub struct ListCompensationsResponse {
10677    #[doc = "A list of redacted fields."]
10678    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
10679    pub meta: Option<RedactedFields>,
10680    pub results: Vec<Compensation>,
10681    #[doc = "A link to the next page of responses."]
10682    #[serde(default, skip_serializing_if = "Option::is_none")]
10683    pub next_link: Option<String>,
10684}
10685
10686impl std::fmt::Display for ListCompensationsResponse {
10687    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10688        write!(
10689            f,
10690            "{}",
10691            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10692        )
10693    }
10694}
10695
10696#[cfg(feature = "requests")]
10697impl crate::types::paginate::Pagination for ListCompensationsResponse {
10698    type Item = Compensation;
10699    fn has_more_pages(&self) -> bool {
10700        self.next_link.is_some()
10701    }
10702
10703    fn next_page_token(&self) -> Option<String> {
10704        self.next_link.clone()
10705    }
10706
10707    fn next_page(
10708        &self,
10709        req: reqwest::Request,
10710    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
10711        let mut req = req.try_clone().ok_or_else(|| {
10712            crate::types::error::Error::InvalidRequest(format!(
10713                "failed to clone request: {:?}",
10714                req
10715            ))
10716        })?;
10717        req.url_mut()
10718            .query_pairs_mut()
10719            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
10720        Ok(req)
10721    }
10722
10723    fn items(&self) -> Vec<Self::Item> {
10724        self.results.clone()
10725    }
10726}
10727
10728#[cfg(feature = "tabled")]
10729impl tabled::Tabled for ListCompensationsResponse {
10730    const LENGTH: usize = 3;
10731    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10732        vec![
10733            if let Some(meta) = &self.meta {
10734                format!("{:?}", meta).into()
10735            } else {
10736                String::new().into()
10737            },
10738            format!("{:?}", self.results).into(),
10739            if let Some(next_link) = &self.next_link {
10740                format!("{:?}", next_link).into()
10741            } else {
10742                String::new().into()
10743            },
10744        ]
10745    }
10746
10747    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10748        vec!["meta".into(), "results".into(), "next_link".into()]
10749    }
10750}
10751
10752#[derive(
10753    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10754)]
10755pub struct GetCompensationsResponse {
10756    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
10757    pub meta: Option<Meta>,
10758    #[doc = "Identifier field"]
10759    pub id: String,
10760    #[doc = "Record creation date"]
10761    pub created_at: String,
10762    #[doc = "Record update date"]
10763    pub updated_at: String,
10764    #[doc = "The worker's ID."]
10765    #[serde(default, skip_serializing_if = "Option::is_none")]
10766    pub worker_id: Option<String>,
10767    #[doc = "The worker's annual compensation. This calculation assumes 40-hour work weeks for \
10768             workers with an hourly wage."]
10769    #[serde(default, skip_serializing_if = "Option::is_none")]
10770    pub annual_compensation: Option<Currency>,
10771    #[doc = "The worker's annual salary equivalent, for insurance purposes. It will be equal to \
10772             the worker's annual compensation, except for owners that are receiving no \
10773             cashcompensation."]
10774    #[serde(default, skip_serializing_if = "Option::is_none")]
10775    pub annual_salary_equivalent: Option<Currency>,
10776    #[doc = "The worker's hourly wage. This calculation assumes 40-hour work weeks for workers \
10777             with fixed compensation."]
10778    #[serde(default, skip_serializing_if = "Option::is_none")]
10779    pub hourly_wage: Option<Currency>,
10780    #[doc = "The worker's monthly compensation. This calculation assumes 40-hour work weeks for \
10781             workers with an hourly wage."]
10782    #[serde(default, skip_serializing_if = "Option::is_none")]
10783    pub monthly_compensation: Option<Currency>,
10784    #[doc = "The worker's on-target commission."]
10785    #[serde(default, skip_serializing_if = "Option::is_none")]
10786    pub on_target_commission: Option<Currency>,
10787    #[doc = "The worker's hourly wage. This calculation assumes 40-hour work weeks for workers \
10788             with fixed compensation."]
10789    #[serde(default, skip_serializing_if = "Option::is_none")]
10790    pub relocation_reimbursement: Option<Currency>,
10791    #[doc = "The worker's signing bonus."]
10792    #[serde(default, skip_serializing_if = "Option::is_none")]
10793    pub signing_bonus: Option<Currency>,
10794    #[doc = "The worker's target annual bonus amount."]
10795    #[serde(default, skip_serializing_if = "Option::is_none")]
10796    pub target_annual_bonus: Option<Currency>,
10797    #[doc = "The worker's weekly compensation. This calculation assumes 40-hour work weeks for \
10798             workers with an hourly wage."]
10799    #[serde(default, skip_serializing_if = "Option::is_none")]
10800    pub weekly_compensation: Option<Currency>,
10801    #[doc = "The worker's target annual bonus as a percent of annual compensation."]
10802    #[serde(default, skip_serializing_if = "Option::is_none")]
10803    pub target_annual_bonus_percent: Option<f64>,
10804    #[doc = "The worker's bonus schedule."]
10805    #[serde(default, skip_serializing_if = "Option::is_none")]
10806    pub bonus_schedule: Option<String>,
10807    #[doc = "The payment type for an worker's compensation."]
10808    #[serde(default, skip_serializing_if = "Option::is_none")]
10809    pub payment_type: Option<String>,
10810    #[doc = "The payment terms for an worker's compensation."]
10811    #[serde(default, skip_serializing_if = "Option::is_none")]
10812    pub payment_terms: Option<String>,
10813}
10814
10815impl std::fmt::Display for GetCompensationsResponse {
10816    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10817        write!(
10818            f,
10819            "{}",
10820            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10821        )
10822    }
10823}
10824
10825#[cfg(feature = "tabled")]
10826impl tabled::Tabled for GetCompensationsResponse {
10827    const LENGTH: usize = 18;
10828    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10829        vec![
10830            if let Some(meta) = &self.meta {
10831                format!("{:?}", meta).into()
10832            } else {
10833                String::new().into()
10834            },
10835            self.id.clone().into(),
10836            self.created_at.clone().into(),
10837            self.updated_at.clone().into(),
10838            if let Some(worker_id) = &self.worker_id {
10839                format!("{:?}", worker_id).into()
10840            } else {
10841                String::new().into()
10842            },
10843            if let Some(annual_compensation) = &self.annual_compensation {
10844                format!("{:?}", annual_compensation).into()
10845            } else {
10846                String::new().into()
10847            },
10848            if let Some(annual_salary_equivalent) = &self.annual_salary_equivalent {
10849                format!("{:?}", annual_salary_equivalent).into()
10850            } else {
10851                String::new().into()
10852            },
10853            if let Some(hourly_wage) = &self.hourly_wage {
10854                format!("{:?}", hourly_wage).into()
10855            } else {
10856                String::new().into()
10857            },
10858            if let Some(monthly_compensation) = &self.monthly_compensation {
10859                format!("{:?}", monthly_compensation).into()
10860            } else {
10861                String::new().into()
10862            },
10863            if let Some(on_target_commission) = &self.on_target_commission {
10864                format!("{:?}", on_target_commission).into()
10865            } else {
10866                String::new().into()
10867            },
10868            if let Some(relocation_reimbursement) = &self.relocation_reimbursement {
10869                format!("{:?}", relocation_reimbursement).into()
10870            } else {
10871                String::new().into()
10872            },
10873            if let Some(signing_bonus) = &self.signing_bonus {
10874                format!("{:?}", signing_bonus).into()
10875            } else {
10876                String::new().into()
10877            },
10878            if let Some(target_annual_bonus) = &self.target_annual_bonus {
10879                format!("{:?}", target_annual_bonus).into()
10880            } else {
10881                String::new().into()
10882            },
10883            if let Some(weekly_compensation) = &self.weekly_compensation {
10884                format!("{:?}", weekly_compensation).into()
10885            } else {
10886                String::new().into()
10887            },
10888            if let Some(target_annual_bonus_percent) = &self.target_annual_bonus_percent {
10889                format!("{:?}", target_annual_bonus_percent).into()
10890            } else {
10891                String::new().into()
10892            },
10893            if let Some(bonus_schedule) = &self.bonus_schedule {
10894                format!("{:?}", bonus_schedule).into()
10895            } else {
10896                String::new().into()
10897            },
10898            if let Some(payment_type) = &self.payment_type {
10899                format!("{:?}", payment_type).into()
10900            } else {
10901                String::new().into()
10902            },
10903            if let Some(payment_terms) = &self.payment_terms {
10904                format!("{:?}", payment_terms).into()
10905            } else {
10906                String::new().into()
10907            },
10908        ]
10909    }
10910
10911    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
10912        vec![
10913            "meta".into(),
10914            "id".into(),
10915            "created_at".into(),
10916            "updated_at".into(),
10917            "worker_id".into(),
10918            "annual_compensation".into(),
10919            "annual_salary_equivalent".into(),
10920            "hourly_wage".into(),
10921            "monthly_compensation".into(),
10922            "on_target_commission".into(),
10923            "relocation_reimbursement".into(),
10924            "signing_bonus".into(),
10925            "target_annual_bonus".into(),
10926            "weekly_compensation".into(),
10927            "target_annual_bonus_percent".into(),
10928            "bonus_schedule".into(),
10929            "payment_type".into(),
10930            "payment_terms".into(),
10931        ]
10932    }
10933}
10934
10935#[derive(
10936    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
10937)]
10938pub struct ListCustomFieldsResponse {
10939    #[doc = "A list of redacted fields."]
10940    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
10941    pub meta: Option<RedactedFields>,
10942    pub results: Vec<CustomField>,
10943    #[doc = "A link to the next page of responses."]
10944    #[serde(default, skip_serializing_if = "Option::is_none")]
10945    pub next_link: Option<String>,
10946}
10947
10948impl std::fmt::Display for ListCustomFieldsResponse {
10949    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10950        write!(
10951            f,
10952            "{}",
10953            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
10954        )
10955    }
10956}
10957
10958#[cfg(feature = "requests")]
10959impl crate::types::paginate::Pagination for ListCustomFieldsResponse {
10960    type Item = CustomField;
10961    fn has_more_pages(&self) -> bool {
10962        self.next_link.is_some()
10963    }
10964
10965    fn next_page_token(&self) -> Option<String> {
10966        self.next_link.clone()
10967    }
10968
10969    fn next_page(
10970        &self,
10971        req: reqwest::Request,
10972    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
10973        let mut req = req.try_clone().ok_or_else(|| {
10974            crate::types::error::Error::InvalidRequest(format!(
10975                "failed to clone request: {:?}",
10976                req
10977            ))
10978        })?;
10979        req.url_mut()
10980            .query_pairs_mut()
10981            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
10982        Ok(req)
10983    }
10984
10985    fn items(&self) -> Vec<Self::Item> {
10986        self.results.clone()
10987    }
10988}
10989
10990#[cfg(feature = "tabled")]
10991impl tabled::Tabled for ListCustomFieldsResponse {
10992    const LENGTH: usize = 3;
10993    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
10994        vec![
10995            if let Some(meta) = &self.meta {
10996                format!("{:?}", meta).into()
10997            } else {
10998                String::new().into()
10999            },
11000            format!("{:?}", self.results).into(),
11001            if let Some(next_link) = &self.next_link {
11002                format!("{:?}", next_link).into()
11003            } else {
11004                String::new().into()
11005            },
11006        ]
11007    }
11008
11009    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11010        vec!["meta".into(), "results".into(), "next_link".into()]
11011    }
11012}
11013
11014#[derive(
11015    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11016)]
11017pub struct ListCustomObjectsResponse {
11018    pub results: Vec<CustomObject>,
11019    #[doc = "A link to the next page of responses."]
11020    #[serde(default, skip_serializing_if = "Option::is_none")]
11021    pub next_link: Option<String>,
11022}
11023
11024impl std::fmt::Display for ListCustomObjectsResponse {
11025    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11026        write!(
11027            f,
11028            "{}",
11029            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11030        )
11031    }
11032}
11033
11034#[cfg(feature = "requests")]
11035impl crate::types::paginate::Pagination for ListCustomObjectsResponse {
11036    type Item = CustomObject;
11037    fn has_more_pages(&self) -> bool {
11038        self.next_link.is_some()
11039    }
11040
11041    fn next_page_token(&self) -> Option<String> {
11042        self.next_link.clone()
11043    }
11044
11045    fn next_page(
11046        &self,
11047        req: reqwest::Request,
11048    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
11049        let mut req = req.try_clone().ok_or_else(|| {
11050            crate::types::error::Error::InvalidRequest(format!(
11051                "failed to clone request: {:?}",
11052                req
11053            ))
11054        })?;
11055        req.url_mut()
11056            .query_pairs_mut()
11057            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
11058        Ok(req)
11059    }
11060
11061    fn items(&self) -> Vec<Self::Item> {
11062        self.results.clone()
11063    }
11064}
11065
11066#[cfg(feature = "tabled")]
11067impl tabled::Tabled for ListCustomObjectsResponse {
11068    const LENGTH: usize = 2;
11069    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11070        vec![
11071            format!("{:?}", self.results).into(),
11072            if let Some(next_link) = &self.next_link {
11073                format!("{:?}", next_link).into()
11074            } else {
11075                String::new().into()
11076            },
11077        ]
11078    }
11079
11080    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11081        vec!["results".into(), "next_link".into()]
11082    }
11083}
11084
11085#[derive(
11086    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11087)]
11088pub struct CreateCustomObjectsRequestBody {
11089    #[serde(default, skip_serializing_if = "Option::is_none")]
11090    pub name: Option<String>,
11091    #[serde(default, skip_serializing_if = "Option::is_none")]
11092    pub description: Option<String>,
11093    #[serde(default, skip_serializing_if = "Option::is_none")]
11094    pub category: Option<String>,
11095}
11096
11097impl std::fmt::Display for CreateCustomObjectsRequestBody {
11098    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11099        write!(
11100            f,
11101            "{}",
11102            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11103        )
11104    }
11105}
11106
11107#[cfg(feature = "tabled")]
11108impl tabled::Tabled for CreateCustomObjectsRequestBody {
11109    const LENGTH: usize = 3;
11110    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11111        vec![
11112            if let Some(name) = &self.name {
11113                format!("{:?}", name).into()
11114            } else {
11115                String::new().into()
11116            },
11117            if let Some(description) = &self.description {
11118                format!("{:?}", description).into()
11119            } else {
11120                String::new().into()
11121            },
11122            if let Some(category) = &self.category {
11123                format!("{:?}", category).into()
11124            } else {
11125                String::new().into()
11126            },
11127        ]
11128    }
11129
11130    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11131        vec!["name".into(), "description".into(), "category".into()]
11132    }
11133}
11134
11135#[derive(
11136    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11137)]
11138pub struct UpdateCustomObjectsRequestBody {
11139    #[serde(default, skip_serializing_if = "Option::is_none")]
11140    pub name: Option<String>,
11141    #[serde(default, skip_serializing_if = "Option::is_none")]
11142    pub description: Option<String>,
11143    #[serde(default, skip_serializing_if = "Option::is_none")]
11144    pub category: Option<String>,
11145    #[serde(default, skip_serializing_if = "Option::is_none")]
11146    pub plural_label: Option<String>,
11147    #[serde(default, skip_serializing_if = "Option::is_none")]
11148    pub owner_role: Option<String>,
11149}
11150
11151impl std::fmt::Display for UpdateCustomObjectsRequestBody {
11152    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11153        write!(
11154            f,
11155            "{}",
11156            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11157        )
11158    }
11159}
11160
11161#[cfg(feature = "tabled")]
11162impl tabled::Tabled for UpdateCustomObjectsRequestBody {
11163    const LENGTH: usize = 5;
11164    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11165        vec![
11166            if let Some(name) = &self.name {
11167                format!("{:?}", name).into()
11168            } else {
11169                String::new().into()
11170            },
11171            if let Some(description) = &self.description {
11172                format!("{:?}", description).into()
11173            } else {
11174                String::new().into()
11175            },
11176            if let Some(category) = &self.category {
11177                format!("{:?}", category).into()
11178            } else {
11179                String::new().into()
11180            },
11181            if let Some(plural_label) = &self.plural_label {
11182                format!("{:?}", plural_label).into()
11183            } else {
11184                String::new().into()
11185            },
11186            if let Some(owner_role) = &self.owner_role {
11187                format!("{:?}", owner_role).into()
11188            } else {
11189                String::new().into()
11190            },
11191        ]
11192    }
11193
11194    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11195        vec![
11196            "name".into(),
11197            "description".into(),
11198            "category".into(),
11199            "plural_label".into(),
11200            "owner_role".into(),
11201        ]
11202    }
11203}
11204
11205#[derive(
11206    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11207)]
11208pub struct ListDepartmentsResponse {
11209    #[doc = "A list of redacted fields."]
11210    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11211    pub meta: Option<RedactedFields>,
11212    pub results: Vec<Department>,
11213    #[doc = "A link to the next page of responses."]
11214    #[serde(default, skip_serializing_if = "Option::is_none")]
11215    pub next_link: Option<String>,
11216}
11217
11218impl std::fmt::Display for ListDepartmentsResponse {
11219    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11220        write!(
11221            f,
11222            "{}",
11223            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11224        )
11225    }
11226}
11227
11228#[cfg(feature = "requests")]
11229impl crate::types::paginate::Pagination for ListDepartmentsResponse {
11230    type Item = Department;
11231    fn has_more_pages(&self) -> bool {
11232        self.next_link.is_some()
11233    }
11234
11235    fn next_page_token(&self) -> Option<String> {
11236        self.next_link.clone()
11237    }
11238
11239    fn next_page(
11240        &self,
11241        req: reqwest::Request,
11242    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
11243        let mut req = req.try_clone().ok_or_else(|| {
11244            crate::types::error::Error::InvalidRequest(format!(
11245                "failed to clone request: {:?}",
11246                req
11247            ))
11248        })?;
11249        req.url_mut()
11250            .query_pairs_mut()
11251            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
11252        Ok(req)
11253    }
11254
11255    fn items(&self) -> Vec<Self::Item> {
11256        self.results.clone()
11257    }
11258}
11259
11260#[cfg(feature = "tabled")]
11261impl tabled::Tabled for ListDepartmentsResponse {
11262    const LENGTH: usize = 3;
11263    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11264        vec![
11265            if let Some(meta) = &self.meta {
11266                format!("{:?}", meta).into()
11267            } else {
11268                String::new().into()
11269            },
11270            format!("{:?}", self.results).into(),
11271            if let Some(next_link) = &self.next_link {
11272                format!("{:?}", next_link).into()
11273            } else {
11274                String::new().into()
11275            },
11276        ]
11277    }
11278
11279    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11280        vec!["meta".into(), "results".into(), "next_link".into()]
11281    }
11282}
11283
11284#[derive(
11285    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11286)]
11287pub struct GetDepartmentsResponse {
11288    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11289    pub meta: Option<Meta>,
11290    #[doc = "Identifier field"]
11291    pub id: String,
11292    #[doc = "Record creation date"]
11293    pub created_at: String,
11294    #[doc = "Record update date"]
11295    pub updated_at: String,
11296    #[doc = "The name of the department."]
11297    pub name: String,
11298    #[doc = "The parent department."]
11299    #[serde(default, skip_serializing_if = "Option::is_none")]
11300    pub parent_id: Option<String>,
11301    #[doc = "The parent department.\n\nExpandable field"]
11302    #[serde(default, skip_serializing_if = "Option::is_none")]
11303    pub parent: Option<Department>,
11304    #[doc = "Reference code of the department."]
11305    #[serde(default, skip_serializing_if = "Option::is_none")]
11306    pub reference_code: Option<String>,
11307}
11308
11309impl std::fmt::Display for GetDepartmentsResponse {
11310    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11311        write!(
11312            f,
11313            "{}",
11314            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11315        )
11316    }
11317}
11318
11319#[cfg(feature = "tabled")]
11320impl tabled::Tabled for GetDepartmentsResponse {
11321    const LENGTH: usize = 8;
11322    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11323        vec![
11324            if let Some(meta) = &self.meta {
11325                format!("{:?}", meta).into()
11326            } else {
11327                String::new().into()
11328            },
11329            self.id.clone().into(),
11330            self.created_at.clone().into(),
11331            self.updated_at.clone().into(),
11332            self.name.clone().into(),
11333            if let Some(parent_id) = &self.parent_id {
11334                format!("{:?}", parent_id).into()
11335            } else {
11336                String::new().into()
11337            },
11338            if let Some(parent) = &self.parent {
11339                format!("{:?}", parent).into()
11340            } else {
11341                String::new().into()
11342            },
11343            if let Some(reference_code) = &self.reference_code {
11344                format!("{:?}", reference_code).into()
11345            } else {
11346                String::new().into()
11347            },
11348        ]
11349    }
11350
11351    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11352        vec![
11353            "meta".into(),
11354            "id".into(),
11355            "created_at".into(),
11356            "updated_at".into(),
11357            "name".into(),
11358            "parent_id".into(),
11359            "parent".into(),
11360            "reference_code".into(),
11361        ]
11362    }
11363}
11364
11365#[derive(
11366    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11367)]
11368pub struct ListEmploymentTypesResponse {
11369    #[doc = "A list of redacted fields."]
11370    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11371    pub meta: Option<RedactedFields>,
11372    pub results: Vec<CompanyEmploymentType>,
11373    #[doc = "A link to the next page of responses."]
11374    #[serde(default, skip_serializing_if = "Option::is_none")]
11375    pub next_link: Option<String>,
11376}
11377
11378impl std::fmt::Display for ListEmploymentTypesResponse {
11379    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11380        write!(
11381            f,
11382            "{}",
11383            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11384        )
11385    }
11386}
11387
11388#[cfg(feature = "requests")]
11389impl crate::types::paginate::Pagination for ListEmploymentTypesResponse {
11390    type Item = CompanyEmploymentType;
11391    fn has_more_pages(&self) -> bool {
11392        self.next_link.is_some()
11393    }
11394
11395    fn next_page_token(&self) -> Option<String> {
11396        self.next_link.clone()
11397    }
11398
11399    fn next_page(
11400        &self,
11401        req: reqwest::Request,
11402    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
11403        let mut req = req.try_clone().ok_or_else(|| {
11404            crate::types::error::Error::InvalidRequest(format!(
11405                "failed to clone request: {:?}",
11406                req
11407            ))
11408        })?;
11409        req.url_mut()
11410            .query_pairs_mut()
11411            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
11412        Ok(req)
11413    }
11414
11415    fn items(&self) -> Vec<Self::Item> {
11416        self.results.clone()
11417    }
11418}
11419
11420#[cfg(feature = "tabled")]
11421impl tabled::Tabled for ListEmploymentTypesResponse {
11422    const LENGTH: usize = 3;
11423    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11424        vec![
11425            if let Some(meta) = &self.meta {
11426                format!("{:?}", meta).into()
11427            } else {
11428                String::new().into()
11429            },
11430            format!("{:?}", self.results).into(),
11431            if let Some(next_link) = &self.next_link {
11432                format!("{:?}", next_link).into()
11433            } else {
11434                String::new().into()
11435            },
11436        ]
11437    }
11438
11439    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11440        vec!["meta".into(), "results".into(), "next_link".into()]
11441    }
11442}
11443
11444#[doc = "The classification of the worker by the company. * `CONTRACTOR`: Contractors are \
11445         self-employed workers who provide services on a short-term or per-project basis and are \
11446         not eligible for tax-withholding or benefits. * `EMPLOYEE`: Employees are hired and \
11447         managed by an employer, work under the employer's direct supervision and control, and are \
11448         protected by law for wages and employment rights."]
11449#[derive(
11450    serde :: Serialize,
11451    serde :: Deserialize,
11452    PartialEq,
11453    Hash,
11454    Debug,
11455    Clone,
11456    schemars :: JsonSchema,
11457    parse_display :: FromStr,
11458    parse_display :: Display,
11459)]
11460#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
11461#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
11462pub enum GetEmploymentTypesResponseType {
11463    #[serde(rename = "CONTRACTOR")]
11464    #[display("CONTRACTOR")]
11465    Contractor,
11466    #[serde(rename = "EMPLOYEE")]
11467    #[display("EMPLOYEE")]
11468    Employee,
11469}
11470
11471#[derive(
11472    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11473)]
11474pub struct GetEmploymentTypesResponse {
11475    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11476    pub meta: Option<Meta>,
11477    #[doc = "Identifier field"]
11478    pub id: String,
11479    #[doc = "Record creation date"]
11480    pub created_at: String,
11481    #[doc = "Record update date"]
11482    pub updated_at: String,
11483    #[doc = "The display label of the employment type."]
11484    pub label: String,
11485    #[doc = "The name of the employment type for non-custom employment types."]
11486    #[serde(default, skip_serializing_if = "Option::is_none")]
11487    pub name: Option<String>,
11488    #[doc = "The classification of the worker by the company. * `CONTRACTOR`: Contractors are \
11489             self-employed workers who provide services on a short-term or per-project basis and \
11490             are not eligible for tax-withholding or benefits. * `EMPLOYEE`: Employees are hired \
11491             and managed by an employer, work under the employer's direct supervision and \
11492             control, and are protected by law for wages and employment rights."]
11493    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
11494    pub type_: Option<GetEmploymentTypesResponseType>,
11495    #[doc = "The compensation period for the employment type. * `SALARIED`: Employees that are \
11496             paid a fixed amount per year. * `HOURLY`: Employees that are paid a wage per hour \
11497             worked."]
11498    #[serde(default, skip_serializing_if = "Option::is_none")]
11499    pub compensation_time_period: Option<CompensationTimePeriod>,
11500    #[doc = "The amount worked for the employment type. * `FULL-TIME`: Full-time is at least 30 \
11501             hours per week. Full-time workers will typically be eligible for benefits. * \
11502             `PART-TIME`: Part-time is less than 30 hours per week. These workers may be eligible \
11503             for benefits, depending on company settings and hours worked. * `TEMPORARY`: These \
11504             workers are hired on a temporary basis. You can specify how each worker with this \
11505             employment type will be paid individually."]
11506    #[serde(default, skip_serializing_if = "Option::is_none")]
11507    pub amount_worked: Option<AmountWorked>,
11508}
11509
11510impl std::fmt::Display for GetEmploymentTypesResponse {
11511    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11512        write!(
11513            f,
11514            "{}",
11515            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11516        )
11517    }
11518}
11519
11520#[cfg(feature = "tabled")]
11521impl tabled::Tabled for GetEmploymentTypesResponse {
11522    const LENGTH: usize = 9;
11523    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11524        vec![
11525            if let Some(meta) = &self.meta {
11526                format!("{:?}", meta).into()
11527            } else {
11528                String::new().into()
11529            },
11530            self.id.clone().into(),
11531            self.created_at.clone().into(),
11532            self.updated_at.clone().into(),
11533            self.label.clone().into(),
11534            if let Some(name) = &self.name {
11535                format!("{:?}", name).into()
11536            } else {
11537                String::new().into()
11538            },
11539            if let Some(type_) = &self.type_ {
11540                format!("{:?}", type_).into()
11541            } else {
11542                String::new().into()
11543            },
11544            if let Some(compensation_time_period) = &self.compensation_time_period {
11545                format!("{:?}", compensation_time_period).into()
11546            } else {
11547                String::new().into()
11548            },
11549            if let Some(amount_worked) = &self.amount_worked {
11550                format!("{:?}", amount_worked).into()
11551            } else {
11552                String::new().into()
11553            },
11554        ]
11555    }
11556
11557    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11558        vec![
11559            "meta".into(),
11560            "id".into(),
11561            "created_at".into(),
11562            "updated_at".into(),
11563            "label".into(),
11564            "name".into(),
11565            "type_".into(),
11566            "compensation_time_period".into(),
11567            "amount_worked".into(),
11568        ]
11569    }
11570}
11571
11572#[derive(
11573    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11574)]
11575pub struct ListEntitlementsResponse {
11576    #[doc = "A list of redacted fields."]
11577    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11578    pub meta: Option<RedactedFields>,
11579    pub results: Vec<EntitlementModel>,
11580    #[doc = "A link to the next page of responses."]
11581    #[serde(default, skip_serializing_if = "Option::is_none")]
11582    pub next_link: Option<String>,
11583}
11584
11585impl std::fmt::Display for ListEntitlementsResponse {
11586    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11587        write!(
11588            f,
11589            "{}",
11590            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11591        )
11592    }
11593}
11594
11595#[cfg(feature = "requests")]
11596impl crate::types::paginate::Pagination for ListEntitlementsResponse {
11597    type Item = EntitlementModel;
11598    fn has_more_pages(&self) -> bool {
11599        self.next_link.is_some()
11600    }
11601
11602    fn next_page_token(&self) -> Option<String> {
11603        self.next_link.clone()
11604    }
11605
11606    fn next_page(
11607        &self,
11608        req: reqwest::Request,
11609    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
11610        let mut req = req.try_clone().ok_or_else(|| {
11611            crate::types::error::Error::InvalidRequest(format!(
11612                "failed to clone request: {:?}",
11613                req
11614            ))
11615        })?;
11616        req.url_mut()
11617            .query_pairs_mut()
11618            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
11619        Ok(req)
11620    }
11621
11622    fn items(&self) -> Vec<Self::Item> {
11623        self.results.clone()
11624    }
11625}
11626
11627#[cfg(feature = "tabled")]
11628impl tabled::Tabled for ListEntitlementsResponse {
11629    const LENGTH: usize = 3;
11630    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11631        vec![
11632            if let Some(meta) = &self.meta {
11633                format!("{:?}", meta).into()
11634            } else {
11635                String::new().into()
11636            },
11637            format!("{:?}", self.results).into(),
11638            if let Some(next_link) = &self.next_link {
11639                format!("{:?}", next_link).into()
11640            } else {
11641                String::new().into()
11642            },
11643        ]
11644    }
11645
11646    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11647        vec!["meta".into(), "results".into(), "next_link".into()]
11648    }
11649}
11650
11651#[derive(
11652    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11653)]
11654pub struct ListJobCodesResponse {
11655    #[doc = "A list of redacted fields."]
11656    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11657    pub meta: Option<RedactedFields>,
11658    pub results: Vec<JobCode>,
11659    #[doc = "A link to the next page of responses."]
11660    #[serde(default, skip_serializing_if = "Option::is_none")]
11661    pub next_link: Option<String>,
11662}
11663
11664impl std::fmt::Display for ListJobCodesResponse {
11665    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11666        write!(
11667            f,
11668            "{}",
11669            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11670        )
11671    }
11672}
11673
11674#[cfg(feature = "requests")]
11675impl crate::types::paginate::Pagination for ListJobCodesResponse {
11676    type Item = JobCode;
11677    fn has_more_pages(&self) -> bool {
11678        self.next_link.is_some()
11679    }
11680
11681    fn next_page_token(&self) -> Option<String> {
11682        self.next_link.clone()
11683    }
11684
11685    fn next_page(
11686        &self,
11687        req: reqwest::Request,
11688    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
11689        let mut req = req.try_clone().ok_or_else(|| {
11690            crate::types::error::Error::InvalidRequest(format!(
11691                "failed to clone request: {:?}",
11692                req
11693            ))
11694        })?;
11695        req.url_mut()
11696            .query_pairs_mut()
11697            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
11698        Ok(req)
11699    }
11700
11701    fn items(&self) -> Vec<Self::Item> {
11702        self.results.clone()
11703    }
11704}
11705
11706#[cfg(feature = "tabled")]
11707impl tabled::Tabled for ListJobCodesResponse {
11708    const LENGTH: usize = 3;
11709    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11710        vec![
11711            if let Some(meta) = &self.meta {
11712                format!("{:?}", meta).into()
11713            } else {
11714                String::new().into()
11715            },
11716            format!("{:?}", self.results).into(),
11717            if let Some(next_link) = &self.next_link {
11718                format!("{:?}", next_link).into()
11719            } else {
11720                String::new().into()
11721            },
11722        ]
11723    }
11724
11725    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11726        vec!["meta".into(), "results".into(), "next_link".into()]
11727    }
11728}
11729
11730#[derive(
11731    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11732)]
11733pub struct GetJobCodesResponse {
11734    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11735    pub meta: Option<Meta>,
11736    #[doc = "Identifier field"]
11737    pub id: String,
11738    #[doc = "Record creation date"]
11739    pub created_at: String,
11740    #[doc = "Record update date"]
11741    pub updated_at: String,
11742    #[doc = "The name of the job dimension."]
11743    pub name: String,
11744    #[doc = "The ID of the job dimension this job code belongs to."]
11745    pub job_dimension_id: String,
11746    #[doc = "The job dimension this job code belongs to.\n\nExpandable field"]
11747    #[serde(default, skip_serializing_if = "Option::is_none")]
11748    pub job_dimension: Option<JobDimension>,
11749    #[doc = "The unique identifier of the job code in an outside system."]
11750    #[serde(default, skip_serializing_if = "Option::is_none")]
11751    pub external_id: Option<String>,
11752    #[doc = "The ID of the job roster group."]
11753    #[serde(default, skip_serializing_if = "Option::is_none")]
11754    pub group_id: Option<String>,
11755}
11756
11757impl std::fmt::Display for GetJobCodesResponse {
11758    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11759        write!(
11760            f,
11761            "{}",
11762            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11763        )
11764    }
11765}
11766
11767#[cfg(feature = "tabled")]
11768impl tabled::Tabled for GetJobCodesResponse {
11769    const LENGTH: usize = 9;
11770    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11771        vec![
11772            if let Some(meta) = &self.meta {
11773                format!("{:?}", meta).into()
11774            } else {
11775                String::new().into()
11776            },
11777            self.id.clone().into(),
11778            self.created_at.clone().into(),
11779            self.updated_at.clone().into(),
11780            self.name.clone().into(),
11781            self.job_dimension_id.clone().into(),
11782            if let Some(job_dimension) = &self.job_dimension {
11783                format!("{:?}", job_dimension).into()
11784            } else {
11785                String::new().into()
11786            },
11787            if let Some(external_id) = &self.external_id {
11788                format!("{:?}", external_id).into()
11789            } else {
11790                String::new().into()
11791            },
11792            if let Some(group_id) = &self.group_id {
11793                format!("{:?}", group_id).into()
11794            } else {
11795                String::new().into()
11796            },
11797        ]
11798    }
11799
11800    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11801        vec![
11802            "meta".into(),
11803            "id".into(),
11804            "created_at".into(),
11805            "updated_at".into(),
11806            "name".into(),
11807            "job_dimension_id".into(),
11808            "job_dimension".into(),
11809            "external_id".into(),
11810            "group_id".into(),
11811        ]
11812    }
11813}
11814
11815#[derive(
11816    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11817)]
11818pub struct ListJobDimensionsResponse {
11819    #[doc = "A list of redacted fields."]
11820    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11821    pub meta: Option<RedactedFields>,
11822    pub results: Vec<JobDimension>,
11823    #[doc = "A link to the next page of responses."]
11824    #[serde(default, skip_serializing_if = "Option::is_none")]
11825    pub next_link: Option<String>,
11826}
11827
11828impl std::fmt::Display for ListJobDimensionsResponse {
11829    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11830        write!(
11831            f,
11832            "{}",
11833            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11834        )
11835    }
11836}
11837
11838#[cfg(feature = "requests")]
11839impl crate::types::paginate::Pagination for ListJobDimensionsResponse {
11840    type Item = JobDimension;
11841    fn has_more_pages(&self) -> bool {
11842        self.next_link.is_some()
11843    }
11844
11845    fn next_page_token(&self) -> Option<String> {
11846        self.next_link.clone()
11847    }
11848
11849    fn next_page(
11850        &self,
11851        req: reqwest::Request,
11852    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
11853        let mut req = req.try_clone().ok_or_else(|| {
11854            crate::types::error::Error::InvalidRequest(format!(
11855                "failed to clone request: {:?}",
11856                req
11857            ))
11858        })?;
11859        req.url_mut()
11860            .query_pairs_mut()
11861            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
11862        Ok(req)
11863    }
11864
11865    fn items(&self) -> Vec<Self::Item> {
11866        self.results.clone()
11867    }
11868}
11869
11870#[cfg(feature = "tabled")]
11871impl tabled::Tabled for ListJobDimensionsResponse {
11872    const LENGTH: usize = 3;
11873    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11874        vec![
11875            if let Some(meta) = &self.meta {
11876                format!("{:?}", meta).into()
11877            } else {
11878                String::new().into()
11879            },
11880            format!("{:?}", self.results).into(),
11881            if let Some(next_link) = &self.next_link {
11882                format!("{:?}", next_link).into()
11883            } else {
11884                String::new().into()
11885            },
11886        ]
11887    }
11888
11889    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11890        vec!["meta".into(), "results".into(), "next_link".into()]
11891    }
11892}
11893
11894#[derive(
11895    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11896)]
11897pub struct GetJobDimensionsResponse {
11898    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11899    pub meta: Option<Meta>,
11900    #[doc = "Identifier field"]
11901    pub id: String,
11902    #[doc = "Record creation date"]
11903    pub created_at: String,
11904    #[doc = "Record update date"]
11905    pub updated_at: String,
11906    #[doc = "The name of the job dimension"]
11907    pub name: String,
11908    #[doc = "The unique identifier of the job dimension in a third party system"]
11909    #[serde(default, skip_serializing_if = "Option::is_none")]
11910    pub external_id: Option<String>,
11911}
11912
11913impl std::fmt::Display for GetJobDimensionsResponse {
11914    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11915        write!(
11916            f,
11917            "{}",
11918            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11919        )
11920    }
11921}
11922
11923#[cfg(feature = "tabled")]
11924impl tabled::Tabled for GetJobDimensionsResponse {
11925    const LENGTH: usize = 6;
11926    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
11927        vec![
11928            if let Some(meta) = &self.meta {
11929                format!("{:?}", meta).into()
11930            } else {
11931                String::new().into()
11932            },
11933            self.id.clone().into(),
11934            self.created_at.clone().into(),
11935            self.updated_at.clone().into(),
11936            self.name.clone().into(),
11937            if let Some(external_id) = &self.external_id {
11938                format!("{:?}", external_id).into()
11939            } else {
11940                String::new().into()
11941            },
11942        ]
11943    }
11944
11945    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
11946        vec![
11947            "meta".into(),
11948            "id".into(),
11949            "created_at".into(),
11950            "updated_at".into(),
11951            "name".into(),
11952            "external_id".into(),
11953        ]
11954    }
11955}
11956
11957#[derive(
11958    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
11959)]
11960pub struct ListJobRequisitionsResponse {
11961    #[doc = "A list of redacted fields."]
11962    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
11963    pub meta: Option<RedactedFields>,
11964    pub results: Vec<JobRequisition>,
11965    #[doc = "A link to the next page of responses."]
11966    #[serde(default, skip_serializing_if = "Option::is_none")]
11967    pub next_link: Option<String>,
11968}
11969
11970impl std::fmt::Display for ListJobRequisitionsResponse {
11971    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
11972        write!(
11973            f,
11974            "{}",
11975            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
11976        )
11977    }
11978}
11979
11980#[cfg(feature = "requests")]
11981impl crate::types::paginate::Pagination for ListJobRequisitionsResponse {
11982    type Item = JobRequisition;
11983    fn has_more_pages(&self) -> bool {
11984        self.next_link.is_some()
11985    }
11986
11987    fn next_page_token(&self) -> Option<String> {
11988        self.next_link.clone()
11989    }
11990
11991    fn next_page(
11992        &self,
11993        req: reqwest::Request,
11994    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
11995        let mut req = req.try_clone().ok_or_else(|| {
11996            crate::types::error::Error::InvalidRequest(format!(
11997                "failed to clone request: {:?}",
11998                req
11999            ))
12000        })?;
12001        req.url_mut()
12002            .query_pairs_mut()
12003            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
12004        Ok(req)
12005    }
12006
12007    fn items(&self) -> Vec<Self::Item> {
12008        self.results.clone()
12009    }
12010}
12011
12012#[cfg(feature = "tabled")]
12013impl tabled::Tabled for ListJobRequisitionsResponse {
12014    const LENGTH: usize = 3;
12015    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12016        vec![
12017            if let Some(meta) = &self.meta {
12018                format!("{:?}", meta).into()
12019            } else {
12020                String::new().into()
12021            },
12022            format!("{:?}", self.results).into(),
12023            if let Some(next_link) = &self.next_link {
12024                format!("{:?}", next_link).into()
12025            } else {
12026                String::new().into()
12027            },
12028        ]
12029    }
12030
12031    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12032        vec!["meta".into(), "results".into(), "next_link".into()]
12033    }
12034}
12035
12036#[derive(
12037    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12038)]
12039pub struct ListLeaveBalancesResponse {
12040    #[doc = "A list of redacted fields."]
12041    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12042    pub meta: Option<RedactedFields>,
12043    pub results: Vec<LeaveBalance>,
12044    #[doc = "A link to the next page of responses."]
12045    #[serde(default, skip_serializing_if = "Option::is_none")]
12046    pub next_link: Option<String>,
12047}
12048
12049impl std::fmt::Display for ListLeaveBalancesResponse {
12050    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12051        write!(
12052            f,
12053            "{}",
12054            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12055        )
12056    }
12057}
12058
12059#[cfg(feature = "requests")]
12060impl crate::types::paginate::Pagination for ListLeaveBalancesResponse {
12061    type Item = LeaveBalance;
12062    fn has_more_pages(&self) -> bool {
12063        self.next_link.is_some()
12064    }
12065
12066    fn next_page_token(&self) -> Option<String> {
12067        self.next_link.clone()
12068    }
12069
12070    fn next_page(
12071        &self,
12072        req: reqwest::Request,
12073    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
12074        let mut req = req.try_clone().ok_or_else(|| {
12075            crate::types::error::Error::InvalidRequest(format!(
12076                "failed to clone request: {:?}",
12077                req
12078            ))
12079        })?;
12080        req.url_mut()
12081            .query_pairs_mut()
12082            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
12083        Ok(req)
12084    }
12085
12086    fn items(&self) -> Vec<Self::Item> {
12087        self.results.clone()
12088    }
12089}
12090
12091#[cfg(feature = "tabled")]
12092impl tabled::Tabled for ListLeaveBalancesResponse {
12093    const LENGTH: usize = 3;
12094    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12095        vec![
12096            if let Some(meta) = &self.meta {
12097                format!("{:?}", meta).into()
12098            } else {
12099                String::new().into()
12100            },
12101            format!("{:?}", self.results).into(),
12102            if let Some(next_link) = &self.next_link {
12103                format!("{:?}", next_link).into()
12104            } else {
12105                String::new().into()
12106            },
12107        ]
12108    }
12109
12110    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12111        vec!["meta".into(), "results".into(), "next_link".into()]
12112    }
12113}
12114
12115#[derive(
12116    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12117)]
12118pub struct GetLeaveBalancesResponse {
12119    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12120    pub meta: Option<Meta>,
12121    #[doc = "Identifier field"]
12122    pub id: String,
12123    #[doc = "Record creation date"]
12124    pub created_at: String,
12125    #[doc = "Record update date"]
12126    pub updated_at: String,
12127    #[doc = "The ID of the worker associated with the leave balance."]
12128    pub worker_id: String,
12129    #[doc = "The worker associated with the leave balance.\n\nExpandable field"]
12130    #[serde(default, skip_serializing_if = "Option::is_none")]
12131    pub worker: Option<Worker>,
12132    #[doc = "The ID of the leave type associated with the leave balance."]
12133    #[serde(default, skip_serializing_if = "Option::is_none")]
12134    pub leave_type_id: Option<String>,
12135    #[doc = "The leave type associated with the leave balance.\n\nExpandable field"]
12136    #[serde(default, skip_serializing_if = "Option::is_none")]
12137    pub leave_type: Option<LeaveType>,
12138    #[doc = "Indicates if the leave balance is unlimited."]
12139    #[serde(default, skip_serializing_if = "Option::is_none")]
12140    pub is_balance_unlimited: Option<bool>,
12141    #[doc = "The worker's leave balance including future leave requests. If the leave balance is \
12142             unlimited, this field will be null."]
12143    #[serde(default, skip_serializing_if = "Option::is_none")]
12144    pub balance_including_future_requests: Option<f64>,
12145    #[doc = "The worker's leave balance excluding future leave requests. If the leave balance is \
12146             unlimited, this field will be null."]
12147    #[serde(default, skip_serializing_if = "Option::is_none")]
12148    pub balance_excluding_future_requests: Option<f64>,
12149}
12150
12151impl std::fmt::Display for GetLeaveBalancesResponse {
12152    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12153        write!(
12154            f,
12155            "{}",
12156            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12157        )
12158    }
12159}
12160
12161#[cfg(feature = "tabled")]
12162impl tabled::Tabled for GetLeaveBalancesResponse {
12163    const LENGTH: usize = 11;
12164    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12165        vec![
12166            if let Some(meta) = &self.meta {
12167                format!("{:?}", meta).into()
12168            } else {
12169                String::new().into()
12170            },
12171            self.id.clone().into(),
12172            self.created_at.clone().into(),
12173            self.updated_at.clone().into(),
12174            self.worker_id.clone().into(),
12175            if let Some(worker) = &self.worker {
12176                format!("{:?}", worker).into()
12177            } else {
12178                String::new().into()
12179            },
12180            if let Some(leave_type_id) = &self.leave_type_id {
12181                format!("{:?}", leave_type_id).into()
12182            } else {
12183                String::new().into()
12184            },
12185            if let Some(leave_type) = &self.leave_type {
12186                format!("{:?}", leave_type).into()
12187            } else {
12188                String::new().into()
12189            },
12190            if let Some(is_balance_unlimited) = &self.is_balance_unlimited {
12191                format!("{:?}", is_balance_unlimited).into()
12192            } else {
12193                String::new().into()
12194            },
12195            if let Some(balance_including_future_requests) = &self.balance_including_future_requests
12196            {
12197                format!("{:?}", balance_including_future_requests).into()
12198            } else {
12199                String::new().into()
12200            },
12201            if let Some(balance_excluding_future_requests) = &self.balance_excluding_future_requests
12202            {
12203                format!("{:?}", balance_excluding_future_requests).into()
12204            } else {
12205                String::new().into()
12206            },
12207        ]
12208    }
12209
12210    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12211        vec![
12212            "meta".into(),
12213            "id".into(),
12214            "created_at".into(),
12215            "updated_at".into(),
12216            "worker_id".into(),
12217            "worker".into(),
12218            "leave_type_id".into(),
12219            "leave_type".into(),
12220            "is_balance_unlimited".into(),
12221            "balance_including_future_requests".into(),
12222            "balance_excluding_future_requests".into(),
12223        ]
12224    }
12225}
12226
12227#[derive(
12228    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12229)]
12230pub struct ListLeaveRequestsResponse {
12231    #[doc = "A list of redacted fields."]
12232    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12233    pub meta: Option<RedactedFields>,
12234    pub results: Vec<LeaveRequest>,
12235    #[doc = "A link to the next page of responses."]
12236    #[serde(default, skip_serializing_if = "Option::is_none")]
12237    pub next_link: Option<String>,
12238}
12239
12240impl std::fmt::Display for ListLeaveRequestsResponse {
12241    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12242        write!(
12243            f,
12244            "{}",
12245            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12246        )
12247    }
12248}
12249
12250#[cfg(feature = "requests")]
12251impl crate::types::paginate::Pagination for ListLeaveRequestsResponse {
12252    type Item = LeaveRequest;
12253    fn has_more_pages(&self) -> bool {
12254        self.next_link.is_some()
12255    }
12256
12257    fn next_page_token(&self) -> Option<String> {
12258        self.next_link.clone()
12259    }
12260
12261    fn next_page(
12262        &self,
12263        req: reqwest::Request,
12264    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
12265        let mut req = req.try_clone().ok_or_else(|| {
12266            crate::types::error::Error::InvalidRequest(format!(
12267                "failed to clone request: {:?}",
12268                req
12269            ))
12270        })?;
12271        req.url_mut()
12272            .query_pairs_mut()
12273            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
12274        Ok(req)
12275    }
12276
12277    fn items(&self) -> Vec<Self::Item> {
12278        self.results.clone()
12279    }
12280}
12281
12282#[cfg(feature = "tabled")]
12283impl tabled::Tabled for ListLeaveRequestsResponse {
12284    const LENGTH: usize = 3;
12285    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12286        vec![
12287            if let Some(meta) = &self.meta {
12288                format!("{:?}", meta).into()
12289            } else {
12290                String::new().into()
12291            },
12292            format!("{:?}", self.results).into(),
12293            if let Some(next_link) = &self.next_link {
12294                format!("{:?}", next_link).into()
12295            } else {
12296                String::new().into()
12297            },
12298        ]
12299    }
12300
12301    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12302        vec!["meta".into(), "results".into(), "next_link".into()]
12303    }
12304}
12305
12306#[doc = "The status of the leave request."]
12307#[derive(
12308    serde :: Serialize,
12309    serde :: Deserialize,
12310    PartialEq,
12311    Hash,
12312    Debug,
12313    Clone,
12314    schemars :: JsonSchema,
12315    parse_display :: FromStr,
12316    parse_display :: Display,
12317)]
12318#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
12319#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
12320pub enum GetLeaveRequestsResponseStatus {
12321    #[serde(rename = "PENDING")]
12322    #[display("PENDING")]
12323    Pending,
12324    #[serde(rename = "APPROVED")]
12325    #[display("APPROVED")]
12326    Approved,
12327    #[serde(rename = "REJECTED")]
12328    #[display("REJECTED")]
12329    Rejected,
12330    #[serde(rename = "CANCELED")]
12331    #[display("CANCELED")]
12332    Canceled,
12333}
12334
12335#[derive(
12336    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12337)]
12338pub struct GetLeaveRequestsResponse {
12339    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12340    pub meta: Option<Meta>,
12341    #[doc = "Identifier field"]
12342    pub id: String,
12343    #[doc = "Record creation date"]
12344    pub created_at: String,
12345    #[doc = "Record update date"]
12346    pub updated_at: String,
12347    #[doc = "The ID of the worker associated with the leave request."]
12348    pub worker_id: String,
12349    #[doc = "The worker associated with the leave request.\n\nExpandable field"]
12350    #[serde(default, skip_serializing_if = "Option::is_none")]
12351    pub worker: Option<Worker>,
12352    #[doc = "The ID of the worker who requested the leave request."]
12353    #[serde(default, skip_serializing_if = "Option::is_none")]
12354    pub requester_id: Option<String>,
12355    #[doc = "The worker who requested the leave request.\n\nExpandable field"]
12356    #[serde(default, skip_serializing_if = "Option::is_none")]
12357    pub requester: Option<Worker>,
12358    #[doc = "The status of the leave request."]
12359    pub status: GetLeaveRequestsResponseStatus,
12360    #[doc = "The start date of the leave request."]
12361    pub start_date: String,
12362    #[doc = "The start time of the leave request."]
12363    #[serde(default, skip_serializing_if = "Option::is_none")]
12364    pub start_time: Option<String>,
12365    #[doc = "The end date of the leave request."]
12366    pub end_date: String,
12367    #[doc = "The end time of the leave request."]
12368    #[serde(default, skip_serializing_if = "Option::is_none")]
12369    pub end_time: Option<String>,
12370    #[doc = "The comments associated with the leave request."]
12371    #[serde(default, skip_serializing_if = "Option::is_none")]
12372    pub comments: Option<String>,
12373    #[doc = "The number of minutes requested for the leave request."]
12374    #[serde(default, skip_serializing_if = "Option::is_none")]
12375    pub number_of_minutes_requested: Option<f64>,
12376    #[doc = "The ID of the leave policy associated with the leave request."]
12377    pub leave_policy_id: String,
12378    #[doc = "The ID of the leave type associated with the leave request."]
12379    #[serde(default, skip_serializing_if = "Option::is_none")]
12380    pub leave_type_id: Option<String>,
12381    #[doc = "The leave type associated with the leave request.\n\nExpandable field"]
12382    #[serde(default, skip_serializing_if = "Option::is_none")]
12383    pub leave_type: Option<LeaveType>,
12384    #[doc = "The reason for the leave request."]
12385    #[serde(default, skip_serializing_if = "Option::is_none")]
12386    pub reason_for_leave: Option<String>,
12387    #[doc = "The ID of the worker who reviewed the leave request."]
12388    #[serde(default, skip_serializing_if = "Option::is_none")]
12389    pub reviewer_id: Option<String>,
12390    #[doc = "The worker who reviewed the leave request.\n\nExpandable field"]
12391    #[serde(default, skip_serializing_if = "Option::is_none")]
12392    pub reviewer: Option<Worker>,
12393    #[doc = "The timestamp the leave request was reviewed."]
12394    #[serde(default, skip_serializing_if = "Option::is_none")]
12395    pub reviewed_at: Option<String>,
12396    #[doc = "The specific dates taken off and the amount of time taken off for each one."]
12397    #[serde(default, skip_serializing_if = "Option::is_none")]
12398    pub days_take_off: Option<Vec<DayOff>>,
12399    #[doc = "Whether the leave request is managed by an external system."]
12400    #[serde(default, skip_serializing_if = "Option::is_none")]
12401    pub is_managed_by_external_system: Option<bool>,
12402}
12403
12404impl std::fmt::Display for GetLeaveRequestsResponse {
12405    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12406        write!(
12407            f,
12408            "{}",
12409            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12410        )
12411    }
12412}
12413
12414#[cfg(feature = "tabled")]
12415impl tabled::Tabled for GetLeaveRequestsResponse {
12416    const LENGTH: usize = 24;
12417    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12418        vec![
12419            if let Some(meta) = &self.meta {
12420                format!("{:?}", meta).into()
12421            } else {
12422                String::new().into()
12423            },
12424            self.id.clone().into(),
12425            self.created_at.clone().into(),
12426            self.updated_at.clone().into(),
12427            self.worker_id.clone().into(),
12428            if let Some(worker) = &self.worker {
12429                format!("{:?}", worker).into()
12430            } else {
12431                String::new().into()
12432            },
12433            if let Some(requester_id) = &self.requester_id {
12434                format!("{:?}", requester_id).into()
12435            } else {
12436                String::new().into()
12437            },
12438            if let Some(requester) = &self.requester {
12439                format!("{:?}", requester).into()
12440            } else {
12441                String::new().into()
12442            },
12443            format!("{:?}", self.status).into(),
12444            self.start_date.clone().into(),
12445            if let Some(start_time) = &self.start_time {
12446                format!("{:?}", start_time).into()
12447            } else {
12448                String::new().into()
12449            },
12450            self.end_date.clone().into(),
12451            if let Some(end_time) = &self.end_time {
12452                format!("{:?}", end_time).into()
12453            } else {
12454                String::new().into()
12455            },
12456            if let Some(comments) = &self.comments {
12457                format!("{:?}", comments).into()
12458            } else {
12459                String::new().into()
12460            },
12461            if let Some(number_of_minutes_requested) = &self.number_of_minutes_requested {
12462                format!("{:?}", number_of_minutes_requested).into()
12463            } else {
12464                String::new().into()
12465            },
12466            self.leave_policy_id.clone().into(),
12467            if let Some(leave_type_id) = &self.leave_type_id {
12468                format!("{:?}", leave_type_id).into()
12469            } else {
12470                String::new().into()
12471            },
12472            if let Some(leave_type) = &self.leave_type {
12473                format!("{:?}", leave_type).into()
12474            } else {
12475                String::new().into()
12476            },
12477            if let Some(reason_for_leave) = &self.reason_for_leave {
12478                format!("{:?}", reason_for_leave).into()
12479            } else {
12480                String::new().into()
12481            },
12482            if let Some(reviewer_id) = &self.reviewer_id {
12483                format!("{:?}", reviewer_id).into()
12484            } else {
12485                String::new().into()
12486            },
12487            if let Some(reviewer) = &self.reviewer {
12488                format!("{:?}", reviewer).into()
12489            } else {
12490                String::new().into()
12491            },
12492            if let Some(reviewed_at) = &self.reviewed_at {
12493                format!("{:?}", reviewed_at).into()
12494            } else {
12495                String::new().into()
12496            },
12497            if let Some(days_take_off) = &self.days_take_off {
12498                format!("{:?}", days_take_off).into()
12499            } else {
12500                String::new().into()
12501            },
12502            if let Some(is_managed_by_external_system) = &self.is_managed_by_external_system {
12503                format!("{:?}", is_managed_by_external_system).into()
12504            } else {
12505                String::new().into()
12506            },
12507        ]
12508    }
12509
12510    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12511        vec![
12512            "meta".into(),
12513            "id".into(),
12514            "created_at".into(),
12515            "updated_at".into(),
12516            "worker_id".into(),
12517            "worker".into(),
12518            "requester_id".into(),
12519            "requester".into(),
12520            "status".into(),
12521            "start_date".into(),
12522            "start_time".into(),
12523            "end_date".into(),
12524            "end_time".into(),
12525            "comments".into(),
12526            "number_of_minutes_requested".into(),
12527            "leave_policy_id".into(),
12528            "leave_type_id".into(),
12529            "leave_type".into(),
12530            "reason_for_leave".into(),
12531            "reviewer_id".into(),
12532            "reviewer".into(),
12533            "reviewed_at".into(),
12534            "days_take_off".into(),
12535            "is_managed_by_external_system".into(),
12536        ]
12537    }
12538}
12539
12540#[derive(
12541    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12542)]
12543pub struct ListLeaveTypesResponse {
12544    #[doc = "A list of redacted fields."]
12545    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12546    pub meta: Option<RedactedFields>,
12547    pub results: Vec<LeaveType>,
12548    #[doc = "A link to the next page of responses."]
12549    #[serde(default, skip_serializing_if = "Option::is_none")]
12550    pub next_link: Option<String>,
12551}
12552
12553impl std::fmt::Display for ListLeaveTypesResponse {
12554    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12555        write!(
12556            f,
12557            "{}",
12558            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12559        )
12560    }
12561}
12562
12563#[cfg(feature = "requests")]
12564impl crate::types::paginate::Pagination for ListLeaveTypesResponse {
12565    type Item = LeaveType;
12566    fn has_more_pages(&self) -> bool {
12567        self.next_link.is_some()
12568    }
12569
12570    fn next_page_token(&self) -> Option<String> {
12571        self.next_link.clone()
12572    }
12573
12574    fn next_page(
12575        &self,
12576        req: reqwest::Request,
12577    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
12578        let mut req = req.try_clone().ok_or_else(|| {
12579            crate::types::error::Error::InvalidRequest(format!(
12580                "failed to clone request: {:?}",
12581                req
12582            ))
12583        })?;
12584        req.url_mut()
12585            .query_pairs_mut()
12586            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
12587        Ok(req)
12588    }
12589
12590    fn items(&self) -> Vec<Self::Item> {
12591        self.results.clone()
12592    }
12593}
12594
12595#[cfg(feature = "tabled")]
12596impl tabled::Tabled for ListLeaveTypesResponse {
12597    const LENGTH: usize = 3;
12598    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12599        vec![
12600            if let Some(meta) = &self.meta {
12601                format!("{:?}", meta).into()
12602            } else {
12603                String::new().into()
12604            },
12605            format!("{:?}", self.results).into(),
12606            if let Some(next_link) = &self.next_link {
12607                format!("{:?}", next_link).into()
12608            } else {
12609                String::new().into()
12610            },
12611        ]
12612    }
12613
12614    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12615        vec!["meta".into(), "results".into(), "next_link".into()]
12616    }
12617}
12618
12619#[derive(
12620    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12621)]
12622pub struct GetLeaveTypesResponse {
12623    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12624    pub meta: Option<Meta>,
12625    #[doc = "Identifier field"]
12626    pub id: String,
12627    #[doc = "Record creation date"]
12628    pub created_at: String,
12629    #[doc = "Record update date"]
12630    pub updated_at: String,
12631    #[doc = "The type of leave."]
12632    #[serde(rename = "type")]
12633    pub type_: String,
12634    #[doc = "The name of the leave type."]
12635    pub name: String,
12636    #[doc = "The description of the leave type."]
12637    #[serde(default, skip_serializing_if = "Option::is_none")]
12638    pub description: Option<String>,
12639    #[doc = "Whether the leave is paid."]
12640    pub is_paid: bool,
12641    #[doc = "Whether the leave is managed by an external system."]
12642    pub is_managed_by_external_system: bool,
12643}
12644
12645impl std::fmt::Display for GetLeaveTypesResponse {
12646    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12647        write!(
12648            f,
12649            "{}",
12650            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12651        )
12652    }
12653}
12654
12655#[cfg(feature = "tabled")]
12656impl tabled::Tabled for GetLeaveTypesResponse {
12657    const LENGTH: usize = 9;
12658    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12659        vec![
12660            if let Some(meta) = &self.meta {
12661                format!("{:?}", meta).into()
12662            } else {
12663                String::new().into()
12664            },
12665            self.id.clone().into(),
12666            self.created_at.clone().into(),
12667            self.updated_at.clone().into(),
12668            self.type_.clone().into(),
12669            self.name.clone().into(),
12670            if let Some(description) = &self.description {
12671                format!("{:?}", description).into()
12672            } else {
12673                String::new().into()
12674            },
12675            format!("{:?}", self.is_paid).into(),
12676            format!("{:?}", self.is_managed_by_external_system).into(),
12677        ]
12678    }
12679
12680    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12681        vec![
12682            "meta".into(),
12683            "id".into(),
12684            "created_at".into(),
12685            "updated_at".into(),
12686            "type_".into(),
12687            "name".into(),
12688            "description".into(),
12689            "is_paid".into(),
12690            "is_managed_by_external_system".into(),
12691        ]
12692    }
12693}
12694
12695#[derive(
12696    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12697)]
12698pub struct ListLegalEntitiesResponse {
12699    #[doc = "A list of redacted fields."]
12700    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12701    pub meta: Option<RedactedFields>,
12702    pub results: Vec<LegalEntity>,
12703    #[doc = "A link to the next page of responses."]
12704    #[serde(default, skip_serializing_if = "Option::is_none")]
12705    pub next_link: Option<String>,
12706}
12707
12708impl std::fmt::Display for ListLegalEntitiesResponse {
12709    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12710        write!(
12711            f,
12712            "{}",
12713            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12714        )
12715    }
12716}
12717
12718#[cfg(feature = "requests")]
12719impl crate::types::paginate::Pagination for ListLegalEntitiesResponse {
12720    type Item = LegalEntity;
12721    fn has_more_pages(&self) -> bool {
12722        self.next_link.is_some()
12723    }
12724
12725    fn next_page_token(&self) -> Option<String> {
12726        self.next_link.clone()
12727    }
12728
12729    fn next_page(
12730        &self,
12731        req: reqwest::Request,
12732    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
12733        let mut req = req.try_clone().ok_or_else(|| {
12734            crate::types::error::Error::InvalidRequest(format!(
12735                "failed to clone request: {:?}",
12736                req
12737            ))
12738        })?;
12739        req.url_mut()
12740            .query_pairs_mut()
12741            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
12742        Ok(req)
12743    }
12744
12745    fn items(&self) -> Vec<Self::Item> {
12746        self.results.clone()
12747    }
12748}
12749
12750#[cfg(feature = "tabled")]
12751impl tabled::Tabled for ListLegalEntitiesResponse {
12752    const LENGTH: usize = 3;
12753    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12754        vec![
12755            if let Some(meta) = &self.meta {
12756                format!("{:?}", meta).into()
12757            } else {
12758                String::new().into()
12759            },
12760            format!("{:?}", self.results).into(),
12761            if let Some(next_link) = &self.next_link {
12762                format!("{:?}", next_link).into()
12763            } else {
12764                String::new().into()
12765            },
12766        ]
12767    }
12768
12769    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12770        vec!["meta".into(), "results".into(), "next_link".into()]
12771    }
12772}
12773
12774#[derive(
12775    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12776)]
12777pub struct GetLegalEntitiesResponse {
12778    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12779    pub meta: Option<Meta>,
12780    #[doc = "Identifier field"]
12781    pub id: String,
12782    #[doc = "Record creation date"]
12783    pub created_at: String,
12784    #[doc = "Record update date"]
12785    pub updated_at: String,
12786    #[doc = "The tax identifier for the legal entity."]
12787    #[serde(default, skip_serializing_if = "Option::is_none")]
12788    pub tax_identifier: Option<String>,
12789    #[doc = "The country the legal entity is based in."]
12790    #[serde(default, skip_serializing_if = "Option::is_none")]
12791    pub country: Option<Country>,
12792    #[doc = "The legal name of the legal entity."]
12793    #[serde(default, skip_serializing_if = "Option::is_none")]
12794    pub legal_name: Option<String>,
12795    #[doc = "The legal entity's level in a hierarchy. * `PARENT`: The legal entity is considered \
12796             the ultimate holding entity. * `SUBSIDIARY`: The legal entity is considered a \
12797             subsidiary, fully or partially held by another. * `BRANCH`: The legal entity is \
12798             considered a branch, associated with a parent legal entity."]
12799    #[serde(default, skip_serializing_if = "Option::is_none")]
12800    pub entity_level: Option<EntityLevel>,
12801    #[doc = "The registration date of the entity."]
12802    #[serde(default, skip_serializing_if = "Option::is_none")]
12803    pub registration_date: Option<String>,
12804    #[doc = "The mailing address of the legal entity."]
12805    #[serde(default, skip_serializing_if = "Option::is_none")]
12806    pub mailing_address: Option<Address>,
12807    #[doc = "The physical address of the legal entity, if it differs from the mailing address."]
12808    #[serde(default, skip_serializing_if = "Option::is_none")]
12809    pub physical_address: Option<Address>,
12810    #[doc = "The parent legal entity."]
12811    #[serde(default, skip_serializing_if = "Option::is_none")]
12812    pub parent_id: Option<String>,
12813    #[doc = "The parent legal entity.\n\nExpandable field"]
12814    #[serde(default, skip_serializing_if = "Option::is_none")]
12815    pub parent: Option<LegalEntity>,
12816    #[doc = "The legal entity management type in the case of an employer of record (EOR) or \
12817             professional employment organization (PEO). * `PEO`: The legal entity is considered \
12818             a Professional Employment Organization (PEO). * `EOR`: The legal entity is \
12819             considered an Employer of Record (EOR)."]
12820    #[serde(default, skip_serializing_if = "Option::is_none")]
12821    pub management_type: Option<ManagementType>,
12822    #[doc = "The company or organization associated with the legal entity"]
12823    #[serde(default, skip_serializing_if = "Option::is_none")]
12824    pub company_id: Option<String>,
12825    #[doc = "The company or organization associated with the legal entity\n\nExpandable field"]
12826    #[serde(default, skip_serializing_if = "Option::is_none")]
12827    pub company: Option<Company>,
12828}
12829
12830impl std::fmt::Display for GetLegalEntitiesResponse {
12831    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12832        write!(
12833            f,
12834            "{}",
12835            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12836        )
12837    }
12838}
12839
12840#[cfg(feature = "tabled")]
12841impl tabled::Tabled for GetLegalEntitiesResponse {
12842    const LENGTH: usize = 16;
12843    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12844        vec![
12845            if let Some(meta) = &self.meta {
12846                format!("{:?}", meta).into()
12847            } else {
12848                String::new().into()
12849            },
12850            self.id.clone().into(),
12851            self.created_at.clone().into(),
12852            self.updated_at.clone().into(),
12853            if let Some(tax_identifier) = &self.tax_identifier {
12854                format!("{:?}", tax_identifier).into()
12855            } else {
12856                String::new().into()
12857            },
12858            if let Some(country) = &self.country {
12859                format!("{:?}", country).into()
12860            } else {
12861                String::new().into()
12862            },
12863            if let Some(legal_name) = &self.legal_name {
12864                format!("{:?}", legal_name).into()
12865            } else {
12866                String::new().into()
12867            },
12868            if let Some(entity_level) = &self.entity_level {
12869                format!("{:?}", entity_level).into()
12870            } else {
12871                String::new().into()
12872            },
12873            if let Some(registration_date) = &self.registration_date {
12874                format!("{:?}", registration_date).into()
12875            } else {
12876                String::new().into()
12877            },
12878            if let Some(mailing_address) = &self.mailing_address {
12879                format!("{:?}", mailing_address).into()
12880            } else {
12881                String::new().into()
12882            },
12883            if let Some(physical_address) = &self.physical_address {
12884                format!("{:?}", physical_address).into()
12885            } else {
12886                String::new().into()
12887            },
12888            if let Some(parent_id) = &self.parent_id {
12889                format!("{:?}", parent_id).into()
12890            } else {
12891                String::new().into()
12892            },
12893            if let Some(parent) = &self.parent {
12894                format!("{:?}", parent).into()
12895            } else {
12896                String::new().into()
12897            },
12898            if let Some(management_type) = &self.management_type {
12899                format!("{:?}", management_type).into()
12900            } else {
12901                String::new().into()
12902            },
12903            if let Some(company_id) = &self.company_id {
12904                format!("{:?}", company_id).into()
12905            } else {
12906                String::new().into()
12907            },
12908            if let Some(company) = &self.company {
12909                format!("{:?}", company).into()
12910            } else {
12911                String::new().into()
12912            },
12913        ]
12914    }
12915
12916    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
12917        vec![
12918            "meta".into(),
12919            "id".into(),
12920            "created_at".into(),
12921            "updated_at".into(),
12922            "tax_identifier".into(),
12923            "country".into(),
12924            "legal_name".into(),
12925            "entity_level".into(),
12926            "registration_date".into(),
12927            "mailing_address".into(),
12928            "physical_address".into(),
12929            "parent_id".into(),
12930            "parent".into(),
12931            "management_type".into(),
12932            "company_id".into(),
12933            "company".into(),
12934        ]
12935    }
12936}
12937
12938#[derive(
12939    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
12940)]
12941pub struct ListLevelsResponse {
12942    #[doc = "A list of redacted fields."]
12943    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
12944    pub meta: Option<RedactedFields>,
12945    pub results: Vec<Level>,
12946    #[doc = "A link to the next page of responses."]
12947    #[serde(default, skip_serializing_if = "Option::is_none")]
12948    pub next_link: Option<String>,
12949}
12950
12951impl std::fmt::Display for ListLevelsResponse {
12952    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12953        write!(
12954            f,
12955            "{}",
12956            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
12957        )
12958    }
12959}
12960
12961#[cfg(feature = "requests")]
12962impl crate::types::paginate::Pagination for ListLevelsResponse {
12963    type Item = Level;
12964    fn has_more_pages(&self) -> bool {
12965        self.next_link.is_some()
12966    }
12967
12968    fn next_page_token(&self) -> Option<String> {
12969        self.next_link.clone()
12970    }
12971
12972    fn next_page(
12973        &self,
12974        req: reqwest::Request,
12975    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
12976        let mut req = req.try_clone().ok_or_else(|| {
12977            crate::types::error::Error::InvalidRequest(format!(
12978                "failed to clone request: {:?}",
12979                req
12980            ))
12981        })?;
12982        req.url_mut()
12983            .query_pairs_mut()
12984            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
12985        Ok(req)
12986    }
12987
12988    fn items(&self) -> Vec<Self::Item> {
12989        self.results.clone()
12990    }
12991}
12992
12993#[cfg(feature = "tabled")]
12994impl tabled::Tabled for ListLevelsResponse {
12995    const LENGTH: usize = 3;
12996    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
12997        vec![
12998            if let Some(meta) = &self.meta {
12999                format!("{:?}", meta).into()
13000            } else {
13001                String::new().into()
13002            },
13003            format!("{:?}", self.results).into(),
13004            if let Some(next_link) = &self.next_link {
13005                format!("{:?}", next_link).into()
13006            } else {
13007                String::new().into()
13008            },
13009        ]
13010    }
13011
13012    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13013        vec!["meta".into(), "results".into(), "next_link".into()]
13014    }
13015}
13016
13017#[derive(
13018    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13019)]
13020pub struct GetLevelsResponse {
13021    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13022    pub meta: Option<Meta>,
13023    #[doc = "Identifier field"]
13024    pub id: String,
13025    #[doc = "Record creation date"]
13026    pub created_at: String,
13027    #[doc = "Record update date"]
13028    pub updated_at: String,
13029    #[doc = "The name of the level. Must be unique within the company or organization."]
13030    pub name: String,
13031    #[doc = "The parent level."]
13032    #[serde(default, skip_serializing_if = "Option::is_none")]
13033    pub parent_id: Option<String>,
13034    #[doc = "The parent level.\n\nExpandable field"]
13035    #[serde(default, skip_serializing_if = "Option::is_none")]
13036    pub parent: Option<Level>,
13037    #[doc = "Global level is used to track the seniority of levels. The higher up a level is \
13038             placed on the page, the more senior and higher-ranked the level. Global level is \
13039             used in workflows, policies, and reports that use the level attribute (e.g., you can \
13040             use Level Lookup to set up a workflow that notifies the nearest person in an \
13041             worker's management chain at or above the specified level)."]
13042    #[serde(default, skip_serializing_if = "Option::is_none")]
13043    pub global_level: Option<i64>,
13044    #[doc = "The description of the level."]
13045    #[serde(default, skip_serializing_if = "Option::is_none")]
13046    pub description: Option<String>,
13047    #[doc = "The rank of the level within its track."]
13048    #[serde(default, skip_serializing_if = "Option::is_none")]
13049    pub rank: Option<i64>,
13050    #[doc = "The track associated with the level, if it's not a global level."]
13051    #[serde(default, skip_serializing_if = "Option::is_none")]
13052    pub track_id: Option<String>,
13053    #[doc = "The track associated with the level, if it's not a global level.\n\nExpandable field"]
13054    #[serde(default, skip_serializing_if = "Option::is_none")]
13055    pub track: Option<Track>,
13056}
13057
13058impl std::fmt::Display for GetLevelsResponse {
13059    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13060        write!(
13061            f,
13062            "{}",
13063            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13064        )
13065    }
13066}
13067
13068#[cfg(feature = "tabled")]
13069impl tabled::Tabled for GetLevelsResponse {
13070    const LENGTH: usize = 12;
13071    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13072        vec![
13073            if let Some(meta) = &self.meta {
13074                format!("{:?}", meta).into()
13075            } else {
13076                String::new().into()
13077            },
13078            self.id.clone().into(),
13079            self.created_at.clone().into(),
13080            self.updated_at.clone().into(),
13081            self.name.clone().into(),
13082            if let Some(parent_id) = &self.parent_id {
13083                format!("{:?}", parent_id).into()
13084            } else {
13085                String::new().into()
13086            },
13087            if let Some(parent) = &self.parent {
13088                format!("{:?}", parent).into()
13089            } else {
13090                String::new().into()
13091            },
13092            if let Some(global_level) = &self.global_level {
13093                format!("{:?}", global_level).into()
13094            } else {
13095                String::new().into()
13096            },
13097            if let Some(description) = &self.description {
13098                format!("{:?}", description).into()
13099            } else {
13100                String::new().into()
13101            },
13102            if let Some(rank) = &self.rank {
13103                format!("{:?}", rank).into()
13104            } else {
13105                String::new().into()
13106            },
13107            if let Some(track_id) = &self.track_id {
13108                format!("{:?}", track_id).into()
13109            } else {
13110                String::new().into()
13111            },
13112            if let Some(track) = &self.track {
13113                format!("{:?}", track).into()
13114            } else {
13115                String::new().into()
13116            },
13117        ]
13118    }
13119
13120    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13121        vec![
13122            "meta".into(),
13123            "id".into(),
13124            "created_at".into(),
13125            "updated_at".into(),
13126            "name".into(),
13127            "parent_id".into(),
13128            "parent".into(),
13129            "global_level".into(),
13130            "description".into(),
13131            "rank".into(),
13132            "track_id".into(),
13133            "track".into(),
13134        ]
13135    }
13136}
13137
13138#[derive(
13139    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13140)]
13141pub struct ListObjectCategoriesResponse {
13142    pub results: Vec<ObjectCategory>,
13143    #[doc = "A link to the next page of responses."]
13144    #[serde(default, skip_serializing_if = "Option::is_none")]
13145    pub next_link: Option<String>,
13146}
13147
13148impl std::fmt::Display for ListObjectCategoriesResponse {
13149    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13150        write!(
13151            f,
13152            "{}",
13153            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13154        )
13155    }
13156}
13157
13158#[cfg(feature = "requests")]
13159impl crate::types::paginate::Pagination for ListObjectCategoriesResponse {
13160    type Item = ObjectCategory;
13161    fn has_more_pages(&self) -> bool {
13162        self.next_link.is_some()
13163    }
13164
13165    fn next_page_token(&self) -> Option<String> {
13166        self.next_link.clone()
13167    }
13168
13169    fn next_page(
13170        &self,
13171        req: reqwest::Request,
13172    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
13173        let mut req = req.try_clone().ok_or_else(|| {
13174            crate::types::error::Error::InvalidRequest(format!(
13175                "failed to clone request: {:?}",
13176                req
13177            ))
13178        })?;
13179        req.url_mut()
13180            .query_pairs_mut()
13181            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
13182        Ok(req)
13183    }
13184
13185    fn items(&self) -> Vec<Self::Item> {
13186        self.results.clone()
13187    }
13188}
13189
13190#[cfg(feature = "tabled")]
13191impl tabled::Tabled for ListObjectCategoriesResponse {
13192    const LENGTH: usize = 2;
13193    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13194        vec![
13195            format!("{:?}", self.results).into(),
13196            if let Some(next_link) = &self.next_link {
13197                format!("{:?}", next_link).into()
13198            } else {
13199                String::new().into()
13200            },
13201        ]
13202    }
13203
13204    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13205        vec!["results".into(), "next_link".into()]
13206    }
13207}
13208
13209#[derive(
13210    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13211)]
13212pub struct CreateObjectCategoriesRequestBody {
13213    #[serde(default, skip_serializing_if = "Option::is_none")]
13214    pub name: Option<String>,
13215    #[serde(default, skip_serializing_if = "Option::is_none")]
13216    pub description: Option<String>,
13217}
13218
13219impl std::fmt::Display for CreateObjectCategoriesRequestBody {
13220    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13221        write!(
13222            f,
13223            "{}",
13224            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13225        )
13226    }
13227}
13228
13229#[cfg(feature = "tabled")]
13230impl tabled::Tabled for CreateObjectCategoriesRequestBody {
13231    const LENGTH: usize = 2;
13232    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13233        vec![
13234            if let Some(name) = &self.name {
13235                format!("{:?}", name).into()
13236            } else {
13237                String::new().into()
13238            },
13239            if let Some(description) = &self.description {
13240                format!("{:?}", description).into()
13241            } else {
13242                String::new().into()
13243            },
13244        ]
13245    }
13246
13247    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13248        vec!["name".into(), "description".into()]
13249    }
13250}
13251
13252#[derive(
13253    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13254)]
13255pub struct UpdateObjectCategoriesRequestBody {
13256    #[serde(default, skip_serializing_if = "Option::is_none")]
13257    pub name: Option<String>,
13258    #[serde(default, skip_serializing_if = "Option::is_none")]
13259    pub description: Option<String>,
13260}
13261
13262impl std::fmt::Display for UpdateObjectCategoriesRequestBody {
13263    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13264        write!(
13265            f,
13266            "{}",
13267            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13268        )
13269    }
13270}
13271
13272#[cfg(feature = "tabled")]
13273impl tabled::Tabled for UpdateObjectCategoriesRequestBody {
13274    const LENGTH: usize = 2;
13275    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13276        vec![
13277            if let Some(name) = &self.name {
13278                format!("{:?}", name).into()
13279            } else {
13280                String::new().into()
13281            },
13282            if let Some(description) = &self.description {
13283                format!("{:?}", description).into()
13284            } else {
13285                String::new().into()
13286            },
13287        ]
13288    }
13289
13290    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13291        vec!["name".into(), "description".into()]
13292    }
13293}
13294
13295#[derive(
13296    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13297)]
13298pub struct ListShiftInputsResponse {
13299    #[doc = "A list of redacted fields."]
13300    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13301    pub meta: Option<RedactedFields>,
13302    pub results: Vec<ShiftInput>,
13303    #[doc = "A link to the next page of responses."]
13304    #[serde(default, skip_serializing_if = "Option::is_none")]
13305    pub next_link: Option<String>,
13306}
13307
13308impl std::fmt::Display for ListShiftInputsResponse {
13309    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13310        write!(
13311            f,
13312            "{}",
13313            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13314        )
13315    }
13316}
13317
13318#[cfg(feature = "requests")]
13319impl crate::types::paginate::Pagination for ListShiftInputsResponse {
13320    type Item = ShiftInput;
13321    fn has_more_pages(&self) -> bool {
13322        self.next_link.is_some()
13323    }
13324
13325    fn next_page_token(&self) -> Option<String> {
13326        self.next_link.clone()
13327    }
13328
13329    fn next_page(
13330        &self,
13331        req: reqwest::Request,
13332    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
13333        let mut req = req.try_clone().ok_or_else(|| {
13334            crate::types::error::Error::InvalidRequest(format!(
13335                "failed to clone request: {:?}",
13336                req
13337            ))
13338        })?;
13339        req.url_mut()
13340            .query_pairs_mut()
13341            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
13342        Ok(req)
13343    }
13344
13345    fn items(&self) -> Vec<Self::Item> {
13346        self.results.clone()
13347    }
13348}
13349
13350#[cfg(feature = "tabled")]
13351impl tabled::Tabled for ListShiftInputsResponse {
13352    const LENGTH: usize = 3;
13353    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13354        vec![
13355            if let Some(meta) = &self.meta {
13356                format!("{:?}", meta).into()
13357            } else {
13358                String::new().into()
13359            },
13360            format!("{:?}", self.results).into(),
13361            if let Some(next_link) = &self.next_link {
13362                format!("{:?}", next_link).into()
13363            } else {
13364                String::new().into()
13365            },
13366        ]
13367    }
13368
13369    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13370        vec!["meta".into(), "results".into(), "next_link".into()]
13371    }
13372}
13373
13374#[derive(
13375    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13376)]
13377pub struct GetShiftInputsResponse {
13378    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13379    pub meta: Option<Meta>,
13380    #[doc = "Identifier field"]
13381    pub id: String,
13382    #[doc = "Record creation date"]
13383    pub created_at: String,
13384    #[doc = "Record update date"]
13385    pub updated_at: String,
13386    #[doc = "The creator id associated with the shift input."]
13387    #[serde(default, skip_serializing_if = "Option::is_none")]
13388    pub creator_id: Option<String>,
13389    #[doc = "The creator associated with the shift input.\n\nExpandable field"]
13390    #[serde(default, skip_serializing_if = "Option::is_none")]
13391    pub creator: Option<Worker>,
13392    #[doc = "Name of the shift unit."]
13393    pub name: String,
13394    #[doc = "Prompt for the shift unit."]
13395    pub prompt: String,
13396    #[doc = "Type of shift unit."]
13397    #[serde(rename = "type")]
13398    pub type_: String,
13399    #[doc = "Two letter string designating country code which the shift input is associated."]
13400    pub country_code: String,
13401    #[doc = "The party that manages this shift input"]
13402    #[serde(default, skip_serializing_if = "Option::is_none")]
13403    pub managed_by: Option<String>,
13404}
13405
13406impl std::fmt::Display for GetShiftInputsResponse {
13407    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13408        write!(
13409            f,
13410            "{}",
13411            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13412        )
13413    }
13414}
13415
13416#[cfg(feature = "tabled")]
13417impl tabled::Tabled for GetShiftInputsResponse {
13418    const LENGTH: usize = 11;
13419    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13420        vec![
13421            if let Some(meta) = &self.meta {
13422                format!("{:?}", meta).into()
13423            } else {
13424                String::new().into()
13425            },
13426            self.id.clone().into(),
13427            self.created_at.clone().into(),
13428            self.updated_at.clone().into(),
13429            if let Some(creator_id) = &self.creator_id {
13430                format!("{:?}", creator_id).into()
13431            } else {
13432                String::new().into()
13433            },
13434            if let Some(creator) = &self.creator {
13435                format!("{:?}", creator).into()
13436            } else {
13437                String::new().into()
13438            },
13439            self.name.clone().into(),
13440            self.prompt.clone().into(),
13441            self.type_.clone().into(),
13442            self.country_code.clone().into(),
13443            if let Some(managed_by) = &self.managed_by {
13444                format!("{:?}", managed_by).into()
13445            } else {
13446                String::new().into()
13447            },
13448        ]
13449    }
13450
13451    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13452        vec![
13453            "meta".into(),
13454            "id".into(),
13455            "created_at".into(),
13456            "updated_at".into(),
13457            "creator_id".into(),
13458            "creator".into(),
13459            "name".into(),
13460            "prompt".into(),
13461            "type_".into(),
13462            "country_code".into(),
13463            "managed_by".into(),
13464        ]
13465    }
13466}
13467
13468#[derive(
13469    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13470)]
13471pub struct ListTeamsResponse {
13472    #[doc = "A list of redacted fields."]
13473    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13474    pub meta: Option<RedactedFields>,
13475    pub results: Vec<Team>,
13476    #[doc = "A link to the next page of responses."]
13477    #[serde(default, skip_serializing_if = "Option::is_none")]
13478    pub next_link: Option<String>,
13479}
13480
13481impl std::fmt::Display for ListTeamsResponse {
13482    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13483        write!(
13484            f,
13485            "{}",
13486            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13487        )
13488    }
13489}
13490
13491#[cfg(feature = "requests")]
13492impl crate::types::paginate::Pagination for ListTeamsResponse {
13493    type Item = Team;
13494    fn has_more_pages(&self) -> bool {
13495        self.next_link.is_some()
13496    }
13497
13498    fn next_page_token(&self) -> Option<String> {
13499        self.next_link.clone()
13500    }
13501
13502    fn next_page(
13503        &self,
13504        req: reqwest::Request,
13505    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
13506        let mut req = req.try_clone().ok_or_else(|| {
13507            crate::types::error::Error::InvalidRequest(format!(
13508                "failed to clone request: {:?}",
13509                req
13510            ))
13511        })?;
13512        req.url_mut()
13513            .query_pairs_mut()
13514            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
13515        Ok(req)
13516    }
13517
13518    fn items(&self) -> Vec<Self::Item> {
13519        self.results.clone()
13520    }
13521}
13522
13523#[cfg(feature = "tabled")]
13524impl tabled::Tabled for ListTeamsResponse {
13525    const LENGTH: usize = 3;
13526    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13527        vec![
13528            if let Some(meta) = &self.meta {
13529                format!("{:?}", meta).into()
13530            } else {
13531                String::new().into()
13532            },
13533            format!("{:?}", self.results).into(),
13534            if let Some(next_link) = &self.next_link {
13535                format!("{:?}", next_link).into()
13536            } else {
13537                String::new().into()
13538            },
13539        ]
13540    }
13541
13542    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13543        vec!["meta".into(), "results".into(), "next_link".into()]
13544    }
13545}
13546
13547#[derive(
13548    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13549)]
13550pub struct GetTeamsResponse {
13551    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13552    pub meta: Option<Meta>,
13553    #[doc = "Identifier field"]
13554    pub id: String,
13555    #[doc = "Record creation date"]
13556    pub created_at: String,
13557    #[doc = "Record update date"]
13558    pub updated_at: String,
13559    #[doc = "The parent team"]
13560    #[serde(default, skip_serializing_if = "Option::is_none")]
13561    pub parent_id: Option<String>,
13562    #[doc = "The parent team\n\nExpandable field"]
13563    #[serde(default, skip_serializing_if = "Option::is_none")]
13564    pub parent: Option<Team>,
13565    #[doc = "The name of the team."]
13566    pub name: String,
13567}
13568
13569impl std::fmt::Display for GetTeamsResponse {
13570    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13571        write!(
13572            f,
13573            "{}",
13574            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13575        )
13576    }
13577}
13578
13579#[cfg(feature = "tabled")]
13580impl tabled::Tabled for GetTeamsResponse {
13581    const LENGTH: usize = 7;
13582    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13583        vec![
13584            if let Some(meta) = &self.meta {
13585                format!("{:?}", meta).into()
13586            } else {
13587                String::new().into()
13588            },
13589            self.id.clone().into(),
13590            self.created_at.clone().into(),
13591            self.updated_at.clone().into(),
13592            if let Some(parent_id) = &self.parent_id {
13593                format!("{:?}", parent_id).into()
13594            } else {
13595                String::new().into()
13596            },
13597            if let Some(parent) = &self.parent {
13598                format!("{:?}", parent).into()
13599            } else {
13600                String::new().into()
13601            },
13602            self.name.clone().into(),
13603        ]
13604    }
13605
13606    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13607        vec![
13608            "meta".into(),
13609            "id".into(),
13610            "created_at".into(),
13611            "updated_at".into(),
13612            "parent_id".into(),
13613            "parent".into(),
13614            "name".into(),
13615        ]
13616    }
13617}
13618
13619#[derive(
13620    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13621)]
13622pub struct ListTimeCardsResponse {
13623    #[doc = "A list of redacted fields."]
13624    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13625    pub meta: Option<RedactedFields>,
13626    pub results: Vec<TimeCard>,
13627    #[doc = "A link to the next page of responses."]
13628    #[serde(default, skip_serializing_if = "Option::is_none")]
13629    pub next_link: Option<String>,
13630}
13631
13632impl std::fmt::Display for ListTimeCardsResponse {
13633    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13634        write!(
13635            f,
13636            "{}",
13637            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13638        )
13639    }
13640}
13641
13642#[cfg(feature = "requests")]
13643impl crate::types::paginate::Pagination for ListTimeCardsResponse {
13644    type Item = TimeCard;
13645    fn has_more_pages(&self) -> bool {
13646        self.next_link.is_some()
13647    }
13648
13649    fn next_page_token(&self) -> Option<String> {
13650        self.next_link.clone()
13651    }
13652
13653    fn next_page(
13654        &self,
13655        req: reqwest::Request,
13656    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
13657        let mut req = req.try_clone().ok_or_else(|| {
13658            crate::types::error::Error::InvalidRequest(format!(
13659                "failed to clone request: {:?}",
13660                req
13661            ))
13662        })?;
13663        req.url_mut()
13664            .query_pairs_mut()
13665            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
13666        Ok(req)
13667    }
13668
13669    fn items(&self) -> Vec<Self::Item> {
13670        self.results.clone()
13671    }
13672}
13673
13674#[cfg(feature = "tabled")]
13675impl tabled::Tabled for ListTimeCardsResponse {
13676    const LENGTH: usize = 3;
13677    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13678        vec![
13679            if let Some(meta) = &self.meta {
13680                format!("{:?}", meta).into()
13681            } else {
13682                String::new().into()
13683            },
13684            format!("{:?}", self.results).into(),
13685            if let Some(next_link) = &self.next_link {
13686                format!("{:?}", next_link).into()
13687            } else {
13688                String::new().into()
13689            },
13690        ]
13691    }
13692
13693    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13694        vec!["meta".into(), "results".into(), "next_link".into()]
13695    }
13696}
13697
13698#[derive(
13699    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13700)]
13701pub struct GetTimeCardsResponse {
13702    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13703    pub meta: Option<Meta>,
13704    #[doc = "Identifier field"]
13705    pub id: String,
13706    #[doc = "Record creation date"]
13707    pub created_at: String,
13708    #[doc = "Record update date"]
13709    pub updated_at: String,
13710    #[doc = "The ID of the worker associated with the time card."]
13711    pub worker_id: String,
13712    #[doc = "The worker associated with the time card.\n\nExpandable field"]
13713    #[serde(default, skip_serializing_if = "Option::is_none")]
13714    pub worker: Option<Worker>,
13715    #[doc = "The pay period associated with the time card."]
13716    #[serde(default, skip_serializing_if = "Option::is_none")]
13717    pub pay_period: Option<PayPeriod>,
13718    #[doc = "The summary of the time card."]
13719    #[serde(default, skip_serializing_if = "Option::is_none")]
13720    pub summary: Option<TimeCardSummary>,
13721}
13722
13723impl std::fmt::Display for GetTimeCardsResponse {
13724    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13725        write!(
13726            f,
13727            "{}",
13728            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13729        )
13730    }
13731}
13732
13733#[cfg(feature = "tabled")]
13734impl tabled::Tabled for GetTimeCardsResponse {
13735    const LENGTH: usize = 8;
13736    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13737        vec![
13738            if let Some(meta) = &self.meta {
13739                format!("{:?}", meta).into()
13740            } else {
13741                String::new().into()
13742            },
13743            self.id.clone().into(),
13744            self.created_at.clone().into(),
13745            self.updated_at.clone().into(),
13746            self.worker_id.clone().into(),
13747            if let Some(worker) = &self.worker {
13748                format!("{:?}", worker).into()
13749            } else {
13750                String::new().into()
13751            },
13752            if let Some(pay_period) = &self.pay_period {
13753                format!("{:?}", pay_period).into()
13754            } else {
13755                String::new().into()
13756            },
13757            if let Some(summary) = &self.summary {
13758                format!("{:?}", summary).into()
13759            } else {
13760                String::new().into()
13761            },
13762        ]
13763    }
13764
13765    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13766        vec![
13767            "meta".into(),
13768            "id".into(),
13769            "created_at".into(),
13770            "updated_at".into(),
13771            "worker_id".into(),
13772            "worker".into(),
13773            "pay_period".into(),
13774            "summary".into(),
13775        ]
13776    }
13777}
13778
13779#[derive(
13780    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13781)]
13782pub struct ListTimeEntriesResponse {
13783    #[doc = "A list of redacted fields."]
13784    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13785    pub meta: Option<RedactedFields>,
13786    pub results: Vec<TimeEntry>,
13787    #[doc = "A link to the next page of responses."]
13788    #[serde(default, skip_serializing_if = "Option::is_none")]
13789    pub next_link: Option<String>,
13790}
13791
13792impl std::fmt::Display for ListTimeEntriesResponse {
13793    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13794        write!(
13795            f,
13796            "{}",
13797            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13798        )
13799    }
13800}
13801
13802#[cfg(feature = "requests")]
13803impl crate::types::paginate::Pagination for ListTimeEntriesResponse {
13804    type Item = TimeEntry;
13805    fn has_more_pages(&self) -> bool {
13806        self.next_link.is_some()
13807    }
13808
13809    fn next_page_token(&self) -> Option<String> {
13810        self.next_link.clone()
13811    }
13812
13813    fn next_page(
13814        &self,
13815        req: reqwest::Request,
13816    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
13817        let mut req = req.try_clone().ok_or_else(|| {
13818            crate::types::error::Error::InvalidRequest(format!(
13819                "failed to clone request: {:?}",
13820                req
13821            ))
13822        })?;
13823        req.url_mut()
13824            .query_pairs_mut()
13825            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
13826        Ok(req)
13827    }
13828
13829    fn items(&self) -> Vec<Self::Item> {
13830        self.results.clone()
13831    }
13832}
13833
13834#[cfg(feature = "tabled")]
13835impl tabled::Tabled for ListTimeEntriesResponse {
13836    const LENGTH: usize = 3;
13837    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13838        vec![
13839            if let Some(meta) = &self.meta {
13840                format!("{:?}", meta).into()
13841            } else {
13842                String::new().into()
13843            },
13844            format!("{:?}", self.results).into(),
13845            if let Some(next_link) = &self.next_link {
13846                format!("{:?}", next_link).into()
13847            } else {
13848                String::new().into()
13849            },
13850        ]
13851    }
13852
13853    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
13854        vec!["meta".into(), "results".into(), "next_link".into()]
13855    }
13856}
13857
13858#[doc = "The status of the time entry."]
13859#[derive(
13860    serde :: Serialize,
13861    serde :: Deserialize,
13862    PartialEq,
13863    Hash,
13864    Debug,
13865    Clone,
13866    schemars :: JsonSchema,
13867    parse_display :: FromStr,
13868    parse_display :: Display,
13869)]
13870#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
13871#[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
13872pub enum GetTimeEntriesResponseStatus {
13873    #[serde(rename = "DRAFT")]
13874    #[display("DRAFT")]
13875    Draft,
13876    #[serde(rename = "APPROVED")]
13877    #[display("APPROVED")]
13878    Approved,
13879    #[serde(rename = "PAID")]
13880    #[display("PAID")]
13881    Paid,
13882    #[serde(rename = "FINALIZED")]
13883    #[display("FINALIZED")]
13884    Finalized,
13885}
13886
13887#[derive(
13888    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
13889)]
13890pub struct GetTimeEntriesResponse {
13891    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
13892    pub meta: Option<Meta>,
13893    #[doc = "Identifier field"]
13894    pub id: String,
13895    #[doc = "Record creation date"]
13896    pub created_at: String,
13897    #[doc = "Record update date"]
13898    pub updated_at: String,
13899    #[doc = "The ID of the worker associated with the time entry."]
13900    pub worker_id: String,
13901    #[doc = "The worker associated with the time entry.\n\nExpandable field"]
13902    #[serde(default, skip_serializing_if = "Option::is_none")]
13903    pub worker: Option<Worker>,
13904    #[doc = "The start time of the time entry."]
13905    #[serde(default, skip_serializing_if = "Option::is_none")]
13906    pub start_time: Option<String>,
13907    #[doc = "The end time of the time entry."]
13908    #[serde(default, skip_serializing_if = "Option::is_none")]
13909    pub end_time: Option<String>,
13910    #[doc = "The comments associated with the time entry."]
13911    #[serde(default, skip_serializing_if = "Option::is_none")]
13912    pub comments: Option<Vec<TimeEntryComment>>,
13913    #[doc = "The job shifts worked during the time entry."]
13914    #[serde(default, skip_serializing_if = "Option::is_none")]
13915    pub job_shifts: Option<Vec<JobShift>>,
13916    #[doc = "The breaks taken during the time entry."]
13917    #[serde(default, skip_serializing_if = "Option::is_none")]
13918    pub breaks: Option<Vec<Break>>,
13919    #[doc = "The premiums earned during the time entry."]
13920    #[serde(default, skip_serializing_if = "Option::is_none")]
13921    pub premiums: Option<Vec<Premiums>>,
13922    #[doc = "The piece-rate premiums earned during the time entry."]
13923    #[serde(default, skip_serializing_if = "Option::is_none")]
13924    pub piece_rate_premiums: Option<Vec<PieceRatePremiums>>,
13925    #[doc = "The pay rates for each segment of the time entry."]
13926    #[serde(default, skip_serializing_if = "Option::is_none")]
13927    pub segments: Option<Vec<Segments>>,
13928    #[doc = "A summary of the time entry."]
13929    #[serde(default, skip_serializing_if = "Option::is_none")]
13930    pub time_entry_summary: Option<TimeEntrySummary>,
13931    #[doc = "The ID of the time card associated with the time entry."]
13932    #[serde(default, skip_serializing_if = "Option::is_none")]
13933    pub time_card_id: Option<String>,
13934    #[doc = "The time card associated with the time entry.\n\nExpandable field"]
13935    #[serde(default, skip_serializing_if = "Option::is_none")]
13936    pub time_card: Option<TimeCard>,
13937    #[doc = "The tags associated with the time entry."]
13938    #[serde(default, skip_serializing_if = "Option::is_none")]
13939    pub tags: Option<Vec<String>>,
13940    #[doc = "The unique key of the time entry in an outside system. If set, no other time entry \
13941             with the same key can be created."]
13942    #[serde(default, skip_serializing_if = "Option::is_none")]
13943    pub idempotency_key: Option<String>,
13944    #[doc = "Whether the time entry should create an extra hours run."]
13945    #[serde(default, skip_serializing_if = "Option::is_none")]
13946    pub create_extra_hours_run: Option<bool>,
13947    #[doc = "The status of the time entry."]
13948    #[serde(default, skip_serializing_if = "Option::is_none")]
13949    pub status: Option<GetTimeEntriesResponseStatus>,
13950    #[doc = "The pay period associated with the time card."]
13951    #[serde(default, skip_serializing_if = "Option::is_none")]
13952    pub pay_period: Option<PayPeriod>,
13953    #[doc = "Arbitrary shift inputs collected on the time entry"]
13954    #[serde(default, skip_serializing_if = "Option::is_none")]
13955    pub shift_input_values: Option<Vec<ShiftInputValue>>,
13956}
13957
13958impl std::fmt::Display for GetTimeEntriesResponse {
13959    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
13960        write!(
13961            f,
13962            "{}",
13963            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
13964        )
13965    }
13966}
13967
13968#[cfg(feature = "tabled")]
13969impl tabled::Tabled for GetTimeEntriesResponse {
13970    const LENGTH: usize = 23;
13971    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
13972        vec![
13973            if let Some(meta) = &self.meta {
13974                format!("{:?}", meta).into()
13975            } else {
13976                String::new().into()
13977            },
13978            self.id.clone().into(),
13979            self.created_at.clone().into(),
13980            self.updated_at.clone().into(),
13981            self.worker_id.clone().into(),
13982            if let Some(worker) = &self.worker {
13983                format!("{:?}", worker).into()
13984            } else {
13985                String::new().into()
13986            },
13987            if let Some(start_time) = &self.start_time {
13988                format!("{:?}", start_time).into()
13989            } else {
13990                String::new().into()
13991            },
13992            if let Some(end_time) = &self.end_time {
13993                format!("{:?}", end_time).into()
13994            } else {
13995                String::new().into()
13996            },
13997            if let Some(comments) = &self.comments {
13998                format!("{:?}", comments).into()
13999            } else {
14000                String::new().into()
14001            },
14002            if let Some(job_shifts) = &self.job_shifts {
14003                format!("{:?}", job_shifts).into()
14004            } else {
14005                String::new().into()
14006            },
14007            if let Some(breaks) = &self.breaks {
14008                format!("{:?}", breaks).into()
14009            } else {
14010                String::new().into()
14011            },
14012            if let Some(premiums) = &self.premiums {
14013                format!("{:?}", premiums).into()
14014            } else {
14015                String::new().into()
14016            },
14017            if let Some(piece_rate_premiums) = &self.piece_rate_premiums {
14018                format!("{:?}", piece_rate_premiums).into()
14019            } else {
14020                String::new().into()
14021            },
14022            if let Some(segments) = &self.segments {
14023                format!("{:?}", segments).into()
14024            } else {
14025                String::new().into()
14026            },
14027            if let Some(time_entry_summary) = &self.time_entry_summary {
14028                format!("{:?}", time_entry_summary).into()
14029            } else {
14030                String::new().into()
14031            },
14032            if let Some(time_card_id) = &self.time_card_id {
14033                format!("{:?}", time_card_id).into()
14034            } else {
14035                String::new().into()
14036            },
14037            if let Some(time_card) = &self.time_card {
14038                format!("{:?}", time_card).into()
14039            } else {
14040                String::new().into()
14041            },
14042            if let Some(tags) = &self.tags {
14043                format!("{:?}", tags).into()
14044            } else {
14045                String::new().into()
14046            },
14047            if let Some(idempotency_key) = &self.idempotency_key {
14048                format!("{:?}", idempotency_key).into()
14049            } else {
14050                String::new().into()
14051            },
14052            if let Some(create_extra_hours_run) = &self.create_extra_hours_run {
14053                format!("{:?}", create_extra_hours_run).into()
14054            } else {
14055                String::new().into()
14056            },
14057            if let Some(status) = &self.status {
14058                format!("{:?}", status).into()
14059            } else {
14060                String::new().into()
14061            },
14062            if let Some(pay_period) = &self.pay_period {
14063                format!("{:?}", pay_period).into()
14064            } else {
14065                String::new().into()
14066            },
14067            if let Some(shift_input_values) = &self.shift_input_values {
14068                format!("{:?}", shift_input_values).into()
14069            } else {
14070                String::new().into()
14071            },
14072        ]
14073    }
14074
14075    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14076        vec![
14077            "meta".into(),
14078            "id".into(),
14079            "created_at".into(),
14080            "updated_at".into(),
14081            "worker_id".into(),
14082            "worker".into(),
14083            "start_time".into(),
14084            "end_time".into(),
14085            "comments".into(),
14086            "job_shifts".into(),
14087            "breaks".into(),
14088            "premiums".into(),
14089            "piece_rate_premiums".into(),
14090            "segments".into(),
14091            "time_entry_summary".into(),
14092            "time_card_id".into(),
14093            "time_card".into(),
14094            "tags".into(),
14095            "idempotency_key".into(),
14096            "create_extra_hours_run".into(),
14097            "status".into(),
14098            "pay_period".into(),
14099            "shift_input_values".into(),
14100        ]
14101    }
14102}
14103
14104#[derive(
14105    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14106)]
14107pub struct ListTracksResponse {
14108    #[doc = "A list of redacted fields."]
14109    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14110    pub meta: Option<RedactedFields>,
14111    pub results: Vec<Track>,
14112    #[doc = "A link to the next page of responses."]
14113    #[serde(default, skip_serializing_if = "Option::is_none")]
14114    pub next_link: Option<String>,
14115}
14116
14117impl std::fmt::Display for ListTracksResponse {
14118    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14119        write!(
14120            f,
14121            "{}",
14122            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14123        )
14124    }
14125}
14126
14127#[cfg(feature = "requests")]
14128impl crate::types::paginate::Pagination for ListTracksResponse {
14129    type Item = Track;
14130    fn has_more_pages(&self) -> bool {
14131        self.next_link.is_some()
14132    }
14133
14134    fn next_page_token(&self) -> Option<String> {
14135        self.next_link.clone()
14136    }
14137
14138    fn next_page(
14139        &self,
14140        req: reqwest::Request,
14141    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
14142        let mut req = req.try_clone().ok_or_else(|| {
14143            crate::types::error::Error::InvalidRequest(format!(
14144                "failed to clone request: {:?}",
14145                req
14146            ))
14147        })?;
14148        req.url_mut()
14149            .query_pairs_mut()
14150            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
14151        Ok(req)
14152    }
14153
14154    fn items(&self) -> Vec<Self::Item> {
14155        self.results.clone()
14156    }
14157}
14158
14159#[cfg(feature = "tabled")]
14160impl tabled::Tabled for ListTracksResponse {
14161    const LENGTH: usize = 3;
14162    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14163        vec![
14164            if let Some(meta) = &self.meta {
14165                format!("{:?}", meta).into()
14166            } else {
14167                String::new().into()
14168            },
14169            format!("{:?}", self.results).into(),
14170            if let Some(next_link) = &self.next_link {
14171                format!("{:?}", next_link).into()
14172            } else {
14173                String::new().into()
14174            },
14175        ]
14176    }
14177
14178    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14179        vec!["meta".into(), "results".into(), "next_link".into()]
14180    }
14181}
14182
14183#[derive(
14184    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14185)]
14186pub struct GetTracksResponse {
14187    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14188    pub meta: Option<Meta>,
14189    #[doc = "Identifier field"]
14190    pub id: String,
14191    #[doc = "Record creation date"]
14192    pub created_at: String,
14193    #[doc = "Record update date"]
14194    pub updated_at: String,
14195    #[doc = "The name of the track. Must be unique within the company or organization."]
14196    pub name: String,
14197}
14198
14199impl std::fmt::Display for GetTracksResponse {
14200    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14201        write!(
14202            f,
14203            "{}",
14204            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14205        )
14206    }
14207}
14208
14209#[cfg(feature = "tabled")]
14210impl tabled::Tabled for GetTracksResponse {
14211    const LENGTH: usize = 5;
14212    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14213        vec![
14214            if let Some(meta) = &self.meta {
14215                format!("{:?}", meta).into()
14216            } else {
14217                String::new().into()
14218            },
14219            self.id.clone().into(),
14220            self.created_at.clone().into(),
14221            self.updated_at.clone().into(),
14222            self.name.clone().into(),
14223        ]
14224    }
14225
14226    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14227        vec![
14228            "meta".into(),
14229            "id".into(),
14230            "created_at".into(),
14231            "updated_at".into(),
14232            "name".into(),
14233        ]
14234    }
14235}
14236
14237#[derive(
14238    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14239)]
14240pub struct ListUsersResponse {
14241    #[doc = "A list of redacted fields."]
14242    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14243    pub meta: Option<RedactedFields>,
14244    pub results: Vec<User>,
14245    #[doc = "A link to the next page of responses."]
14246    #[serde(default, skip_serializing_if = "Option::is_none")]
14247    pub next_link: Option<String>,
14248}
14249
14250impl std::fmt::Display for ListUsersResponse {
14251    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14252        write!(
14253            f,
14254            "{}",
14255            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14256        )
14257    }
14258}
14259
14260#[cfg(feature = "requests")]
14261impl crate::types::paginate::Pagination for ListUsersResponse {
14262    type Item = User;
14263    fn has_more_pages(&self) -> bool {
14264        self.next_link.is_some()
14265    }
14266
14267    fn next_page_token(&self) -> Option<String> {
14268        self.next_link.clone()
14269    }
14270
14271    fn next_page(
14272        &self,
14273        req: reqwest::Request,
14274    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
14275        let mut req = req.try_clone().ok_or_else(|| {
14276            crate::types::error::Error::InvalidRequest(format!(
14277                "failed to clone request: {:?}",
14278                req
14279            ))
14280        })?;
14281        req.url_mut()
14282            .query_pairs_mut()
14283            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
14284        Ok(req)
14285    }
14286
14287    fn items(&self) -> Vec<Self::Item> {
14288        self.results.clone()
14289    }
14290}
14291
14292#[cfg(feature = "tabled")]
14293impl tabled::Tabled for ListUsersResponse {
14294    const LENGTH: usize = 3;
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            format!("{:?}", self.results).into(),
14303            if let Some(next_link) = &self.next_link {
14304                format!("{:?}", next_link).into()
14305            } else {
14306                String::new().into()
14307            },
14308        ]
14309    }
14310
14311    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14312        vec!["meta".into(), "results".into(), "next_link".into()]
14313    }
14314}
14315
14316#[derive(
14317    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14318)]
14319pub struct GetUsersResponse {
14320    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14321    pub meta: Option<Meta>,
14322    #[doc = "Identifier field"]
14323    pub id: String,
14324    #[doc = "Record creation date"]
14325    pub created_at: String,
14326    #[doc = "Record update date"]
14327    pub updated_at: String,
14328    #[doc = "Whether the user is able to access company resources, typically when they are in \
14329             actively engaged with the company and not after off-boarding."]
14330    #[serde(default, skip_serializing_if = "Option::is_none")]
14331    pub active: Option<bool>,
14332    #[doc = "The unique identifier across Rippling used by the User for direct authentication \
14333             into their associated company. Globally unique."]
14334    #[serde(default, skip_serializing_if = "Option::is_none")]
14335    pub username: Option<String>,
14336    #[doc = "The user's name."]
14337    #[serde(default, skip_serializing_if = "Option::is_none")]
14338    pub name: Option<UserName>,
14339    #[doc = "The display name of the user using either the concatenated preferred given and \
14340             family name or username depending on availability."]
14341    #[serde(default, skip_serializing_if = "Option::is_none")]
14342    pub display_name: Option<String>,
14343    #[doc = "The user's email addresses."]
14344    #[serde(default, skip_serializing_if = "Option::is_none")]
14345    pub emails: Option<Vec<Email>>,
14346    #[doc = "The user's phone numbers."]
14347    #[serde(default, skip_serializing_if = "Option::is_none")]
14348    pub phone_numbers: Option<Vec<UserPhoneNumber>>,
14349    #[doc = "The user's addresses."]
14350    #[serde(default, skip_serializing_if = "Option::is_none")]
14351    pub addresses: Option<Vec<UserAddress>>,
14352    #[doc = "The user's photos."]
14353    #[serde(default, skip_serializing_if = "Option::is_none")]
14354    pub photos: Option<Vec<UserPhoto>>,
14355    #[doc = "The User's preferred written or spoken language in the same format of the HTTP \
14356             Accept-Language header, pursuant to Section 5.3.5 of RFC7231."]
14357    #[serde(default, skip_serializing_if = "Option::is_none")]
14358    pub preferred_language: Option<String>,
14359    #[doc = "The User's default location for purposes of localization of currency, date time \
14360             format, or numerical representations pursuant to RFC5646."]
14361    #[serde(default, skip_serializing_if = "Option::is_none")]
14362    pub locale: Option<String>,
14363    #[doc = "The User's current time zone in IANA database Olson format"]
14364    #[serde(default, skip_serializing_if = "Option::is_none")]
14365    pub timezone: Option<String>,
14366}
14367
14368impl std::fmt::Display for GetUsersResponse {
14369    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14370        write!(
14371            f,
14372            "{}",
14373            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14374        )
14375    }
14376}
14377
14378#[cfg(feature = "tabled")]
14379impl tabled::Tabled for GetUsersResponse {
14380    const LENGTH: usize = 15;
14381    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14382        vec![
14383            if let Some(meta) = &self.meta {
14384                format!("{:?}", meta).into()
14385            } else {
14386                String::new().into()
14387            },
14388            self.id.clone().into(),
14389            self.created_at.clone().into(),
14390            self.updated_at.clone().into(),
14391            if let Some(active) = &self.active {
14392                format!("{:?}", active).into()
14393            } else {
14394                String::new().into()
14395            },
14396            if let Some(username) = &self.username {
14397                format!("{:?}", username).into()
14398            } else {
14399                String::new().into()
14400            },
14401            if let Some(name) = &self.name {
14402                format!("{:?}", name).into()
14403            } else {
14404                String::new().into()
14405            },
14406            if let Some(display_name) = &self.display_name {
14407                format!("{:?}", display_name).into()
14408            } else {
14409                String::new().into()
14410            },
14411            if let Some(emails) = &self.emails {
14412                format!("{:?}", emails).into()
14413            } else {
14414                String::new().into()
14415            },
14416            if let Some(phone_numbers) = &self.phone_numbers {
14417                format!("{:?}", phone_numbers).into()
14418            } else {
14419                String::new().into()
14420            },
14421            if let Some(addresses) = &self.addresses {
14422                format!("{:?}", addresses).into()
14423            } else {
14424                String::new().into()
14425            },
14426            if let Some(photos) = &self.photos {
14427                format!("{:?}", photos).into()
14428            } else {
14429                String::new().into()
14430            },
14431            if let Some(preferred_language) = &self.preferred_language {
14432                format!("{:?}", preferred_language).into()
14433            } else {
14434                String::new().into()
14435            },
14436            if let Some(locale) = &self.locale {
14437                format!("{:?}", locale).into()
14438            } else {
14439                String::new().into()
14440            },
14441            if let Some(timezone) = &self.timezone {
14442                format!("{:?}", timezone).into()
14443            } else {
14444                String::new().into()
14445            },
14446        ]
14447    }
14448
14449    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14450        vec![
14451            "meta".into(),
14452            "id".into(),
14453            "created_at".into(),
14454            "updated_at".into(),
14455            "active".into(),
14456            "username".into(),
14457            "name".into(),
14458            "display_name".into(),
14459            "emails".into(),
14460            "phone_numbers".into(),
14461            "addresses".into(),
14462            "photos".into(),
14463            "preferred_language".into(),
14464            "locale".into(),
14465            "timezone".into(),
14466        ]
14467    }
14468}
14469
14470#[derive(
14471    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14472)]
14473pub struct ListWorkLocationsResponse {
14474    #[doc = "A list of redacted fields."]
14475    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14476    pub meta: Option<RedactedFields>,
14477    pub results: Vec<WorkLocation>,
14478    #[doc = "A link to the next page of responses."]
14479    #[serde(default, skip_serializing_if = "Option::is_none")]
14480    pub next_link: Option<String>,
14481}
14482
14483impl std::fmt::Display for ListWorkLocationsResponse {
14484    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14485        write!(
14486            f,
14487            "{}",
14488            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14489        )
14490    }
14491}
14492
14493#[cfg(feature = "requests")]
14494impl crate::types::paginate::Pagination for ListWorkLocationsResponse {
14495    type Item = WorkLocation;
14496    fn has_more_pages(&self) -> bool {
14497        self.next_link.is_some()
14498    }
14499
14500    fn next_page_token(&self) -> Option<String> {
14501        self.next_link.clone()
14502    }
14503
14504    fn next_page(
14505        &self,
14506        req: reqwest::Request,
14507    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
14508        let mut req = req.try_clone().ok_or_else(|| {
14509            crate::types::error::Error::InvalidRequest(format!(
14510                "failed to clone request: {:?}",
14511                req
14512            ))
14513        })?;
14514        req.url_mut()
14515            .query_pairs_mut()
14516            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
14517        Ok(req)
14518    }
14519
14520    fn items(&self) -> Vec<Self::Item> {
14521        self.results.clone()
14522    }
14523}
14524
14525#[cfg(feature = "tabled")]
14526impl tabled::Tabled for ListWorkLocationsResponse {
14527    const LENGTH: usize = 3;
14528    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14529        vec![
14530            if let Some(meta) = &self.meta {
14531                format!("{:?}", meta).into()
14532            } else {
14533                String::new().into()
14534            },
14535            format!("{:?}", self.results).into(),
14536            if let Some(next_link) = &self.next_link {
14537                format!("{:?}", next_link).into()
14538            } else {
14539                String::new().into()
14540            },
14541        ]
14542    }
14543
14544    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14545        vec!["meta".into(), "results".into(), "next_link".into()]
14546    }
14547}
14548
14549#[derive(
14550    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14551)]
14552pub struct GetWorkLocationsResponse {
14553    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14554    pub meta: Option<Meta>,
14555    #[doc = "Identifier field"]
14556    pub id: String,
14557    #[doc = "Record creation date"]
14558    pub created_at: String,
14559    #[doc = "Record update date"]
14560    pub updated_at: String,
14561    #[doc = "The name of the work location."]
14562    pub name: String,
14563    #[doc = "The address for the work location."]
14564    pub address: Address,
14565}
14566
14567impl std::fmt::Display for GetWorkLocationsResponse {
14568    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14569        write!(
14570            f,
14571            "{}",
14572            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14573        )
14574    }
14575}
14576
14577#[cfg(feature = "tabled")]
14578impl tabled::Tabled for GetWorkLocationsResponse {
14579    const LENGTH: usize = 6;
14580    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14581        vec![
14582            if let Some(meta) = &self.meta {
14583                format!("{:?}", meta).into()
14584            } else {
14585                String::new().into()
14586            },
14587            self.id.clone().into(),
14588            self.created_at.clone().into(),
14589            self.updated_at.clone().into(),
14590            self.name.clone().into(),
14591            format!("{:?}", self.address).into(),
14592        ]
14593    }
14594
14595    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14596        vec![
14597            "meta".into(),
14598            "id".into(),
14599            "created_at".into(),
14600            "updated_at".into(),
14601            "name".into(),
14602            "address".into(),
14603        ]
14604    }
14605}
14606
14607#[derive(
14608    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14609)]
14610pub struct ListWorkersResponse {
14611    #[doc = "A list of redacted fields."]
14612    #[serde(rename = "__meta", default, skip_serializing_if = "Option::is_none")]
14613    pub meta: Option<RedactedFields>,
14614    pub results: Vec<Worker>,
14615    #[doc = "A link to the next page of responses."]
14616    #[serde(default, skip_serializing_if = "Option::is_none")]
14617    pub next_link: Option<String>,
14618}
14619
14620impl std::fmt::Display for ListWorkersResponse {
14621    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14622        write!(
14623            f,
14624            "{}",
14625            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14626        )
14627    }
14628}
14629
14630#[cfg(feature = "requests")]
14631impl crate::types::paginate::Pagination for ListWorkersResponse {
14632    type Item = Worker;
14633    fn has_more_pages(&self) -> bool {
14634        self.next_link.is_some()
14635    }
14636
14637    fn next_page_token(&self) -> Option<String> {
14638        self.next_link.clone()
14639    }
14640
14641    fn next_page(
14642        &self,
14643        req: reqwest::Request,
14644    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
14645        let mut req = req.try_clone().ok_or_else(|| {
14646            crate::types::error::Error::InvalidRequest(format!(
14647                "failed to clone request: {:?}",
14648                req
14649            ))
14650        })?;
14651        req.url_mut()
14652            .query_pairs_mut()
14653            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
14654        Ok(req)
14655    }
14656
14657    fn items(&self) -> Vec<Self::Item> {
14658        self.results.clone()
14659    }
14660}
14661
14662#[cfg(feature = "tabled")]
14663impl tabled::Tabled for ListWorkersResponse {
14664    const LENGTH: usize = 3;
14665    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14666        vec![
14667            if let Some(meta) = &self.meta {
14668                format!("{:?}", meta).into()
14669            } else {
14670                String::new().into()
14671            },
14672            format!("{:?}", self.results).into(),
14673            if let Some(next_link) = &self.next_link {
14674                format!("{:?}", next_link).into()
14675            } else {
14676                String::new().into()
14677            },
14678        ]
14679    }
14680
14681    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14682        vec!["meta".into(), "results".into(), "next_link".into()]
14683    }
14684}
14685
14686#[derive(
14687    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14688)]
14689pub struct ListCustomObjectsCustomObjectApiNameFieldsResponse {
14690    pub results: Vec<CustomObjectField>,
14691    #[doc = "A link to the next page of responses."]
14692    #[serde(default, skip_serializing_if = "Option::is_none")]
14693    pub next_link: Option<String>,
14694}
14695
14696impl std::fmt::Display for ListCustomObjectsCustomObjectApiNameFieldsResponse {
14697    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14698        write!(
14699            f,
14700            "{}",
14701            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14702        )
14703    }
14704}
14705
14706#[cfg(feature = "requests")]
14707impl crate::types::paginate::Pagination for ListCustomObjectsCustomObjectApiNameFieldsResponse {
14708    type Item = CustomObjectField;
14709    fn has_more_pages(&self) -> bool {
14710        self.next_link.is_some()
14711    }
14712
14713    fn next_page_token(&self) -> Option<String> {
14714        self.next_link.clone()
14715    }
14716
14717    fn next_page(
14718        &self,
14719        req: reqwest::Request,
14720    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
14721        let mut req = req.try_clone().ok_or_else(|| {
14722            crate::types::error::Error::InvalidRequest(format!(
14723                "failed to clone request: {:?}",
14724                req
14725            ))
14726        })?;
14727        req.url_mut()
14728            .query_pairs_mut()
14729            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
14730        Ok(req)
14731    }
14732
14733    fn items(&self) -> Vec<Self::Item> {
14734        self.results.clone()
14735    }
14736}
14737
14738#[cfg(feature = "tabled")]
14739impl tabled::Tabled for ListCustomObjectsCustomObjectApiNameFieldsResponse {
14740    const LENGTH: usize = 2;
14741    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14742        vec![
14743            format!("{:?}", self.results).into(),
14744            if let Some(next_link) = &self.next_link {
14745                format!("{:?}", next_link).into()
14746            } else {
14747                String::new().into()
14748            },
14749        ]
14750    }
14751
14752    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14753        vec!["results".into(), "next_link".into()]
14754    }
14755}
14756
14757#[derive(
14758    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14759)]
14760pub struct CreateCustomObjectsCustomObjectApiNameFieldsRequestBody {
14761    #[serde(default, skip_serializing_if = "Option::is_none")]
14762    pub name: Option<String>,
14763    #[serde(default, skip_serializing_if = "Option::is_none")]
14764    pub description: Option<String>,
14765    #[serde(default, skip_serializing_if = "Option::is_none")]
14766    pub required: Option<bool>,
14767    #[serde(default, skip_serializing_if = "Option::is_none")]
14768    pub is_unique: Option<bool>,
14769    #[serde(default, skip_serializing_if = "Option::is_none")]
14770    pub enable_history: Option<bool>,
14771    #[serde(default, skip_serializing_if = "Option::is_none")]
14772    pub derived_field_formula: Option<String>,
14773}
14774
14775impl std::fmt::Display for CreateCustomObjectsCustomObjectApiNameFieldsRequestBody {
14776    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14777        write!(
14778            f,
14779            "{}",
14780            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14781        )
14782    }
14783}
14784
14785#[cfg(feature = "tabled")]
14786impl tabled::Tabled for CreateCustomObjectsCustomObjectApiNameFieldsRequestBody {
14787    const LENGTH: usize = 6;
14788    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14789        vec![
14790            if let Some(name) = &self.name {
14791                format!("{:?}", name).into()
14792            } else {
14793                String::new().into()
14794            },
14795            if let Some(description) = &self.description {
14796                format!("{:?}", description).into()
14797            } else {
14798                String::new().into()
14799            },
14800            if let Some(required) = &self.required {
14801                format!("{:?}", required).into()
14802            } else {
14803                String::new().into()
14804            },
14805            if let Some(is_unique) = &self.is_unique {
14806                format!("{:?}", is_unique).into()
14807            } else {
14808                String::new().into()
14809            },
14810            if let Some(enable_history) = &self.enable_history {
14811                format!("{:?}", enable_history).into()
14812            } else {
14813                String::new().into()
14814            },
14815            if let Some(derived_field_formula) = &self.derived_field_formula {
14816                format!("{:?}", derived_field_formula).into()
14817            } else {
14818                String::new().into()
14819            },
14820        ]
14821    }
14822
14823    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14824        vec![
14825            "name".into(),
14826            "description".into(),
14827            "required".into(),
14828            "is_unique".into(),
14829            "enable_history".into(),
14830            "derived_field_formula".into(),
14831        ]
14832    }
14833}
14834
14835#[derive(
14836    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14837)]
14838pub struct UpdateCustomObjectsCustomObjectApiNameFieldsRequestBody {
14839    #[serde(default, skip_serializing_if = "Option::is_none")]
14840    pub name: Option<String>,
14841    #[serde(default, skip_serializing_if = "Option::is_none")]
14842    pub description: Option<String>,
14843    #[serde(default, skip_serializing_if = "Option::is_none")]
14844    pub required: Option<bool>,
14845    #[serde(default, skip_serializing_if = "Option::is_none")]
14846    pub is_unique: Option<bool>,
14847    #[serde(default, skip_serializing_if = "Option::is_none")]
14848    pub enable_history: Option<bool>,
14849    #[serde(default, skip_serializing_if = "Option::is_none")]
14850    pub derived_field_formula: Option<String>,
14851}
14852
14853impl std::fmt::Display for UpdateCustomObjectsCustomObjectApiNameFieldsRequestBody {
14854    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14855        write!(
14856            f,
14857            "{}",
14858            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14859        )
14860    }
14861}
14862
14863#[cfg(feature = "tabled")]
14864impl tabled::Tabled for UpdateCustomObjectsCustomObjectApiNameFieldsRequestBody {
14865    const LENGTH: usize = 6;
14866    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14867        vec![
14868            if let Some(name) = &self.name {
14869                format!("{:?}", name).into()
14870            } else {
14871                String::new().into()
14872            },
14873            if let Some(description) = &self.description {
14874                format!("{:?}", description).into()
14875            } else {
14876                String::new().into()
14877            },
14878            if let Some(required) = &self.required {
14879                format!("{:?}", required).into()
14880            } else {
14881                String::new().into()
14882            },
14883            if let Some(is_unique) = &self.is_unique {
14884                format!("{:?}", is_unique).into()
14885            } else {
14886                String::new().into()
14887            },
14888            if let Some(enable_history) = &self.enable_history {
14889                format!("{:?}", enable_history).into()
14890            } else {
14891                String::new().into()
14892            },
14893            if let Some(derived_field_formula) = &self.derived_field_formula {
14894                format!("{:?}", derived_field_formula).into()
14895            } else {
14896                String::new().into()
14897            },
14898        ]
14899    }
14900
14901    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
14902        vec![
14903            "name".into(),
14904            "description".into(),
14905            "required".into(),
14906            "is_unique".into(),
14907            "enable_history".into(),
14908            "derived_field_formula".into(),
14909        ]
14910    }
14911}
14912
14913#[derive(
14914    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
14915)]
14916pub struct Results {
14917    #[serde(default, skip_serializing_if = "Option::is_none")]
14918    pub name: Option<String>,
14919    #[serde(default, skip_serializing_if = "Option::is_none")]
14920    pub compnay_id: Option<String>,
14921    #[serde(default, skip_serializing_if = "Option::is_none")]
14922    pub created_at: Option<String>,
14923    #[serde(default, skip_serializing_if = "Option::is_none")]
14924    pub created_by: Option<String>,
14925    #[serde(default, skip_serializing_if = "Option::is_none")]
14926    pub custom_object: Option<String>,
14927    #[serde(default, skip_serializing_if = "Option::is_none")]
14928    pub external_id: Option<String>,
14929    #[serde(default, skip_serializing_if = "Option::is_none")]
14930    pub id: Option<String>,
14931    #[serde(default, skip_serializing_if = "Option::is_none")]
14932    pub last_modified_by: Option<String>,
14933    #[serde(default, skip_serializing_if = "Option::is_none")]
14934    pub updated_at: Option<String>,
14935    #[serde(default, skip_serializing_if = "Option::is_none")]
14936    pub owner_role: Option<String>,
14937}
14938
14939impl std::fmt::Display for Results {
14940    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14941        write!(
14942            f,
14943            "{}",
14944            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
14945        )
14946    }
14947}
14948
14949#[cfg(feature = "tabled")]
14950impl tabled::Tabled for Results {
14951    const LENGTH: usize = 10;
14952    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
14953        vec![
14954            if let Some(name) = &self.name {
14955                format!("{:?}", name).into()
14956            } else {
14957                String::new().into()
14958            },
14959            if let Some(compnay_id) = &self.compnay_id {
14960                format!("{:?}", compnay_id).into()
14961            } else {
14962                String::new().into()
14963            },
14964            if let Some(created_at) = &self.created_at {
14965                format!("{:?}", created_at).into()
14966            } else {
14967                String::new().into()
14968            },
14969            if let Some(created_by) = &self.created_by {
14970                format!("{:?}", created_by).into()
14971            } else {
14972                String::new().into()
14973            },
14974            if let Some(custom_object) = &self.custom_object {
14975                format!("{:?}", custom_object).into()
14976            } else {
14977                String::new().into()
14978            },
14979            if let Some(external_id) = &self.external_id {
14980                format!("{:?}", external_id).into()
14981            } else {
14982                String::new().into()
14983            },
14984            if let Some(id) = &self.id {
14985                format!("{:?}", id).into()
14986            } else {
14987                String::new().into()
14988            },
14989            if let Some(last_modified_by) = &self.last_modified_by {
14990                format!("{:?}", last_modified_by).into()
14991            } else {
14992                String::new().into()
14993            },
14994            if let Some(updated_at) = &self.updated_at {
14995                format!("{:?}", updated_at).into()
14996            } else {
14997                String::new().into()
14998            },
14999            if let Some(owner_role) = &self.owner_role {
15000                format!("{:?}", owner_role).into()
15001            } else {
15002                String::new().into()
15003            },
15004        ]
15005    }
15006
15007    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15008        vec![
15009            "name".into(),
15010            "compnay_id".into(),
15011            "created_at".into(),
15012            "created_by".into(),
15013            "custom_object".into(),
15014            "external_id".into(),
15015            "id".into(),
15016            "last_modified_by".into(),
15017            "updated_at".into(),
15018            "owner_role".into(),
15019        ]
15020    }
15021}
15022
15023#[derive(
15024    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15025)]
15026pub struct ListCustomObjectsCustomObjectApiNameRecordsResponse {
15027    pub results: Vec<Results>,
15028    #[doc = "A link to the next page of responses."]
15029    #[serde(default, skip_serializing_if = "Option::is_none")]
15030    pub next_link: Option<String>,
15031}
15032
15033impl std::fmt::Display for ListCustomObjectsCustomObjectApiNameRecordsResponse {
15034    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15035        write!(
15036            f,
15037            "{}",
15038            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15039        )
15040    }
15041}
15042
15043#[cfg(feature = "requests")]
15044impl crate::types::paginate::Pagination for ListCustomObjectsCustomObjectApiNameRecordsResponse {
15045    type Item = Results;
15046    fn has_more_pages(&self) -> bool {
15047        self.next_link.is_some()
15048    }
15049
15050    fn next_page_token(&self) -> Option<String> {
15051        self.next_link.clone()
15052    }
15053
15054    fn next_page(
15055        &self,
15056        req: reqwest::Request,
15057    ) -> anyhow::Result<reqwest::Request, crate::types::error::Error> {
15058        let mut req = req.try_clone().ok_or_else(|| {
15059            crate::types::error::Error::InvalidRequest(format!(
15060                "failed to clone request: {:?}",
15061                req
15062            ))
15063        })?;
15064        req.url_mut()
15065            .query_pairs_mut()
15066            .append_pair("next_link", self.next_link.as_deref().unwrap_or(""));
15067        Ok(req)
15068    }
15069
15070    fn items(&self) -> Vec<Self::Item> {
15071        self.results.clone()
15072    }
15073}
15074
15075#[cfg(feature = "tabled")]
15076impl tabled::Tabled for ListCustomObjectsCustomObjectApiNameRecordsResponse {
15077    const LENGTH: usize = 2;
15078    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15079        vec![
15080            format!("{:?}", self.results).into(),
15081            if let Some(next_link) = &self.next_link {
15082                format!("{:?}", next_link).into()
15083            } else {
15084                String::new().into()
15085            },
15086        ]
15087    }
15088
15089    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15090        vec!["results".into(), "next_link".into()]
15091    }
15092}
15093
15094#[derive(
15095    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15096)]
15097pub struct CreateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15098    #[serde(default, skip_serializing_if = "Option::is_none")]
15099    pub name: Option<String>,
15100    #[serde(default, skip_serializing_if = "Option::is_none")]
15101    pub field_api_name: Option<String>,
15102}
15103
15104impl std::fmt::Display for CreateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15105    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15106        write!(
15107            f,
15108            "{}",
15109            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15110        )
15111    }
15112}
15113
15114#[cfg(feature = "tabled")]
15115impl tabled::Tabled for CreateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15116    const LENGTH: usize = 2;
15117    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15118        vec![
15119            if let Some(name) = &self.name {
15120                format!("{:?}", name).into()
15121            } else {
15122                String::new().into()
15123            },
15124            if let Some(field_api_name) = &self.field_api_name {
15125                format!("{:?}", field_api_name).into()
15126            } else {
15127                String::new().into()
15128            },
15129        ]
15130    }
15131
15132    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15133        vec!["name".into(), "field_api_name".into()]
15134    }
15135}
15136
15137#[derive(
15138    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15139)]
15140pub struct CreateCustomObjectsCustomObjectApiNameRecordsResponse {
15141    #[serde(default, skip_serializing_if = "Option::is_none")]
15142    pub name: Option<String>,
15143    #[serde(default, skip_serializing_if = "Option::is_none")]
15144    pub compnay_id: Option<String>,
15145    #[serde(default, skip_serializing_if = "Option::is_none")]
15146    pub created_at: Option<String>,
15147    #[serde(default, skip_serializing_if = "Option::is_none")]
15148    pub created_by: Option<String>,
15149    #[serde(default, skip_serializing_if = "Option::is_none")]
15150    pub custom_object: Option<String>,
15151    #[serde(default, skip_serializing_if = "Option::is_none")]
15152    pub external_id: Option<String>,
15153    #[serde(default, skip_serializing_if = "Option::is_none")]
15154    pub id: Option<String>,
15155    #[serde(default, skip_serializing_if = "Option::is_none")]
15156    pub last_modified_by: Option<String>,
15157    #[serde(default, skip_serializing_if = "Option::is_none")]
15158    pub updated_at: Option<String>,
15159    #[serde(default, skip_serializing_if = "Option::is_none")]
15160    pub owner_role: Option<String>,
15161}
15162
15163impl std::fmt::Display for CreateCustomObjectsCustomObjectApiNameRecordsResponse {
15164    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15165        write!(
15166            f,
15167            "{}",
15168            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15169        )
15170    }
15171}
15172
15173#[cfg(feature = "tabled")]
15174impl tabled::Tabled for CreateCustomObjectsCustomObjectApiNameRecordsResponse {
15175    const LENGTH: usize = 10;
15176    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15177        vec![
15178            if let Some(name) = &self.name {
15179                format!("{:?}", name).into()
15180            } else {
15181                String::new().into()
15182            },
15183            if let Some(compnay_id) = &self.compnay_id {
15184                format!("{:?}", compnay_id).into()
15185            } else {
15186                String::new().into()
15187            },
15188            if let Some(created_at) = &self.created_at {
15189                format!("{:?}", created_at).into()
15190            } else {
15191                String::new().into()
15192            },
15193            if let Some(created_by) = &self.created_by {
15194                format!("{:?}", created_by).into()
15195            } else {
15196                String::new().into()
15197            },
15198            if let Some(custom_object) = &self.custom_object {
15199                format!("{:?}", custom_object).into()
15200            } else {
15201                String::new().into()
15202            },
15203            if let Some(external_id) = &self.external_id {
15204                format!("{:?}", external_id).into()
15205            } else {
15206                String::new().into()
15207            },
15208            if let Some(id) = &self.id {
15209                format!("{:?}", id).into()
15210            } else {
15211                String::new().into()
15212            },
15213            if let Some(last_modified_by) = &self.last_modified_by {
15214                format!("{:?}", last_modified_by).into()
15215            } else {
15216                String::new().into()
15217            },
15218            if let Some(updated_at) = &self.updated_at {
15219                format!("{:?}", updated_at).into()
15220            } else {
15221                String::new().into()
15222            },
15223            if let Some(owner_role) = &self.owner_role {
15224                format!("{:?}", owner_role).into()
15225            } else {
15226                String::new().into()
15227            },
15228        ]
15229    }
15230
15231    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15232        vec![
15233            "name".into(),
15234            "compnay_id".into(),
15235            "created_at".into(),
15236            "created_by".into(),
15237            "custom_object".into(),
15238            "external_id".into(),
15239            "id".into(),
15240            "last_modified_by".into(),
15241            "updated_at".into(),
15242            "owner_role".into(),
15243        ]
15244    }
15245}
15246
15247#[derive(
15248    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15249)]
15250pub struct ListByQueryCustomObjectsCustomObjectApiNameRecordsRequestBody {
15251    #[serde(default, skip_serializing_if = "Option::is_none")]
15252    pub query: Option<String>,
15253    #[serde(default, skip_serializing_if = "Option::is_none")]
15254    pub limit: Option<i64>,
15255    #[serde(default, skip_serializing_if = "Option::is_none")]
15256    pub cursor: Option<String>,
15257}
15258
15259impl std::fmt::Display for ListByQueryCustomObjectsCustomObjectApiNameRecordsRequestBody {
15260    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15261        write!(
15262            f,
15263            "{}",
15264            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15265        )
15266    }
15267}
15268
15269#[cfg(feature = "tabled")]
15270impl tabled::Tabled for ListByQueryCustomObjectsCustomObjectApiNameRecordsRequestBody {
15271    const LENGTH: usize = 3;
15272    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15273        vec![
15274            if let Some(query) = &self.query {
15275                format!("{:?}", query).into()
15276            } else {
15277                String::new().into()
15278            },
15279            if let Some(limit) = &self.limit {
15280                format!("{:?}", limit).into()
15281            } else {
15282                String::new().into()
15283            },
15284            if let Some(cursor) = &self.cursor {
15285                format!("{:?}", cursor).into()
15286            } else {
15287                String::new().into()
15288            },
15289        ]
15290    }
15291
15292    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15293        vec!["query".into(), "limit".into(), "cursor".into()]
15294    }
15295}
15296
15297#[derive(
15298    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15299)]
15300pub struct ListByQueryCustomObjectsCustomObjectApiNameRecordsResponse {
15301    pub results: Vec<Results>,
15302    #[serde(default, skip_serializing_if = "Option::is_none")]
15303    pub cursor: Option<String>,
15304}
15305
15306impl std::fmt::Display for ListByQueryCustomObjectsCustomObjectApiNameRecordsResponse {
15307    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15308        write!(
15309            f,
15310            "{}",
15311            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15312        )
15313    }
15314}
15315
15316#[cfg(feature = "tabled")]
15317impl tabled::Tabled for ListByQueryCustomObjectsCustomObjectApiNameRecordsResponse {
15318    const LENGTH: usize = 2;
15319    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15320        vec![
15321            format!("{:?}", self.results).into(),
15322            if let Some(cursor) = &self.cursor {
15323                format!("{:?}", cursor).into()
15324            } else {
15325                String::new().into()
15326            },
15327        ]
15328    }
15329
15330    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15331        vec!["results".into(), "cursor".into()]
15332    }
15333}
15334
15335#[derive(
15336    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15337)]
15338pub struct GetCustomObjectsCustomObjectApiNameRecordsResponse {
15339    #[serde(default, skip_serializing_if = "Option::is_none")]
15340    pub name: Option<String>,
15341    #[serde(default, skip_serializing_if = "Option::is_none")]
15342    pub compnay_id: Option<String>,
15343    #[serde(default, skip_serializing_if = "Option::is_none")]
15344    pub created_at: Option<String>,
15345    #[serde(default, skip_serializing_if = "Option::is_none")]
15346    pub created_by: Option<String>,
15347    #[serde(default, skip_serializing_if = "Option::is_none")]
15348    pub custom_object: Option<String>,
15349    #[serde(default, skip_serializing_if = "Option::is_none")]
15350    pub external_id: Option<String>,
15351    #[serde(default, skip_serializing_if = "Option::is_none")]
15352    pub id: Option<String>,
15353    #[serde(default, skip_serializing_if = "Option::is_none")]
15354    pub last_modified_by: Option<String>,
15355    #[serde(default, skip_serializing_if = "Option::is_none")]
15356    pub updated_at: Option<String>,
15357    #[serde(default, skip_serializing_if = "Option::is_none")]
15358    pub owner_role: Option<String>,
15359}
15360
15361impl std::fmt::Display for GetCustomObjectsCustomObjectApiNameRecordsResponse {
15362    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15363        write!(
15364            f,
15365            "{}",
15366            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15367        )
15368    }
15369}
15370
15371#[cfg(feature = "tabled")]
15372impl tabled::Tabled for GetCustomObjectsCustomObjectApiNameRecordsResponse {
15373    const LENGTH: usize = 10;
15374    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15375        vec![
15376            if let Some(name) = &self.name {
15377                format!("{:?}", name).into()
15378            } else {
15379                String::new().into()
15380            },
15381            if let Some(compnay_id) = &self.compnay_id {
15382                format!("{:?}", compnay_id).into()
15383            } else {
15384                String::new().into()
15385            },
15386            if let Some(created_at) = &self.created_at {
15387                format!("{:?}", created_at).into()
15388            } else {
15389                String::new().into()
15390            },
15391            if let Some(created_by) = &self.created_by {
15392                format!("{:?}", created_by).into()
15393            } else {
15394                String::new().into()
15395            },
15396            if let Some(custom_object) = &self.custom_object {
15397                format!("{:?}", custom_object).into()
15398            } else {
15399                String::new().into()
15400            },
15401            if let Some(external_id) = &self.external_id {
15402                format!("{:?}", external_id).into()
15403            } else {
15404                String::new().into()
15405            },
15406            if let Some(id) = &self.id {
15407                format!("{:?}", id).into()
15408            } else {
15409                String::new().into()
15410            },
15411            if let Some(last_modified_by) = &self.last_modified_by {
15412                format!("{:?}", last_modified_by).into()
15413            } else {
15414                String::new().into()
15415            },
15416            if let Some(updated_at) = &self.updated_at {
15417                format!("{:?}", updated_at).into()
15418            } else {
15419                String::new().into()
15420            },
15421            if let Some(owner_role) = &self.owner_role {
15422                format!("{:?}", owner_role).into()
15423            } else {
15424                String::new().into()
15425            },
15426        ]
15427    }
15428
15429    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15430        vec![
15431            "name".into(),
15432            "compnay_id".into(),
15433            "created_at".into(),
15434            "created_by".into(),
15435            "custom_object".into(),
15436            "external_id".into(),
15437            "id".into(),
15438            "last_modified_by".into(),
15439            "updated_at".into(),
15440            "owner_role".into(),
15441        ]
15442    }
15443}
15444
15445#[derive(
15446    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15447)]
15448pub struct UpdateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15449    #[serde(default, skip_serializing_if = "Option::is_none")]
15450    pub name: Option<String>,
15451    #[serde(default, skip_serializing_if = "Option::is_none")]
15452    pub field_api_name: Option<String>,
15453}
15454
15455impl std::fmt::Display for UpdateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15456    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15457        write!(
15458            f,
15459            "{}",
15460            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15461        )
15462    }
15463}
15464
15465#[cfg(feature = "tabled")]
15466impl tabled::Tabled for UpdateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15467    const LENGTH: usize = 2;
15468    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15469        vec![
15470            if let Some(name) = &self.name {
15471                format!("{:?}", name).into()
15472            } else {
15473                String::new().into()
15474            },
15475            if let Some(field_api_name) = &self.field_api_name {
15476                format!("{:?}", field_api_name).into()
15477            } else {
15478                String::new().into()
15479            },
15480        ]
15481    }
15482
15483    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15484        vec!["name".into(), "field_api_name".into()]
15485    }
15486}
15487
15488#[derive(
15489    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15490)]
15491pub struct UpdateCustomObjectsCustomObjectApiNameRecordsResponse {
15492    #[serde(default, skip_serializing_if = "Option::is_none")]
15493    pub name: Option<String>,
15494    #[serde(default, skip_serializing_if = "Option::is_none")]
15495    pub compnay_id: Option<String>,
15496    #[serde(default, skip_serializing_if = "Option::is_none")]
15497    pub created_at: Option<String>,
15498    #[serde(default, skip_serializing_if = "Option::is_none")]
15499    pub created_by: Option<String>,
15500    #[serde(default, skip_serializing_if = "Option::is_none")]
15501    pub custom_object: Option<String>,
15502    #[serde(default, skip_serializing_if = "Option::is_none")]
15503    pub external_id: Option<String>,
15504    #[serde(default, skip_serializing_if = "Option::is_none")]
15505    pub id: Option<String>,
15506    #[serde(default, skip_serializing_if = "Option::is_none")]
15507    pub last_modified_by: Option<String>,
15508    #[serde(default, skip_serializing_if = "Option::is_none")]
15509    pub updated_at: Option<String>,
15510    #[serde(default, skip_serializing_if = "Option::is_none")]
15511    pub owner_role: Option<String>,
15512}
15513
15514impl std::fmt::Display for UpdateCustomObjectsCustomObjectApiNameRecordsResponse {
15515    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15516        write!(
15517            f,
15518            "{}",
15519            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15520        )
15521    }
15522}
15523
15524#[cfg(feature = "tabled")]
15525impl tabled::Tabled for UpdateCustomObjectsCustomObjectApiNameRecordsResponse {
15526    const LENGTH: usize = 10;
15527    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15528        vec![
15529            if let Some(name) = &self.name {
15530                format!("{:?}", name).into()
15531            } else {
15532                String::new().into()
15533            },
15534            if let Some(compnay_id) = &self.compnay_id {
15535                format!("{:?}", compnay_id).into()
15536            } else {
15537                String::new().into()
15538            },
15539            if let Some(created_at) = &self.created_at {
15540                format!("{:?}", created_at).into()
15541            } else {
15542                String::new().into()
15543            },
15544            if let Some(created_by) = &self.created_by {
15545                format!("{:?}", created_by).into()
15546            } else {
15547                String::new().into()
15548            },
15549            if let Some(custom_object) = &self.custom_object {
15550                format!("{:?}", custom_object).into()
15551            } else {
15552                String::new().into()
15553            },
15554            if let Some(external_id) = &self.external_id {
15555                format!("{:?}", external_id).into()
15556            } else {
15557                String::new().into()
15558            },
15559            if let Some(id) = &self.id {
15560                format!("{:?}", id).into()
15561            } else {
15562                String::new().into()
15563            },
15564            if let Some(last_modified_by) = &self.last_modified_by {
15565                format!("{:?}", last_modified_by).into()
15566            } else {
15567                String::new().into()
15568            },
15569            if let Some(updated_at) = &self.updated_at {
15570                format!("{:?}", updated_at).into()
15571            } else {
15572                String::new().into()
15573            },
15574            if let Some(owner_role) = &self.owner_role {
15575                format!("{:?}", owner_role).into()
15576            } else {
15577                String::new().into()
15578            },
15579        ]
15580    }
15581
15582    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15583        vec![
15584            "name".into(),
15585            "compnay_id".into(),
15586            "created_at".into(),
15587            "created_by".into(),
15588            "custom_object".into(),
15589            "external_id".into(),
15590            "id".into(),
15591            "last_modified_by".into(),
15592            "updated_at".into(),
15593            "owner_role".into(),
15594        ]
15595    }
15596}
15597
15598#[derive(
15599    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15600)]
15601pub struct GetCustomObjectsCustomObjectApiNameRecordsByExternalIdResponse {
15602    #[serde(default, skip_serializing_if = "Option::is_none")]
15603    pub name: Option<String>,
15604    #[serde(default, skip_serializing_if = "Option::is_none")]
15605    pub compnay_id: Option<String>,
15606    #[serde(default, skip_serializing_if = "Option::is_none")]
15607    pub created_at: Option<String>,
15608    #[serde(default, skip_serializing_if = "Option::is_none")]
15609    pub created_by: Option<String>,
15610    #[serde(default, skip_serializing_if = "Option::is_none")]
15611    pub custom_object: Option<String>,
15612    #[serde(default, skip_serializing_if = "Option::is_none")]
15613    pub external_id: Option<String>,
15614    #[serde(default, skip_serializing_if = "Option::is_none")]
15615    pub id: Option<String>,
15616    #[serde(default, skip_serializing_if = "Option::is_none")]
15617    pub last_modified_by: Option<String>,
15618    #[serde(default, skip_serializing_if = "Option::is_none")]
15619    pub updated_at: Option<String>,
15620    #[serde(default, skip_serializing_if = "Option::is_none")]
15621    pub owner_role: Option<String>,
15622}
15623
15624impl std::fmt::Display for GetCustomObjectsCustomObjectApiNameRecordsByExternalIdResponse {
15625    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15626        write!(
15627            f,
15628            "{}",
15629            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15630        )
15631    }
15632}
15633
15634#[cfg(feature = "tabled")]
15635impl tabled::Tabled for GetCustomObjectsCustomObjectApiNameRecordsByExternalIdResponse {
15636    const LENGTH: usize = 10;
15637    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15638        vec![
15639            if let Some(name) = &self.name {
15640                format!("{:?}", name).into()
15641            } else {
15642                String::new().into()
15643            },
15644            if let Some(compnay_id) = &self.compnay_id {
15645                format!("{:?}", compnay_id).into()
15646            } else {
15647                String::new().into()
15648            },
15649            if let Some(created_at) = &self.created_at {
15650                format!("{:?}", created_at).into()
15651            } else {
15652                String::new().into()
15653            },
15654            if let Some(created_by) = &self.created_by {
15655                format!("{:?}", created_by).into()
15656            } else {
15657                String::new().into()
15658            },
15659            if let Some(custom_object) = &self.custom_object {
15660                format!("{:?}", custom_object).into()
15661            } else {
15662                String::new().into()
15663            },
15664            if let Some(external_id) = &self.external_id {
15665                format!("{:?}", external_id).into()
15666            } else {
15667                String::new().into()
15668            },
15669            if let Some(id) = &self.id {
15670                format!("{:?}", id).into()
15671            } else {
15672                String::new().into()
15673            },
15674            if let Some(last_modified_by) = &self.last_modified_by {
15675                format!("{:?}", last_modified_by).into()
15676            } else {
15677                String::new().into()
15678            },
15679            if let Some(updated_at) = &self.updated_at {
15680                format!("{:?}", updated_at).into()
15681            } else {
15682                String::new().into()
15683            },
15684            if let Some(owner_role) = &self.owner_role {
15685                format!("{:?}", owner_role).into()
15686            } else {
15687                String::new().into()
15688            },
15689        ]
15690    }
15691
15692    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15693        vec![
15694            "name".into(),
15695            "compnay_id".into(),
15696            "created_at".into(),
15697            "created_by".into(),
15698            "custom_object".into(),
15699            "external_id".into(),
15700            "id".into(),
15701            "last_modified_by".into(),
15702            "updated_at".into(),
15703            "owner_role".into(),
15704        ]
15705    }
15706}
15707
15708#[derive(
15709    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15710)]
15711pub struct RowsToWrite {
15712    #[serde(default, skip_serializing_if = "Option::is_none")]
15713    pub name: Option<String>,
15714    #[serde(default, skip_serializing_if = "Option::is_none")]
15715    pub field_api_name: Option<String>,
15716}
15717
15718impl std::fmt::Display for RowsToWrite {
15719    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15720        write!(
15721            f,
15722            "{}",
15723            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15724        )
15725    }
15726}
15727
15728#[cfg(feature = "tabled")]
15729impl tabled::Tabled for RowsToWrite {
15730    const LENGTH: usize = 2;
15731    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15732        vec![
15733            if let Some(name) = &self.name {
15734                format!("{:?}", name).into()
15735            } else {
15736                String::new().into()
15737            },
15738            if let Some(field_api_name) = &self.field_api_name {
15739                format!("{:?}", field_api_name).into()
15740            } else {
15741                String::new().into()
15742            },
15743        ]
15744    }
15745
15746    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15747        vec!["name".into(), "field_api_name".into()]
15748    }
15749}
15750
15751#[derive(
15752    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15753)]
15754pub struct BulkCreateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15755    #[serde(default, skip_serializing_if = "Option::is_none")]
15756    pub rows_to_write: Option<Vec<RowsToWrite>>,
15757    #[serde(default, skip_serializing_if = "Option::is_none")]
15758    pub all_or_nothing: Option<bool>,
15759}
15760
15761impl std::fmt::Display for BulkCreateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15762    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15763        write!(
15764            f,
15765            "{}",
15766            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15767        )
15768    }
15769}
15770
15771#[cfg(feature = "tabled")]
15772impl tabled::Tabled for BulkCreateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15773    const LENGTH: usize = 2;
15774    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15775        vec![
15776            if let Some(rows_to_write) = &self.rows_to_write {
15777                format!("{:?}", rows_to_write).into()
15778            } else {
15779                String::new().into()
15780            },
15781            if let Some(all_or_nothing) = &self.all_or_nothing {
15782                format!("{:?}", all_or_nothing).into()
15783            } else {
15784                String::new().into()
15785            },
15786        ]
15787    }
15788
15789    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15790        vec!["rows_to_write".into(), "all_or_nothing".into()]
15791    }
15792}
15793
15794#[derive(
15795    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15796)]
15797pub struct BulkCreateCustomObjectsCustomObjectApiNameRecordsResponse {
15798    #[serde(default, skip_serializing_if = "Option::is_none")]
15799    pub name: Option<String>,
15800    #[serde(default, skip_serializing_if = "Option::is_none")]
15801    pub compnay_id: Option<String>,
15802    #[serde(default, skip_serializing_if = "Option::is_none")]
15803    pub created_at: Option<String>,
15804    #[serde(default, skip_serializing_if = "Option::is_none")]
15805    pub created_by: Option<String>,
15806    #[serde(default, skip_serializing_if = "Option::is_none")]
15807    pub custom_object: Option<String>,
15808    #[serde(default, skip_serializing_if = "Option::is_none")]
15809    pub external_id: Option<String>,
15810    #[serde(default, skip_serializing_if = "Option::is_none")]
15811    pub id: Option<String>,
15812    #[serde(default, skip_serializing_if = "Option::is_none")]
15813    pub last_modified_by: Option<String>,
15814    #[serde(default, skip_serializing_if = "Option::is_none")]
15815    pub updated_at: Option<String>,
15816    #[serde(default, skip_serializing_if = "Option::is_none")]
15817    pub owner_role: Option<String>,
15818}
15819
15820impl std::fmt::Display for BulkCreateCustomObjectsCustomObjectApiNameRecordsResponse {
15821    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15822        write!(
15823            f,
15824            "{}",
15825            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15826        )
15827    }
15828}
15829
15830#[cfg(feature = "tabled")]
15831impl tabled::Tabled for BulkCreateCustomObjectsCustomObjectApiNameRecordsResponse {
15832    const LENGTH: usize = 10;
15833    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15834        vec![
15835            if let Some(name) = &self.name {
15836                format!("{:?}", name).into()
15837            } else {
15838                String::new().into()
15839            },
15840            if let Some(compnay_id) = &self.compnay_id {
15841                format!("{:?}", compnay_id).into()
15842            } else {
15843                String::new().into()
15844            },
15845            if let Some(created_at) = &self.created_at {
15846                format!("{:?}", created_at).into()
15847            } else {
15848                String::new().into()
15849            },
15850            if let Some(created_by) = &self.created_by {
15851                format!("{:?}", created_by).into()
15852            } else {
15853                String::new().into()
15854            },
15855            if let Some(custom_object) = &self.custom_object {
15856                format!("{:?}", custom_object).into()
15857            } else {
15858                String::new().into()
15859            },
15860            if let Some(external_id) = &self.external_id {
15861                format!("{:?}", external_id).into()
15862            } else {
15863                String::new().into()
15864            },
15865            if let Some(id) = &self.id {
15866                format!("{:?}", id).into()
15867            } else {
15868                String::new().into()
15869            },
15870            if let Some(last_modified_by) = &self.last_modified_by {
15871                format!("{:?}", last_modified_by).into()
15872            } else {
15873                String::new().into()
15874            },
15875            if let Some(updated_at) = &self.updated_at {
15876                format!("{:?}", updated_at).into()
15877            } else {
15878                String::new().into()
15879            },
15880            if let Some(owner_role) = &self.owner_role {
15881                format!("{:?}", owner_role).into()
15882            } else {
15883                String::new().into()
15884            },
15885        ]
15886    }
15887
15888    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15889        vec![
15890            "name".into(),
15891            "compnay_id".into(),
15892            "created_at".into(),
15893            "created_by".into(),
15894            "custom_object".into(),
15895            "external_id".into(),
15896            "id".into(),
15897            "last_modified_by".into(),
15898            "updated_at".into(),
15899            "owner_role".into(),
15900        ]
15901    }
15902}
15903
15904#[derive(
15905    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15906)]
15907pub struct BulkDeleteCustomObjectsCustomObjectApiNameRecordsRequestBody {
15908    #[doc = "a list of ids, e.g. [id_1, id_2]."]
15909    #[serde(default, skip_serializing_if = "Option::is_none")]
15910    pub rows_to_delete: Option<String>,
15911    #[serde(default, skip_serializing_if = "Option::is_none")]
15912    pub all_or_nothing: Option<bool>,
15913}
15914
15915impl std::fmt::Display for BulkDeleteCustomObjectsCustomObjectApiNameRecordsRequestBody {
15916    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15917        write!(
15918            f,
15919            "{}",
15920            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15921        )
15922    }
15923}
15924
15925#[cfg(feature = "tabled")]
15926impl tabled::Tabled for BulkDeleteCustomObjectsCustomObjectApiNameRecordsRequestBody {
15927    const LENGTH: usize = 2;
15928    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15929        vec![
15930            if let Some(rows_to_delete) = &self.rows_to_delete {
15931                format!("{:?}", rows_to_delete).into()
15932            } else {
15933                String::new().into()
15934            },
15935            if let Some(all_or_nothing) = &self.all_or_nothing {
15936                format!("{:?}", all_or_nothing).into()
15937            } else {
15938                String::new().into()
15939            },
15940        ]
15941    }
15942
15943    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15944        vec!["rows_to_delete".into(), "all_or_nothing".into()]
15945    }
15946}
15947
15948#[derive(
15949    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15950)]
15951pub struct RowsToUpdate {
15952    #[serde(default, skip_serializing_if = "Option::is_none")]
15953    pub name: Option<String>,
15954    #[serde(default, skip_serializing_if = "Option::is_none")]
15955    pub field_api_name: Option<String>,
15956}
15957
15958impl std::fmt::Display for RowsToUpdate {
15959    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15960        write!(
15961            f,
15962            "{}",
15963            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
15964        )
15965    }
15966}
15967
15968#[cfg(feature = "tabled")]
15969impl tabled::Tabled for RowsToUpdate {
15970    const LENGTH: usize = 2;
15971    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
15972        vec![
15973            if let Some(name) = &self.name {
15974                format!("{:?}", name).into()
15975            } else {
15976                String::new().into()
15977            },
15978            if let Some(field_api_name) = &self.field_api_name {
15979                format!("{:?}", field_api_name).into()
15980            } else {
15981                String::new().into()
15982            },
15983        ]
15984    }
15985
15986    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
15987        vec!["name".into(), "field_api_name".into()]
15988    }
15989}
15990
15991#[derive(
15992    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
15993)]
15994pub struct BulkUpdateCustomObjectsCustomObjectApiNameRecordsRequestBody {
15995    #[serde(default, skip_serializing_if = "Option::is_none")]
15996    pub rows_to_update: Option<Vec<RowsToUpdate>>,
15997    #[serde(default, skip_serializing_if = "Option::is_none")]
15998    pub all_or_nothing: Option<bool>,
15999}
16000
16001impl std::fmt::Display for BulkUpdateCustomObjectsCustomObjectApiNameRecordsRequestBody {
16002    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16003        write!(
16004            f,
16005            "{}",
16006            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16007        )
16008    }
16009}
16010
16011#[cfg(feature = "tabled")]
16012impl tabled::Tabled for BulkUpdateCustomObjectsCustomObjectApiNameRecordsRequestBody {
16013    const LENGTH: usize = 2;
16014    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
16015        vec![
16016            if let Some(rows_to_update) = &self.rows_to_update {
16017                format!("{:?}", rows_to_update).into()
16018            } else {
16019                String::new().into()
16020            },
16021            if let Some(all_or_nothing) = &self.all_or_nothing {
16022                format!("{:?}", all_or_nothing).into()
16023            } else {
16024                String::new().into()
16025            },
16026        ]
16027    }
16028
16029    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
16030        vec!["rows_to_update".into(), "all_or_nothing".into()]
16031    }
16032}
16033
16034#[derive(
16035    serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
16036)]
16037pub struct BulkUpdateCustomObjectsCustomObjectApiNameRecordsResponse {
16038    #[serde(default, skip_serializing_if = "Option::is_none")]
16039    pub name: Option<String>,
16040    #[serde(default, skip_serializing_if = "Option::is_none")]
16041    pub compnay_id: Option<String>,
16042    #[serde(default, skip_serializing_if = "Option::is_none")]
16043    pub created_at: Option<String>,
16044    #[serde(default, skip_serializing_if = "Option::is_none")]
16045    pub created_by: Option<String>,
16046    #[serde(default, skip_serializing_if = "Option::is_none")]
16047    pub custom_object: Option<String>,
16048    #[serde(default, skip_serializing_if = "Option::is_none")]
16049    pub external_id: Option<String>,
16050    #[serde(default, skip_serializing_if = "Option::is_none")]
16051    pub id: Option<String>,
16052    #[serde(default, skip_serializing_if = "Option::is_none")]
16053    pub last_modified_by: Option<String>,
16054    #[serde(default, skip_serializing_if = "Option::is_none")]
16055    pub updated_at: Option<String>,
16056    #[serde(default, skip_serializing_if = "Option::is_none")]
16057    pub owner_role: Option<String>,
16058}
16059
16060impl std::fmt::Display for BulkUpdateCustomObjectsCustomObjectApiNameRecordsResponse {
16061    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16062        write!(
16063            f,
16064            "{}",
16065            serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
16066        )
16067    }
16068}
16069
16070#[cfg(feature = "tabled")]
16071impl tabled::Tabled for BulkUpdateCustomObjectsCustomObjectApiNameRecordsResponse {
16072    const LENGTH: usize = 10;
16073    fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
16074        vec![
16075            if let Some(name) = &self.name {
16076                format!("{:?}", name).into()
16077            } else {
16078                String::new().into()
16079            },
16080            if let Some(compnay_id) = &self.compnay_id {
16081                format!("{:?}", compnay_id).into()
16082            } else {
16083                String::new().into()
16084            },
16085            if let Some(created_at) = &self.created_at {
16086                format!("{:?}", created_at).into()
16087            } else {
16088                String::new().into()
16089            },
16090            if let Some(created_by) = &self.created_by {
16091                format!("{:?}", created_by).into()
16092            } else {
16093                String::new().into()
16094            },
16095            if let Some(custom_object) = &self.custom_object {
16096                format!("{:?}", custom_object).into()
16097            } else {
16098                String::new().into()
16099            },
16100            if let Some(external_id) = &self.external_id {
16101                format!("{:?}", external_id).into()
16102            } else {
16103                String::new().into()
16104            },
16105            if let Some(id) = &self.id {
16106                format!("{:?}", id).into()
16107            } else {
16108                String::new().into()
16109            },
16110            if let Some(last_modified_by) = &self.last_modified_by {
16111                format!("{:?}", last_modified_by).into()
16112            } else {
16113                String::new().into()
16114            },
16115            if let Some(updated_at) = &self.updated_at {
16116                format!("{:?}", updated_at).into()
16117            } else {
16118                String::new().into()
16119            },
16120            if let Some(owner_role) = &self.owner_role {
16121                format!("{:?}", owner_role).into()
16122            } else {
16123                String::new().into()
16124            },
16125        ]
16126    }
16127
16128    fn headers() -> Vec<std::borrow::Cow<'static, str>> {
16129        vec![
16130            "name".into(),
16131            "compnay_id".into(),
16132            "created_at".into(),
16133            "created_by".into(),
16134            "custom_object".into(),
16135            "external_id".into(),
16136            "id".into(),
16137            "last_modified_by".into(),
16138            "updated_at".into(),
16139            "owner_role".into(),
16140        ]
16141    }
16142}