gusto_api/
types.rs

1//! The data types sent to and returned from the API client.
2use schemars::JsonSchema;
3use serde::{Deserialize, Serialize};
4
5/// The representation of an employee in Gusto.
6#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
7pub struct Employee {
8    /**
9     * The representation of an employee in Gusto.
10     */
11    #[serde(
12        default,
13        skip_serializing_if = "crate::utils::zero_f64",
14        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
15    )]
16    pub company_id: f64,
17    /**
18     * The representation of an employee in Gusto.
19     */
20    #[serde(
21        default,
22        skip_serializing_if = "String::is_empty",
23        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
24    )]
25    pub company_uuid: String,
26    /**
27     * The representation of an employee in Gusto.
28     */
29    #[serde(
30        default,
31        skip_serializing_if = "Vec::is_empty",
32        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
33    )]
34    pub custom_fields: Vec<EmployeeCustomField>,
35    #[serde(
36        default,
37        skip_serializing_if = "Option::is_none",
38        deserialize_with = "crate::utils::date_format::deserialize"
39    )]
40    pub date_of_birth: Option<chrono::NaiveDate>,
41    /**
42     * The representation of an employee in Gusto.
43     */
44    #[serde(
45        default,
46        skip_serializing_if = "String::is_empty",
47        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
48    )]
49    pub department: String,
50    /**
51     * The representation of an employee in Gusto.
52     */
53    #[serde(
54        default,
55        skip_serializing_if = "Vec::is_empty",
56        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
57    )]
58    pub eligible_paid_time_off: Vec<PaidTimeOff>,
59    /**
60     * The representation of an employee in Gusto.
61     */
62    #[serde(
63        default,
64        skip_serializing_if = "String::is_empty",
65        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
66    )]
67    pub email: String,
68    /**
69     * The representation of an employee in Gusto.
70     */
71    #[serde(
72        default,
73        skip_serializing_if = "String::is_empty",
74        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
75    )]
76    pub first_name: String,
77    /**
78     * The representation of an employee in Gusto.
79     */
80    #[serde(
81        default,
82        skip_serializing_if = "Vec::is_empty",
83        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
84    )]
85    pub garnishments: Vec<Garnishment>,
86    /**
87     * The representation of an employee in Gusto.
88     */
89    #[serde(
90        default,
91        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
92    )]
93    pub has_ssn: bool,
94    /**
95     * The representation of an employee in Gusto.
96     */
97    #[serde(default, skip_serializing_if = "Option::is_none")]
98    pub home_address: Option<Location>,
99    /**
100     * The representation of an employee in Gusto.
101     */
102    #[serde(
103        default,
104        skip_serializing_if = "crate::utils::zero_f64",
105        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
106    )]
107    pub id: f64,
108    /**
109     * The representation of an employee in Gusto.
110     */
111    #[serde(
112        default,
113        skip_serializing_if = "Vec::is_empty",
114        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
115    )]
116    pub jobs: Vec<Job>,
117    /**
118     * The representation of an employee in Gusto.
119     */
120    #[serde(
121        default,
122        skip_serializing_if = "String::is_empty",
123        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
124    )]
125    pub last_name: String,
126    /**
127     * The representation of an employee in Gusto.
128     */
129    #[serde(
130        default,
131        skip_serializing_if = "crate::utils::zero_f64",
132        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
133    )]
134    pub manager_id: f64,
135    /**
136     * The representation of an employee in Gusto.
137     */
138    #[serde(
139        default,
140        skip_serializing_if = "String::is_empty",
141        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
142    )]
143    pub middle_initial: String,
144    /**
145     * The representation of an employee in Gusto.
146     */
147    #[serde(
148        default,
149        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
150    )]
151    pub onboarded: bool,
152    /**
153     * The representation of an employee in Gusto.
154     */
155    #[serde(
156        default,
157        skip_serializing_if = "String::is_empty",
158        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
159    )]
160    pub phone: String,
161    /**
162     * The representation of an employee in Gusto.
163     */
164    #[serde(
165        default,
166        skip_serializing_if = "String::is_empty",
167        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
168    )]
169    pub preferred_first_name: String,
170    /**
171     * The representation of an employee in Gusto.
172     */
173    #[serde(
174        default,
175        skip_serializing_if = "String::is_empty",
176        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
177    )]
178    pub ssn: String,
179    /**
180     * The representation of an employee in Gusto.
181     */
182    #[serde(
183        default,
184        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
185    )]
186    pub terminated: bool,
187    /**
188     * The representation of an employee in Gusto.
189     */
190    #[serde(
191        default,
192        skip_serializing_if = "Vec::is_empty",
193        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
194    )]
195    pub terminations: Vec<Termination>,
196    /**
197     * The representation of an employee in Gusto.
198     */
199    #[serde(
200        default,
201        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
202    )]
203    pub two_percent_shareholder: bool,
204    /**
205     * The representation of an employee in Gusto.
206     */
207    #[serde(
208        default,
209        skip_serializing_if = "String::is_empty",
210        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
211    )]
212    pub uuid: String,
213    /**
214     * The representation of an employee in Gusto.
215     */
216    #[serde(
217        default,
218        skip_serializing_if = "String::is_empty",
219        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
220    )]
221    pub version: String,
222    /**
223     * The representation of an employee in Gusto.
224     */
225    #[serde(
226        default,
227        skip_serializing_if = "String::is_empty",
228        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
229    )]
230    pub work_email: String,
231}
232
233/// The representation of an address in Gusto.
234#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
235pub struct Location {
236    /**
237     * The representation of an address in Gusto.
238     */
239    #[serde(
240        default,
241        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
242    )]
243    pub active: bool,
244    /**
245     * The representation of an address in Gusto.
246     */
247    #[serde(
248        default,
249        skip_serializing_if = "String::is_empty",
250        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
251    )]
252    pub city: String,
253    /**
254     * The representation of an address in Gusto.
255     */
256    #[serde(
257        default,
258        skip_serializing_if = "crate::utils::zero_i64",
259        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
260    )]
261    pub company_id: i64,
262    /**
263     * The representation of an address in Gusto.
264     */
265    #[serde(
266        default,
267        skip_serializing_if = "String::is_empty",
268        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
269    )]
270    pub country: String,
271    /**
272     * The representation of an address in Gusto.
273     */
274    #[serde(
275        default,
276        skip_serializing_if = "crate::utils::zero_i64",
277        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
278    )]
279    pub employee_id: i64,
280    /**
281     * The representation of an address in Gusto.
282     */
283    #[serde(
284        default,
285        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
286    )]
287    pub filing_address: bool,
288    /**
289     * The representation of an address in Gusto.
290     */
291    #[serde(
292        default,
293        skip_serializing_if = "crate::utils::zero_i64",
294        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
295    )]
296    pub id: i64,
297    /**
298     * The representation of an address in Gusto.
299     */
300    #[serde(
301        default,
302        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
303    )]
304    pub mailing_address: bool,
305    /**
306     * The representation of an address in Gusto.
307     */
308    #[serde(
309        default,
310        skip_serializing_if = "String::is_empty",
311        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
312    )]
313    pub phone_number: String,
314    /**
315     * The representation of an address in Gusto.
316     */
317    #[serde(
318        default,
319        skip_serializing_if = "String::is_empty",
320        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
321    )]
322    pub state: String,
323    /**
324     * The representation of an address in Gusto.
325     */
326    #[serde(
327        default,
328        skip_serializing_if = "String::is_empty",
329        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
330    )]
331    pub street_1: String,
332    /**
333     * The representation of an address in Gusto.
334     */
335    #[serde(
336        default,
337        skip_serializing_if = "String::is_empty",
338        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
339    )]
340    pub street_2: String,
341    /**
342     * The representation of an address in Gusto.
343     */
344    #[serde(
345        default,
346        skip_serializing_if = "String::is_empty",
347        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
348    )]
349    pub version: String,
350    /**
351     * The representation of an address in Gusto.
352     */
353    #[serde(
354        default,
355        skip_serializing_if = "String::is_empty",
356        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
357    )]
358    pub zip: String,
359}
360
361/// The representation of paid time off in Gusto.
362#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
363pub struct PaidTimeOff {
364    /**
365     * The representation of paid time off in Gusto.
366     */
367    #[serde(
368        default,
369        skip_serializing_if = "String::is_empty",
370        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
371    )]
372    pub accrual_balance: String,
373    /**
374     * The representation of paid time off in Gusto.
375     */
376    #[serde(
377        default,
378        skip_serializing_if = "String::is_empty",
379        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
380    )]
381    pub accrual_period: String,
382    /**
383     * The representation of paid time off in Gusto.
384     */
385    #[serde(
386        default,
387        skip_serializing_if = "String::is_empty",
388        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
389    )]
390    pub accrual_rate: String,
391    /**
392     * The representation of paid time off in Gusto.
393     */
394    #[serde(
395        default,
396        skip_serializing_if = "String::is_empty",
397        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
398    )]
399    pub accrual_unit: String,
400    /**
401     * The representation of paid time off in Gusto.
402     */
403    #[serde(
404        default,
405        skip_serializing_if = "String::is_empty",
406        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
407    )]
408    pub maximum_accrual_balance: String,
409    /**
410     * The representation of paid time off in Gusto.
411     */
412    #[serde(
413        default,
414        skip_serializing_if = "String::is_empty",
415        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
416    )]
417    pub name: String,
418    /**
419     * The representation of paid time off in Gusto.
420     */
421    #[serde(
422        default,
423        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
424    )]
425    pub paid_at_termination: bool,
426}
427
428/// Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
429#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
430pub struct Garnishment {
431    /**
432     * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
433     */
434    #[serde(
435        default,
436        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
437    )]
438    pub active: bool,
439    /**
440     * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
441     */
442    #[serde(
443        default,
444        skip_serializing_if = "crate::utils::zero_f64",
445        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
446    )]
447    pub amount: f64,
448    /**
449     * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
450     */
451    #[serde(
452        default,
453        skip_serializing_if = "crate::utils::zero_f64",
454        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
455    )]
456    pub annual_maximum: f64,
457    /**
458     * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
459     */
460    #[serde(
461        default,
462        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
463    )]
464    pub court_ordered: bool,
465    /**
466     * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
467     */
468    #[serde(
469        default,
470        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
471    )]
472    pub deduct_as_percentage: bool,
473    /**
474     * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
475     */
476    #[serde(
477        default,
478        skip_serializing_if = "String::is_empty",
479        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
480    )]
481    pub description: String,
482    /**
483     * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
484     */
485    #[serde(
486        default,
487        skip_serializing_if = "crate::utils::zero_i64",
488        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
489    )]
490    pub employee_id: i64,
491    /**
492     * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
493     */
494    #[serde(
495        default,
496        skip_serializing_if = "crate::utils::zero_i64",
497        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
498    )]
499    pub id: i64,
500    /**
501     * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
502     */
503    #[serde(
504        default,
505        skip_serializing_if = "crate::utils::zero_f64",
506        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
507    )]
508    pub pay_period_maximum: f64,
509    /**
510     * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
511     */
512    #[serde(
513        default,
514        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
515    )]
516    pub recurring: bool,
517    /**
518     * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
519     */
520    #[serde(
521        default,
522        skip_serializing_if = "crate::utils::zero_i64",
523        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
524    )]
525    pub times: i64,
526    /**
527     * Garnishments, or employee deductions, are fixed amounts or percentages deducted from an employee’s pay. They can be deducted a specific number of times or on a recurring basis. Garnishments can also have maximum deductions on a yearly or per-pay-period bases. Common uses for garnishments are court-ordered payments for child support or back taxes. Some companies provide loans to their employees that are repaid via garnishments.
528     */
529    #[serde(
530        default,
531        skip_serializing_if = "String::is_empty",
532        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
533    )]
534    pub version: String,
535}
536
537/// The representation of a termination in Gusto.
538#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
539pub struct Termination {
540    /**
541     * The representation of a termination in Gusto.
542     */
543    #[serde(
544        default,
545        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
546    )]
547    pub active: bool,
548    #[serde(
549        default,
550        skip_serializing_if = "Option::is_none",
551        deserialize_with = "crate::utils::date_format::deserialize"
552    )]
553    pub effective_date: Option<chrono::NaiveDate>,
554    /**
555     * The representation of a termination in Gusto.
556     */
557    #[serde(
558        default,
559        skip_serializing_if = "crate::utils::zero_i64",
560        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
561    )]
562    pub employee_id: i64,
563    /**
564     * The representation of a termination in Gusto.
565     */
566    #[serde(
567        default,
568        skip_serializing_if = "crate::utils::zero_i64",
569        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
570    )]
571    pub id: i64,
572    /**
573     * The representation of a termination in Gusto.
574     */
575    #[serde(
576        default,
577        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
578    )]
579    pub run_termination_payroll: bool,
580    /**
581     * The representation of a termination in Gusto.
582     */
583    #[serde(
584        default,
585        skip_serializing_if = "String::is_empty",
586        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
587    )]
588    pub version: String,
589}
590
591/**
592 * The unit accompanying the compensation rate. If the employee is an owner, rate should be 'Paycheck'.
593 */
594#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
595pub enum PaymentUnit {
596    #[serde(rename = "Hour")]
597    Hour,
598    #[serde(rename = "Month")]
599    Month,
600    #[serde(rename = "Paycheck")]
601    Paycheck,
602    #[serde(rename = "Week")]
603    Week,
604    #[serde(rename = "Year")]
605    Year,
606    #[serde(rename = "")]
607    #[default]
608    Noop,
609    #[serde(other)]
610    FallthroughString,
611}
612
613impl std::fmt::Display for PaymentUnit {
614    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
615        match self {
616            PaymentUnit::Hour => "Hour",
617            PaymentUnit::Month => "Month",
618            PaymentUnit::Paycheck => "Paycheck",
619            PaymentUnit::Week => "Week",
620            PaymentUnit::Year => "Year",
621            PaymentUnit::Noop => "",
622            PaymentUnit::FallthroughString => "*",
623        }
624        .fmt(f)
625    }
626}
627
628impl PaymentUnit {
629    pub fn is_noop(&self) -> bool {
630        matches!(self, PaymentUnit::Noop)
631    }
632}
633
634/**
635 * The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company.
636 */
637#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
638pub enum FlsaStatus {
639    #[serde(rename = "Exempt")]
640    Exempt,
641    #[serde(rename = "Nonexempt")]
642    Nonexempt,
643    #[serde(rename = "Owner")]
644    Owner,
645    #[serde(rename = "Salaried Nonexempt")]
646    SalariedNonexempt,
647    #[serde(rename = "")]
648    #[default]
649    Noop,
650    #[serde(other)]
651    FallthroughString,
652}
653
654impl std::fmt::Display for FlsaStatus {
655    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
656        match self {
657            FlsaStatus::Exempt => "Exempt",
658            FlsaStatus::Nonexempt => "Nonexempt",
659            FlsaStatus::Owner => "Owner",
660            FlsaStatus::SalariedNonexempt => "Salaried Nonexempt",
661            FlsaStatus::Noop => "",
662            FlsaStatus::FallthroughString => "*",
663        }
664        .fmt(f)
665    }
666}
667
668impl FlsaStatus {
669    pub fn is_noop(&self) -> bool {
670        matches!(self, FlsaStatus::Noop)
671    }
672}
673
674/// The representation of compensation in Gusto.
675#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
676pub struct Compensation {
677    #[serde(
678        default,
679        skip_serializing_if = "Option::is_none",
680        deserialize_with = "crate::utils::date_format::deserialize"
681    )]
682    pub effective_date: Option<chrono::NaiveDate>,
683    /**
684     * The representation of compensation in Gusto.
685     */
686    #[serde(default, skip_serializing_if = "Option::is_none")]
687    pub flsa_status: Option<FlsaStatus>,
688    /**
689     * The representation of compensation in Gusto.
690     */
691    #[serde(
692        default,
693        skip_serializing_if = "crate::utils::zero_i64",
694        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
695    )]
696    pub id: i64,
697    /**
698     * The representation of compensation in Gusto.
699     */
700    #[serde(
701        default,
702        skip_serializing_if = "crate::utils::zero_i64",
703        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
704    )]
705    pub job_id: i64,
706    /**
707     * The representation of compensation in Gusto.
708     */
709    #[serde(default, skip_serializing_if = "Option::is_none")]
710    pub payment_unit: Option<PaymentUnit>,
711    /**
712     * The representation of compensation in Gusto.
713     */
714    #[serde(
715        default,
716        skip_serializing_if = "String::is_empty",
717        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
718    )]
719    pub rate: String,
720    /**
721     * The representation of compensation in Gusto.
722     */
723    #[serde(
724        default,
725        skip_serializing_if = "String::is_empty",
726        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
727    )]
728    pub version: String,
729}
730
731#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
732pub struct JobLocation {
733    /**
734     * A unique identifier of the employee in Gusto.
735     */
736    #[serde(
737        default,
738        skip_serializing_if = "String::is_empty",
739        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
740    )]
741    pub city: String,
742    /**
743     * A unique identifier of the employee in Gusto.
744     */
745    #[serde(
746        default,
747        skip_serializing_if = "String::is_empty",
748        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
749    )]
750    pub country: String,
751    /**
752     * The ID of the employee in Gusto.
753     */
754    #[serde(
755        default,
756        skip_serializing_if = "crate::utils::zero_f64",
757        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
758    )]
759    pub id: f64,
760    /**
761     * Whether the employee is terminated.
762     */
763    #[serde(
764        default,
765        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
766    )]
767    pub inactive: bool,
768    /**
769     * A unique identifier of the employee in Gusto.
770     */
771    #[serde(
772        default,
773        skip_serializing_if = "String::is_empty",
774        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
775    )]
776    pub state: String,
777    /**
778     * A unique identifier of the employee in Gusto.
779     */
780    #[serde(
781        default,
782        skip_serializing_if = "String::is_empty",
783        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
784    )]
785    pub street_1: String,
786    /**
787     * A unique identifier of the employee in Gusto.
788     */
789    #[serde(
790        default,
791        skip_serializing_if = "String::is_empty",
792        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
793    )]
794    pub street_2: String,
795    /**
796     * A unique identifier of the employee in Gusto.
797     */
798    #[serde(
799        default,
800        skip_serializing_if = "String::is_empty",
801        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
802    )]
803    pub zip: String,
804}
805
806/// The representation of a job in Gusto.
807#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
808pub struct Job {
809    /**
810     * The representation of a job in Gusto.
811     */
812    #[serde(
813        default,
814        skip_serializing_if = "Vec::is_empty",
815        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
816    )]
817    pub compensations: Vec<Compensation>,
818    /**
819     * The representation of a job in Gusto.
820     */
821    #[serde(
822        default,
823        skip_serializing_if = "crate::utils::zero_i64",
824        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
825    )]
826    pub current_compensation_id: i64,
827    /**
828     * The representation of a job in Gusto.
829     */
830    #[serde(
831        default,
832        skip_serializing_if = "crate::utils::zero_i64",
833        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
834    )]
835    pub employee_id: i64,
836    #[serde(
837        default,
838        skip_serializing_if = "Option::is_none",
839        deserialize_with = "crate::utils::date_format::deserialize"
840    )]
841    pub hire_date: Option<chrono::NaiveDate>,
842    /**
843     * The representation of a job in Gusto.
844     */
845    #[serde(
846        default,
847        skip_serializing_if = "crate::utils::zero_i64",
848        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
849    )]
850    pub id: i64,
851    /**
852     * The representation of a job in Gusto.
853     */
854    #[serde(default, skip_serializing_if = "Option::is_none")]
855    pub location: Option<JobLocation>,
856    /**
857     * The representation of a job in Gusto.
858     */
859    #[serde(
860        default,
861        skip_serializing_if = "crate::utils::zero_i64",
862        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
863    )]
864    pub location_id: i64,
865    /**
866     * The representation of a job in Gusto.
867     */
868    #[serde(
869        default,
870        skip_serializing_if = "String::is_empty",
871        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
872    )]
873    pub payment_unit: String,
874    /**
875     * The representation of a job in Gusto.
876     */
877    #[serde(
878        default,
879        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
880    )]
881    pub primary: bool,
882    /**
883     * The representation of a job in Gusto.
884     */
885    #[serde(
886        default,
887        skip_serializing_if = "String::is_empty",
888        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
889    )]
890    pub rate: String,
891    /**
892     * The representation of a job in Gusto.
893     */
894    #[serde(
895        default,
896        skip_serializing_if = "String::is_empty",
897        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
898    )]
899    pub title: String,
900    /**
901     * The representation of a job in Gusto.
902     */
903    #[serde(
904        default,
905        skip_serializing_if = "String::is_empty",
906        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
907    )]
908    pub version: String,
909}
910
911/// The representation of an admin user in Gusto.
912#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
913pub struct Admin {
914    /**
915     * The representation of an admin user in Gusto.
916     */
917    #[serde(
918        default,
919        skip_serializing_if = "String::is_empty",
920        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
921    )]
922    pub email: String,
923    /**
924     * The representation of an admin user in Gusto.
925     */
926    #[serde(
927        default,
928        skip_serializing_if = "String::is_empty",
929        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
930    )]
931    pub first_name: String,
932    /**
933     * The representation of an admin user in Gusto.
934     */
935    #[serde(
936        default,
937        skip_serializing_if = "String::is_empty",
938        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
939    )]
940    pub last_name: String,
941}
942
943/**
944 * The tax payer type of the company.
945 */
946#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
947pub enum EntityType {
948    #[serde(rename = "Association")]
949    Association,
950    #[serde(rename = "C-Corporation")]
951    CCorporation,
952    #[serde(rename = "Co-ownership")]
953    CoOwnership,
954    #[serde(rename = "General partnership")]
955    GeneralPartnership,
956    #[serde(rename = "Joint venture")]
957    JointVenture,
958    #[serde(rename = "LLC")]
959    Llc,
960    #[serde(rename = "LLP")]
961    Llp,
962    #[serde(rename = "Limited partnership")]
963    LimitedPartnership,
964    #[serde(rename = "Non-Profit")]
965    NonProfit,
966    #[serde(rename = "S-Corporation")]
967    SCorporation,
968    #[serde(rename = "Sole proprietor")]
969    SoleProprietor,
970    #[serde(rename = "Trusteeship")]
971    Trusteeship,
972    #[serde(rename = "")]
973    #[default]
974    Noop,
975    #[serde(other)]
976    FallthroughString,
977}
978
979impl std::fmt::Display for EntityType {
980    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
981        match self {
982            EntityType::Association => "Association",
983            EntityType::CCorporation => "C-Corporation",
984            EntityType::CoOwnership => "Co-ownership",
985            EntityType::GeneralPartnership => "General partnership",
986            EntityType::JointVenture => "Joint venture",
987            EntityType::Llc => "LLC",
988            EntityType::Llp => "LLP",
989            EntityType::LimitedPartnership => "Limited partnership",
990            EntityType::NonProfit => "Non-Profit",
991            EntityType::SCorporation => "S-Corporation",
992            EntityType::SoleProprietor => "Sole proprietor",
993            EntityType::Trusteeship => "Trusteeship",
994            EntityType::Noop => "",
995            EntityType::FallthroughString => "*",
996        }
997        .fmt(f)
998    }
999}
1000
1001impl EntityType {
1002    pub fn is_noop(&self) -> bool {
1003        matches!(self, EntityType::Noop)
1004    }
1005}
1006
1007/**
1008 * The Gusto product tier of the company.
1009 */
1010#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
1011pub enum Tier {
1012    #[serde(rename = "basic")]
1013    Basic,
1014    #[serde(rename = "complete")]
1015    Complete,
1016    #[serde(rename = "concierge")]
1017    Concierge,
1018    #[serde(rename = "contractor_only")]
1019    ContractorOnly,
1020    #[serde(rename = "core")]
1021    Core,
1022    #[serde(rename = "")]
1023    #[default]
1024    Noop,
1025    #[serde(other)]
1026    FallthroughString,
1027}
1028
1029impl std::fmt::Display for Tier {
1030    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1031        match self {
1032            Tier::Basic => "basic",
1033            Tier::Complete => "complete",
1034            Tier::Concierge => "concierge",
1035            Tier::ContractorOnly => "contractor_only",
1036            Tier::Core => "core",
1037            Tier::Noop => "",
1038            Tier::FallthroughString => "*",
1039        }
1040        .fmt(f)
1041    }
1042}
1043
1044impl Tier {
1045    pub fn is_noop(&self) -> bool {
1046        matches!(self, Tier::Noop)
1047    }
1048}
1049
1050/**
1051 * The status of the company in Gusto. "Approved" companies may run payroll with Gusto. "Not Approved" companies may not yet run payroll with Gusto. In order to run payroll, the company may need to complete onboarding or contact support. "Suspended" companies may not run payroll with Gusto. In order to unsuspend their account, the company must contact support.
1052 */
1053#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
1054pub enum CompanyStatus {
1055    #[serde(rename = "Approved")]
1056    Approved,
1057    #[serde(rename = "Not Approved")]
1058    NotApproved,
1059    #[serde(rename = "Suspended")]
1060    Suspended,
1061    #[serde(rename = "")]
1062    #[default]
1063    Noop,
1064    #[serde(other)]
1065    FallthroughString,
1066}
1067
1068impl std::fmt::Display for CompanyStatus {
1069    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1070        match self {
1071            CompanyStatus::Approved => "Approved",
1072            CompanyStatus::NotApproved => "Not Approved",
1073            CompanyStatus::Suspended => "Suspended",
1074            CompanyStatus::Noop => "",
1075            CompanyStatus::FallthroughString => "*",
1076        }
1077        .fmt(f)
1078    }
1079}
1080
1081impl CompanyStatus {
1082    pub fn is_noop(&self) -> bool {
1083        matches!(self, CompanyStatus::Noop)
1084    }
1085}
1086
1087#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1088pub struct Hourly {
1089    #[serde(
1090        default,
1091        skip_serializing_if = "crate::utils::zero_f64",
1092        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
1093    )]
1094    pub multiple: f64,
1095    #[serde(
1096        default,
1097        skip_serializing_if = "String::is_empty",
1098        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1099    )]
1100    pub name: String,
1101}
1102
1103#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1104pub struct Fixed {
1105    #[serde(
1106        default,
1107        skip_serializing_if = "String::is_empty",
1108        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1109    )]
1110    pub name: String,
1111}
1112
1113/// The available company-wide compensation rates for the company.
1114#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1115pub struct Compensations {
1116    /**
1117     * The available company-wide compensation rates for the company.
1118     */
1119    #[serde(
1120        default,
1121        skip_serializing_if = "Vec::is_empty",
1122        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
1123    )]
1124    pub fixed: Vec<Fixed>,
1125    /**
1126     * The available company-wide compensation rates for the company.
1127     */
1128    #[serde(
1129        default,
1130        skip_serializing_if = "Vec::is_empty",
1131        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
1132    )]
1133    pub hourly: Vec<Hourly>,
1134    /**
1135     * The available company-wide compensation rates for the company.
1136     */
1137    #[serde(
1138        default,
1139        skip_serializing_if = "Vec::is_empty",
1140        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
1141    )]
1142    pub paid_time_off: Vec<Fixed>,
1143}
1144
1145#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1146pub struct HomeAddress {
1147    #[serde(
1148        default,
1149        skip_serializing_if = "String::is_empty",
1150        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1151    )]
1152    pub city: String,
1153    #[serde(
1154        default,
1155        skip_serializing_if = "String::is_empty",
1156        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1157    )]
1158    pub country: String,
1159    #[serde(
1160        default,
1161        skip_serializing_if = "String::is_empty",
1162        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1163    )]
1164    pub state: String,
1165    #[serde(
1166        default,
1167        skip_serializing_if = "String::is_empty",
1168        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1169    )]
1170    pub street_1: String,
1171    #[serde(
1172        default,
1173        skip_serializing_if = "String::is_empty",
1174        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1175    )]
1176    pub street_2: String,
1177    #[serde(
1178        default,
1179        skip_serializing_if = "String::is_empty",
1180        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1181    )]
1182    pub zip: String,
1183}
1184
1185/// The primary signatory of the company.
1186#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1187pub struct PrimarySignatory {
1188    /**
1189     * The primary signatory of the company.
1190     */
1191    #[serde(
1192        default,
1193        skip_serializing_if = "String::is_empty",
1194        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1195    )]
1196    pub email: String,
1197    /**
1198     * The primary signatory of the company.
1199     */
1200    #[serde(
1201        default,
1202        skip_serializing_if = "String::is_empty",
1203        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1204    )]
1205    pub first_name: String,
1206    /**
1207     * The primary signatory of the company.
1208     */
1209    #[serde(default, skip_serializing_if = "Option::is_none")]
1210    pub home_address: Option<HomeAddress>,
1211    /**
1212     * The primary signatory of the company.
1213     */
1214    #[serde(
1215        default,
1216        skip_serializing_if = "String::is_empty",
1217        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1218    )]
1219    pub last_name: String,
1220    /**
1221     * The primary signatory of the company.
1222     */
1223    #[serde(
1224        default,
1225        skip_serializing_if = "String::is_empty",
1226        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1227    )]
1228    pub middle_initial: String,
1229    /**
1230     * The primary signatory of the company.
1231     */
1232    #[serde(
1233        default,
1234        skip_serializing_if = "String::is_empty",
1235        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1236    )]
1237    pub phone: String,
1238}
1239
1240/// The primary payroll admin of the company.
1241#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1242pub struct PrimaryPayrollAdmin {
1243    /**
1244     * The primary payroll admin of the company.
1245     */
1246    #[serde(
1247        default,
1248        skip_serializing_if = "String::is_empty",
1249        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1250    )]
1251    pub email: String,
1252    /**
1253     * The primary payroll admin of the company.
1254     */
1255    #[serde(
1256        default,
1257        skip_serializing_if = "String::is_empty",
1258        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1259    )]
1260    pub first_name: String,
1261    /**
1262     * The primary payroll admin of the company.
1263     */
1264    #[serde(
1265        default,
1266        skip_serializing_if = "String::is_empty",
1267        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1268    )]
1269    pub last_name: String,
1270    /**
1271     * The primary payroll admin of the company.
1272     */
1273    #[serde(
1274        default,
1275        skip_serializing_if = "String::is_empty",
1276        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1277    )]
1278    pub phone: String,
1279}
1280
1281/// The representation of a company in Gusto.
1282#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1283pub struct Company {
1284    /**
1285     * The representation of a company in Gusto.
1286     */
1287    #[serde(default, skip_serializing_if = "Option::is_none")]
1288    pub company_status: Option<CompanyStatus>,
1289    /**
1290     * The representation of a company in Gusto.
1291     */
1292    #[serde(default, skip_serializing_if = "Option::is_none")]
1293    pub compensations: Option<Compensations>,
1294    /**
1295     * The representation of a company in Gusto.
1296     */
1297    #[serde(
1298        default,
1299        skip_serializing_if = "String::is_empty",
1300        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1301    )]
1302    pub ein: String,
1303    /**
1304     * The representation of a company in Gusto.
1305     */
1306    #[serde(default, skip_serializing_if = "Option::is_none")]
1307    pub entity_type: Option<EntityType>,
1308    /**
1309     * The representation of a company in Gusto.
1310     */
1311    #[serde(
1312        default,
1313        skip_serializing_if = "crate::utils::zero_f64",
1314        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
1315    )]
1316    pub id: f64,
1317    /**
1318     * The representation of a company in Gusto.
1319     */
1320    #[serde(
1321        default,
1322        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
1323    )]
1324    pub is_suspended: bool,
1325    /**
1326     * The representation of a company in Gusto.
1327     */
1328    #[serde(
1329        default,
1330        skip_serializing_if = "Vec::is_empty",
1331        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
1332    )]
1333    pub locations: Vec<Location>,
1334    /**
1335     * The representation of a company in Gusto.
1336     */
1337    #[serde(
1338        default,
1339        skip_serializing_if = "String::is_empty",
1340        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1341    )]
1342    pub name: String,
1343    /**
1344     * The representation of a company in Gusto.
1345     */
1346    #[serde(default, skip_serializing_if = "Option::is_none")]
1347    pub primary_payroll_admin: Option<PrimaryPayrollAdmin>,
1348    /**
1349     * The representation of a company in Gusto.
1350     */
1351    #[serde(default, skip_serializing_if = "Option::is_none")]
1352    pub primary_signatory: Option<PrimarySignatory>,
1353    /**
1354     * The Gusto product tier of the company.
1355     */
1356    #[serde(default, skip_serializing_if = "Option::is_none")]
1357    pub tier: Option<Tier>,
1358    /**
1359     * The representation of a company in Gusto.
1360     */
1361    #[serde(
1362        default,
1363        skip_serializing_if = "String::is_empty",
1364        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1365    )]
1366    pub trade_name: String,
1367    /**
1368     * The representation of a company in Gusto.
1369     */
1370    #[serde(
1371        default,
1372        skip_serializing_if = "String::is_empty",
1373        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1374    )]
1375    pub uuid: String,
1376}
1377
1378/**
1379 * The contractor's wage type, either "Fixed" or "Hourly".
1380 */
1381#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
1382pub enum WageType {
1383    #[serde(rename = "Fixed")]
1384    Fixed,
1385    #[serde(rename = "Hourly")]
1386    Hourly,
1387    #[serde(rename = "")]
1388    #[default]
1389    Noop,
1390    #[serde(other)]
1391    FallthroughString,
1392}
1393
1394impl std::fmt::Display for WageType {
1395    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1396        match self {
1397            WageType::Fixed => "Fixed",
1398            WageType::Hourly => "Hourly",
1399            WageType::Noop => "",
1400            WageType::FallthroughString => "*",
1401        }
1402        .fmt(f)
1403    }
1404}
1405
1406impl WageType {
1407    pub fn is_noop(&self) -> bool {
1408        matches!(self, WageType::Noop)
1409    }
1410}
1411
1412/**
1413 * The contractor's type, either "Individual" or "Business".
1414 */
1415#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
1416pub enum Type {
1417    #[serde(rename = "Business")]
1418    Business,
1419    #[serde(rename = "Individual")]
1420    Individual,
1421    #[serde(rename = "")]
1422    #[default]
1423    Noop,
1424    #[serde(other)]
1425    FallthroughString,
1426}
1427
1428impl std::fmt::Display for Type {
1429    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1430        match self {
1431            Type::Business => "Business",
1432            Type::Individual => "Individual",
1433            Type::Noop => "",
1434            Type::FallthroughString => "*",
1435        }
1436        .fmt(f)
1437    }
1438}
1439
1440impl Type {
1441    pub fn is_noop(&self) -> bool {
1442        matches!(self, Type::Noop)
1443    }
1444}
1445
1446/// The contractor’s home address.
1447#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1448pub struct Address {
1449    /**
1450     * The contractor’s home address.
1451     */
1452    #[serde(
1453        default,
1454        skip_serializing_if = "String::is_empty",
1455        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1456    )]
1457    pub city: String,
1458    /**
1459     * The contractor’s home address.
1460     */
1461    #[serde(
1462        default,
1463        skip_serializing_if = "String::is_empty",
1464        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1465    )]
1466    pub country: String,
1467    /**
1468     * The contractor’s home address.
1469     */
1470    #[serde(
1471        default,
1472        skip_serializing_if = "String::is_empty",
1473        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1474    )]
1475    pub state: String,
1476    /**
1477     * The contractor’s home address.
1478     */
1479    #[serde(
1480        default,
1481        skip_serializing_if = "String::is_empty",
1482        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1483    )]
1484    pub street_1: String,
1485    /**
1486     * The contractor’s home address.
1487     */
1488    #[serde(
1489        default,
1490        skip_serializing_if = "String::is_empty",
1491        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1492    )]
1493    pub street_2: String,
1494    /**
1495     * The contractor’s home address.
1496     */
1497    #[serde(
1498        default,
1499        skip_serializing_if = "String::is_empty",
1500        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1501    )]
1502    pub zip: String,
1503}
1504
1505/// The representation of a contractor (individual or business) in Gusto.
1506#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1507pub struct Contractor {
1508    /**
1509     * The representation of a contractor (individual or business) in Gusto.
1510     */
1511    #[serde(default, skip_serializing_if = "Option::is_none")]
1512    pub address: Option<Address>,
1513    /**
1514     * The representation of a contractor (individual or business) in Gusto.
1515     */
1516    #[serde(
1517        default,
1518        skip_serializing_if = "String::is_empty",
1519        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1520    )]
1521    pub business_name: String,
1522    /**
1523     * The representation of a contractor (individual or business) in Gusto.
1524     */
1525    #[serde(
1526        default,
1527        skip_serializing_if = "crate::utils::zero_f64",
1528        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
1529    )]
1530    pub company_id: f64,
1531    /**
1532     * The representation of a contractor (individual or business) in Gusto.
1533     */
1534    #[serde(
1535        default,
1536        skip_serializing_if = "String::is_empty",
1537        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1538    )]
1539    pub ein: String,
1540    /**
1541     * The representation of a contractor (individual or business) in Gusto.
1542     */
1543    #[serde(
1544        default,
1545        skip_serializing_if = "String::is_empty",
1546        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1547    )]
1548    pub email: String,
1549    /**
1550     * The representation of a contractor (individual or business) in Gusto.
1551     */
1552    #[serde(
1553        default,
1554        skip_serializing_if = "String::is_empty",
1555        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1556    )]
1557    pub first_name: String,
1558    /**
1559     * The representation of a contractor (individual or business) in Gusto.
1560     */
1561    #[serde(
1562        default,
1563        skip_serializing_if = "String::is_empty",
1564        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1565    )]
1566    pub hourly_rate: String,
1567    /**
1568     * The representation of a contractor (individual or business) in Gusto.
1569     */
1570    #[serde(
1571        default,
1572        skip_serializing_if = "crate::utils::zero_f64",
1573        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
1574    )]
1575    pub id: f64,
1576    /**
1577     * The representation of a contractor (individual or business) in Gusto.
1578     */
1579    #[serde(
1580        default,
1581        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
1582    )]
1583    pub is_active: bool,
1584    /**
1585     * The representation of a contractor (individual or business) in Gusto.
1586     */
1587    #[serde(
1588        default,
1589        skip_serializing_if = "String::is_empty",
1590        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1591    )]
1592    pub last_name: String,
1593    /**
1594     * The representation of a contractor (individual or business) in Gusto.
1595     */
1596    #[serde(
1597        default,
1598        skip_serializing_if = "String::is_empty",
1599        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1600    )]
1601    pub middle_initial: String,
1602    /**
1603     * The representation of a contractor (individual or business) in Gusto.
1604     */
1605    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
1606    pub type_: Option<Type>,
1607    /**
1608     * The representation of a contractor (individual or business) in Gusto.
1609     */
1610    #[serde(
1611        default,
1612        skip_serializing_if = "String::is_empty",
1613        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1614    )]
1615    pub version: String,
1616    /**
1617     * The representation of a contractor (individual or business) in Gusto.
1618     */
1619    #[serde(default, skip_serializing_if = "Option::is_none")]
1620    pub wage_type: Option<WageType>,
1621}
1622
1623/**
1624 * The payment method.
1625 */
1626#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
1627pub enum PaymentMethod {
1628    #[serde(rename = "Check")]
1629    Check,
1630    #[serde(rename = "Correction Payment")]
1631    CorrectionPayment,
1632    #[serde(rename = "Direct Deposit")]
1633    DirectDeposit,
1634    #[serde(rename = "Historical Payment")]
1635    HistoricalPayment,
1636    #[serde(rename = "")]
1637    #[default]
1638    Noop,
1639    #[serde(other)]
1640    FallthroughString,
1641}
1642
1643impl std::fmt::Display for PaymentMethod {
1644    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1645        match self {
1646            PaymentMethod::Check => "Check",
1647            PaymentMethod::CorrectionPayment => "Correction Payment",
1648            PaymentMethod::DirectDeposit => "Direct Deposit",
1649            PaymentMethod::HistoricalPayment => "Historical Payment",
1650            PaymentMethod::Noop => "",
1651            PaymentMethod::FallthroughString => "*",
1652        }
1653        .fmt(f)
1654    }
1655}
1656
1657impl PaymentMethod {
1658    pub fn is_noop(&self) -> bool {
1659        matches!(self, PaymentMethod::Noop)
1660    }
1661}
1662
1663/// The representation of a single contractor payment.
1664#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1665pub struct ContractorPayment {
1666    /**
1667     * The representation of a single contractor payment.
1668     */
1669    #[serde(
1670        default,
1671        skip_serializing_if = "String::is_empty",
1672        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1673    )]
1674    pub bonus: String,
1675    /**
1676     * The representation of a single contractor payment.
1677     */
1678    #[serde(
1679        default,
1680        skip_serializing_if = "crate::utils::zero_f64",
1681        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
1682    )]
1683    pub contractor_id: f64,
1684    /**
1685     * The representation of a single contractor payment.
1686     */
1687    #[serde(
1688        default,
1689        skip_serializing_if = "String::is_empty",
1690        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1691    )]
1692    pub date: String,
1693    /**
1694     * The representation of a single contractor payment.
1695     */
1696    #[serde(
1697        default,
1698        skip_serializing_if = "String::is_empty",
1699        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1700    )]
1701    pub hourly_rate: String,
1702    /**
1703     * The representation of a single contractor payment.
1704     */
1705    #[serde(
1706        default,
1707        skip_serializing_if = "String::is_empty",
1708        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1709    )]
1710    pub hours: String,
1711    /**
1712     * The representation of a single contractor payment.
1713     */
1714    #[serde(default, skip_serializing_if = "Option::is_none")]
1715    pub payment_method: Option<PaymentMethod>,
1716    /**
1717     * The representation of a single contractor payment.
1718     */
1719    #[serde(
1720        default,
1721        skip_serializing_if = "String::is_empty",
1722        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1723    )]
1724    pub reimbursement: String,
1725    /**
1726     * The representation of a single contractor payment.
1727     */
1728    #[serde(
1729        default,
1730        skip_serializing_if = "String::is_empty",
1731        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1732    )]
1733    pub uuid: String,
1734    /**
1735     * The representation of a single contractor payment.
1736     */
1737    #[serde(
1738        default,
1739        skip_serializing_if = "String::is_empty",
1740        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1741    )]
1742    pub wage: String,
1743    /**
1744     * The representation of a single contractor payment.
1745     */
1746    #[serde(
1747        default,
1748        skip_serializing_if = "String::is_empty",
1749        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1750    )]
1751    pub wage_total: String,
1752    /**
1753     * The representation of a single contractor payment.
1754     */
1755    #[serde(default, skip_serializing_if = "Option::is_none")]
1756    pub wage_type: Option<WageType>,
1757}
1758
1759/// The wage and reimbursement totals for all contractor payments within a given time period.
1760#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1761pub struct Total {
1762    /**
1763     * The wage and reimbursement totals for all contractor payments within a given time period.
1764     */
1765    #[serde(
1766        default,
1767        skip_serializing_if = "String::is_empty",
1768        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1769    )]
1770    pub reimbursements: String,
1771    /**
1772     * The wage and reimbursement totals for all contractor payments within a given time period.
1773     */
1774    #[serde(
1775        default,
1776        skip_serializing_if = "String::is_empty",
1777        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1778    )]
1779    pub wages: String,
1780}
1781
1782///
1783#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1784pub struct ContractorPayments {
1785    /**
1786     *
1787     */
1788    #[serde(
1789        default,
1790        skip_serializing_if = "crate::utils::zero_f64",
1791        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
1792    )]
1793    pub contractor_id: f64,
1794    /**
1795     *
1796     */
1797    #[serde(
1798        default,
1799        skip_serializing_if = "Vec::is_empty",
1800        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
1801    )]
1802    pub payments: Vec<ContractorPayment>,
1803    /**
1804     *
1805     */
1806    #[serde(
1807        default,
1808        skip_serializing_if = "String::is_empty",
1809        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1810    )]
1811    pub reimbursement_total: String,
1812    /**
1813     *
1814     */
1815    #[serde(
1816        default,
1817        skip_serializing_if = "String::is_empty",
1818        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1819    )]
1820    pub wage_total: String,
1821}
1822
1823/// The representation of the summary of contractor payments for a given company in a given time period.
1824#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1825pub struct ContractorPaymentSummary {
1826    /**
1827     * The representation of the summary of contractor payments for a given company in a given time period.
1828     */
1829    #[serde(
1830        default,
1831        skip_serializing_if = "Vec::is_empty",
1832        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
1833    )]
1834    pub contractor_payments: Vec<ContractorPayments>,
1835    /**
1836     * The representation of the summary of contractor payments for a given company in a given time period.
1837     */
1838    #[serde(default, skip_serializing_if = "Option::is_none")]
1839    pub total: Option<Total>,
1840}
1841
1842/**
1843 * The status of the time off request.
1844 */
1845#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
1846pub enum Status {
1847    #[serde(rename = "approved")]
1848    Approved,
1849    #[serde(rename = "denied")]
1850    Denied,
1851    #[serde(rename = "pending")]
1852    Pending,
1853    #[serde(rename = "")]
1854    #[default]
1855    Noop,
1856    #[serde(other)]
1857    FallthroughString,
1858}
1859
1860impl std::fmt::Display for Status {
1861    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1862        match self {
1863            Status::Approved => "approved",
1864            Status::Denied => "denied",
1865            Status::Pending => "pending",
1866            Status::Noop => "",
1867            Status::FallthroughString => "*",
1868        }
1869        .fmt(f)
1870    }
1871}
1872
1873impl Status {
1874    pub fn is_noop(&self) -> bool {
1875        matches!(self, Status::Noop)
1876    }
1877}
1878
1879/**
1880 * The type of time off request.
1881 */
1882#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
1883pub enum RequestType {
1884    #[serde(rename = "sick")]
1885    Sick,
1886    #[serde(rename = "vacation")]
1887    Vacation,
1888    #[serde(rename = "")]
1889    #[default]
1890    Noop,
1891    #[serde(other)]
1892    FallthroughString,
1893}
1894
1895impl std::fmt::Display for RequestType {
1896    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1897        match self {
1898            RequestType::Sick => "sick",
1899            RequestType::Vacation => "vacation",
1900            RequestType::Noop => "",
1901            RequestType::FallthroughString => "*",
1902        }
1903        .fmt(f)
1904    }
1905}
1906
1907impl RequestType {
1908    pub fn is_noop(&self) -> bool {
1909        matches!(self, RequestType::Noop)
1910    }
1911}
1912
1913/// An object that represents the days in the time off request. The keys of the object are the dates, formatted as a YYYY-MM-DD string. The values of the object are the number of hours requested off for each day, formatted as a string representation of a numeric decimal to the thousands place.
1914#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1915pub struct Days {}
1916
1917///
1918#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1919pub struct TimeOffRequestEmployee {
1920    /**
1921     *
1922     */
1923    #[serde(
1924        default,
1925        skip_serializing_if = "String::is_empty",
1926        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1927    )]
1928    pub full_name: String,
1929    /**
1930     *
1931     */
1932    #[serde(
1933        default,
1934        skip_serializing_if = "String::is_empty",
1935        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1936    )]
1937    pub id: String,
1938}
1939
1940///
1941#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1942pub struct Initiator {
1943    /**
1944     *
1945     */
1946    #[serde(
1947        default,
1948        skip_serializing_if = "String::is_empty",
1949        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1950    )]
1951    pub full_name: String,
1952    /**
1953     *
1954     */
1955    #[serde(
1956        default,
1957        skip_serializing_if = "String::is_empty",
1958        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1959    )]
1960    pub id: String,
1961}
1962
1963/// This value will be null if the request has not been approved.
1964#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1965pub struct Approver {
1966    /**
1967     * This value will be null if the request has not been approved.
1968     */
1969    #[serde(
1970        default,
1971        skip_serializing_if = "String::is_empty",
1972        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1973    )]
1974    pub full_name: String,
1975    /**
1976     * This value will be null if the request has not been approved.
1977     */
1978    #[serde(
1979        default,
1980        skip_serializing_if = "String::is_empty",
1981        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
1982    )]
1983    pub id: String,
1984}
1985
1986/// The representation of a time off request.
1987#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
1988pub struct TimeOffRequest {
1989    /**
1990     * This value will be null if the request has not been approved.
1991     */
1992    #[serde(default, skip_serializing_if = "Option::is_none")]
1993    pub approver: Option<Approver>,
1994    /**
1995     * The representation of a time off request.
1996     */
1997    #[serde(default, skip_serializing_if = "Option::is_none")]
1998    pub days: Option<Days>,
1999    /**
2000     * The representation of a time off request.
2001     */
2002    #[serde(default, skip_serializing_if = "Option::is_none")]
2003    pub employee: Option<TimeOffRequestEmployee>,
2004    /**
2005     * The representation of a time off request.
2006     */
2007    #[serde(
2008        default,
2009        skip_serializing_if = "String::is_empty",
2010        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2011    )]
2012    pub employee_note: String,
2013    /**
2014     * The representation of a time off request.
2015     */
2016    #[serde(
2017        default,
2018        skip_serializing_if = "String::is_empty",
2019        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2020    )]
2021    pub employer_note: String,
2022    /**
2023     * The representation of a time off request.
2024     */
2025    #[serde(
2026        default,
2027        skip_serializing_if = "crate::utils::zero_i64",
2028        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
2029    )]
2030    pub id: i64,
2031    /**
2032     *
2033     */
2034    #[serde(default, skip_serializing_if = "Option::is_none")]
2035    pub initiator: Option<Initiator>,
2036    /**
2037     * The representation of a time off request.
2038     */
2039    #[serde(default, skip_serializing_if = "Option::is_none")]
2040    pub request_type: Option<RequestType>,
2041    /**
2042     * The representation of a time off request.
2043     */
2044    #[serde(default, skip_serializing_if = "Option::is_none")]
2045    pub status: Option<Status>,
2046}
2047
2048#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2049pub struct Companies {
2050    #[serde(
2051        default,
2052        skip_serializing_if = "crate::utils::zero_f64",
2053        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
2054    )]
2055    pub id: f64,
2056    #[serde(
2057        default,
2058        skip_serializing_if = "Vec::is_empty",
2059        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
2060    )]
2061    pub locations: Vec<Location>,
2062    #[serde(
2063        default,
2064        skip_serializing_if = "String::is_empty",
2065        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2066    )]
2067    pub name: String,
2068    #[serde(
2069        default,
2070        skip_serializing_if = "String::is_empty",
2071        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2072    )]
2073    pub trade_name: String,
2074}
2075
2076#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2077pub struct PayrollAdmin {
2078    #[serde(
2079        default,
2080        skip_serializing_if = "Vec::is_empty",
2081        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
2082    )]
2083    pub companies: Vec<Companies>,
2084}
2085
2086/// An object containing each of the user's permissions.
2087#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2088pub struct Roles {
2089    /**
2090     * An object containing each of the user's permissions.
2091     */
2092    #[serde(default, skip_serializing_if = "Option::is_none")]
2093    pub payroll_admin: Option<PayrollAdmin>,
2094}
2095
2096///
2097#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2098pub struct CurrentUser {
2099    /**
2100     *
2101     */
2102    #[serde(
2103        default,
2104        skip_serializing_if = "String::is_empty",
2105        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2106    )]
2107    pub email: String,
2108    /**
2109     *
2110     */
2111    #[serde(
2112        default,
2113        skip_serializing_if = "crate::utils::zero_f64",
2114        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
2115    )]
2116    pub id: f64,
2117    /**
2118     *
2119     */
2120    #[serde(default, skip_serializing_if = "Option::is_none")]
2121    pub roles: Option<Roles>,
2122}
2123
2124#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
2125pub enum Frequency {
2126    #[serde(rename = "Every other week")]
2127    EveryOtherWeek,
2128    #[serde(rename = "Every week")]
2129    EveryWeek,
2130    #[serde(rename = "Monthly")]
2131    Monthly,
2132    #[serde(rename = "Twice per month")]
2133    TwicePerMonth,
2134    #[serde(rename = "")]
2135    #[default]
2136    Noop,
2137    #[serde(other)]
2138    FallthroughString,
2139}
2140
2141impl std::fmt::Display for Frequency {
2142    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2143        match self {
2144            Frequency::EveryOtherWeek => "Every other week",
2145            Frequency::EveryWeek => "Every week",
2146            Frequency::Monthly => "Monthly",
2147            Frequency::TwicePerMonth => "Twice per month",
2148            Frequency::Noop => "",
2149            Frequency::FallthroughString => "*",
2150        }
2151        .fmt(f)
2152    }
2153}
2154
2155impl Frequency {
2156    pub fn is_noop(&self) -> bool {
2157        matches!(self, Frequency::Noop)
2158    }
2159}
2160
2161/// The representation of a pay schedule.
2162#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2163pub struct PaySchedule {
2164    #[serde(
2165        default,
2166        skip_serializing_if = "Option::is_none",
2167        deserialize_with = "crate::utils::date_format::deserialize"
2168    )]
2169    pub anchor_pay_date: Option<chrono::NaiveDate>,
2170    /**
2171     * The representation of a pay schedule.
2172     */
2173    #[serde(
2174        default,
2175        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2176    )]
2177    pub auto_pilot: bool,
2178    /**
2179     * The representation of a pay schedule.
2180     */
2181    #[serde(
2182        default,
2183        skip_serializing_if = "crate::utils::zero_i64",
2184        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
2185    )]
2186    pub day_1: i64,
2187    /**
2188     * The representation of a pay schedule.
2189     */
2190    #[serde(
2191        default,
2192        skip_serializing_if = "crate::utils::zero_i64",
2193        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
2194    )]
2195    pub day_2: i64,
2196    /**
2197     * The representation of a pay schedule.
2198     */
2199    #[serde(default, skip_serializing_if = "Option::is_none")]
2200    pub frequency: Option<Frequency>,
2201    /**
2202     * The representation of a pay schedule.
2203     */
2204    #[serde(
2205        default,
2206        skip_serializing_if = "crate::utils::zero_i64",
2207        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
2208    )]
2209    pub id: i64,
2210    /**
2211     * The representation of a pay schedule.
2212     */
2213    #[serde(
2214        default,
2215        skip_serializing_if = "String::is_empty",
2216        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2217    )]
2218    pub name: String,
2219    /**
2220     * The representation of a pay schedule.
2221     */
2222    #[serde(
2223        default,
2224        skip_serializing_if = "String::is_empty",
2225        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2226    )]
2227    pub uuid: String,
2228}
2229
2230/**
2231 * Bank account type
2232 */
2233#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
2234pub enum AccountType {
2235    #[serde(rename = "Checking")]
2236    Checking,
2237    #[serde(rename = "Savings")]
2238    Savings,
2239    #[serde(rename = "")]
2240    #[default]
2241    Noop,
2242    #[serde(other)]
2243    FallthroughString,
2244}
2245
2246impl std::fmt::Display for AccountType {
2247    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2248        match self {
2249            AccountType::Checking => "Checking",
2250            AccountType::Savings => "Savings",
2251            AccountType::Noop => "",
2252            AccountType::FallthroughString => "*",
2253        }
2254        .fmt(f)
2255    }
2256}
2257
2258impl AccountType {
2259    pub fn is_noop(&self) -> bool {
2260        matches!(self, AccountType::Noop)
2261    }
2262}
2263
2264/**
2265 * The verification status of the bank account.
2266 *   
2267 *   'awaiting_deposits' means the bank account is just created and money is being transferred.
2268 *   'ready_for_verification' means the micro-deposits are completed and the verification process can begin by using the verify endpoint.
2269 *   'verified' means the bank account is verified.
2270 */
2271#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
2272pub enum VerificationStatus {
2273    #[serde(rename = "awaiting_deposits")]
2274    AwaitingDeposits,
2275    #[serde(rename = "ready_for_verification")]
2276    ReadyForVerification,
2277    #[serde(rename = "verified")]
2278    Verified,
2279    #[serde(rename = "")]
2280    #[default]
2281    Noop,
2282    #[serde(other)]
2283    FallthroughString,
2284}
2285
2286impl std::fmt::Display for VerificationStatus {
2287    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2288        match self {
2289            VerificationStatus::AwaitingDeposits => "awaiting_deposits",
2290            VerificationStatus::ReadyForVerification => "ready_for_verification",
2291            VerificationStatus::Verified => "verified",
2292            VerificationStatus::Noop => "",
2293            VerificationStatus::FallthroughString => "*",
2294        }
2295        .fmt(f)
2296    }
2297}
2298
2299impl VerificationStatus {
2300    pub fn is_noop(&self) -> bool {
2301        matches!(self, VerificationStatus::Noop)
2302    }
2303}
2304
2305/// The company bank account
2306#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2307pub struct CompanyBankAccount {
2308    /**
2309     * The company bank account
2310     */
2311    #[serde(default, skip_serializing_if = "Option::is_none")]
2312    pub account_type: Option<AccountType>,
2313    /**
2314     * The company bank account
2315     */
2316    #[serde(
2317        default,
2318        skip_serializing_if = "String::is_empty",
2319        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2320    )]
2321    pub company_uuid: String,
2322    /**
2323     * The company bank account
2324     */
2325    #[serde(
2326        default,
2327        skip_serializing_if = "String::is_empty",
2328        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2329    )]
2330    pub hidden_account_number: String,
2331    /**
2332     * The company bank account
2333     */
2334    #[serde(
2335        default,
2336        skip_serializing_if = "String::is_empty",
2337        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2338    )]
2339    pub routing_number: String,
2340    /**
2341     * The company bank account
2342     */
2343    #[serde(
2344        default,
2345        skip_serializing_if = "String::is_empty",
2346        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2347    )]
2348    pub uuid: String,
2349    /**
2350     * The company bank account
2351     */
2352    #[serde(default, skip_serializing_if = "Option::is_none")]
2353    pub verification_status: Option<VerificationStatus>,
2354}
2355
2356///
2357#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2358pub struct SupportedBenefit {
2359    /**
2360     *
2361     */
2362    #[serde(
2363        default,
2364        skip_serializing_if = "String::is_empty",
2365        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2366    )]
2367    pub description: String,
2368    /**
2369     *
2370     */
2371    #[serde(
2372        default,
2373        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2374    )]
2375    pub healthcare: bool,
2376    /**
2377     *
2378     */
2379    #[serde(
2380        default,
2381        skip_serializing_if = "crate::utils::zero_f64",
2382        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
2383    )]
2384    pub id: f64,
2385    /**
2386     *
2387     */
2388    #[serde(
2389        default,
2390        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2391    )]
2392    pub imputed: bool,
2393    /**
2394     *
2395     */
2396    #[serde(
2397        default,
2398        skip_serializing_if = "String::is_empty",
2399        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2400    )]
2401    pub name: String,
2402    /**
2403     *
2404     */
2405    #[serde(
2406        default,
2407        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2408    )]
2409    pub posttax: bool,
2410    /**
2411     *
2412     */
2413    #[serde(
2414        default,
2415        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2416    )]
2417    pub pretax: bool,
2418    /**
2419     *
2420     */
2421    #[serde(
2422        default,
2423        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2424    )]
2425    pub retirement: bool,
2426    /**
2427     *
2428     */
2429    #[serde(
2430        default,
2431        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2432    )]
2433    pub yearly_limit: bool,
2434}
2435
2436/// The representation of a company benefit.
2437#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2438pub struct CompanyBenefit {
2439    /**
2440     * The representation of a company benefit.
2441     */
2442    #[serde(
2443        default,
2444        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2445    )]
2446    pub active: bool,
2447    /**
2448     * The representation of a company benefit.
2449     */
2450    #[serde(
2451        default,
2452        skip_serializing_if = "crate::utils::zero_f64",
2453        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
2454    )]
2455    pub benefit_id: f64,
2456    /**
2457     * The representation of a company benefit.
2458     */
2459    #[serde(
2460        default,
2461        skip_serializing_if = "crate::utils::zero_f64",
2462        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
2463    )]
2464    pub company_id: f64,
2465    /**
2466     * The representation of a company benefit.
2467     */
2468    #[serde(
2469        default,
2470        skip_serializing_if = "String::is_empty",
2471        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2472    )]
2473    pub description: String,
2474    /**
2475     * The representation of a company benefit.
2476     */
2477    #[serde(
2478        default,
2479        skip_serializing_if = "crate::utils::zero_f64",
2480        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
2481    )]
2482    pub id: f64,
2483    /**
2484     * The representation of a company benefit.
2485     */
2486    #[serde(
2487        default,
2488        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize",
2489        rename = "responsible_for_employee_w2"
2490    )]
2491    pub responsible_for_employee_w_2: bool,
2492    /**
2493     * The representation of a company benefit.
2494     */
2495    #[serde(
2496        default,
2497        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2498    )]
2499    pub responsible_for_employer_taxes: bool,
2500    /**
2501     * The representation of a company benefit.
2502     */
2503    #[serde(
2504        default,
2505        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2506    )]
2507    pub supports_percentage_amounts: bool,
2508    /**
2509     * The representation of a company benefit.
2510     */
2511    #[serde(
2512        default,
2513        skip_serializing_if = "String::is_empty",
2514        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2515    )]
2516    pub version: String,
2517}
2518
2519///
2520#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2521pub struct EarningType {
2522    /**
2523     *
2524     */
2525    #[serde(
2526        default,
2527        skip_serializing_if = "String::is_empty",
2528        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2529    )]
2530    pub name: String,
2531    /**
2532     *
2533     */
2534    #[serde(
2535        default,
2536        skip_serializing_if = "String::is_empty",
2537        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2538    )]
2539    pub uuid: String,
2540}
2541
2542/**
2543 * Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not "unset", coverage amount and coverage salary multiplier are ignored.
2544 */
2545#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
2546pub enum DeductionReducesTaxableIncome {
2547    #[serde(rename = "does_not_reduce_taxable_income")]
2548    DoesNotReduceTaxableIncome,
2549    #[serde(rename = "reduces_taxable_income")]
2550    ReducesTaxableIncome,
2551    #[serde(rename = "unset")]
2552    #[default]
2553    Unset,
2554    #[serde(other)]
2555    FallthroughString,
2556}
2557
2558impl std::fmt::Display for DeductionReducesTaxableIncome {
2559    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2560        match self {
2561            DeductionReducesTaxableIncome::DoesNotReduceTaxableIncome => {
2562                "does_not_reduce_taxable_income"
2563            }
2564            DeductionReducesTaxableIncome::ReducesTaxableIncome => "reduces_taxable_income",
2565            DeductionReducesTaxableIncome::Unset => "unset",
2566            DeductionReducesTaxableIncome::FallthroughString => "*",
2567        }
2568        .fmt(f)
2569    }
2570}
2571
2572/// The representation of an employee benefit.
2573#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2574pub struct EmployeeBenefit {
2575    /**
2576     * The representation of an employee benefit.
2577     */
2578    #[serde(
2579        default,
2580        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2581    )]
2582    pub active: bool,
2583    /**
2584     * The representation of an employee benefit.
2585     */
2586    #[serde(
2587        default,
2588        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2589    )]
2590    pub catch_up: bool,
2591    /**
2592     * The representation of an employee benefit.
2593     */
2594    #[serde(
2595        default,
2596        skip_serializing_if = "crate::utils::zero_f64",
2597        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
2598    )]
2599    pub company_benefit_id: f64,
2600    /**
2601     * The representation of an employee benefit.
2602     */
2603    #[serde(
2604        default,
2605        skip_serializing_if = "String::is_empty",
2606        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2607    )]
2608    pub company_contribution: String,
2609    /**
2610     * The representation of an employee benefit.
2611     */
2612    #[serde(
2613        default,
2614        skip_serializing_if = "String::is_empty",
2615        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2616    )]
2617    pub company_contribution_annual_maximum: String,
2618    /**
2619     * The representation of an employee benefit.
2620     */
2621    #[serde(
2622        default,
2623        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2624    )]
2625    pub contribute_as_percentage: bool,
2626    /**
2627     * The representation of an employee benefit.
2628     */
2629    #[serde(
2630        default,
2631        skip_serializing_if = "String::is_empty",
2632        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2633    )]
2634    pub coverage_amount: String,
2635    /**
2636     * The representation of an employee benefit.
2637     */
2638    #[serde(
2639        default,
2640        skip_serializing_if = "String::is_empty",
2641        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2642    )]
2643    pub coverage_salary_multiplier: String,
2644    /**
2645     * The representation of an employee benefit.
2646     */
2647    #[serde(
2648        default,
2649        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2650    )]
2651    pub deduct_as_percentage: bool,
2652    /**
2653     * Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not "unset", coverage amount and coverage salary multiplier are ignored.
2654     */
2655    #[serde(default, skip_serializing_if = "Option::is_none")]
2656    pub deduction_reduces_taxable_income: Option<DeductionReducesTaxableIncome>,
2657    /**
2658     * The representation of an employee benefit.
2659     */
2660    #[serde(
2661        default,
2662        skip_serializing_if = "String::is_empty",
2663        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2664    )]
2665    pub employee_deduction: String,
2666    /**
2667     * The representation of an employee benefit.
2668     */
2669    #[serde(
2670        default,
2671        skip_serializing_if = "String::is_empty",
2672        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2673    )]
2674    pub employee_deduction_annual_maximum: String,
2675    /**
2676     * The representation of an employee benefit.
2677     */
2678    #[serde(
2679        default,
2680        skip_serializing_if = "crate::utils::zero_f64",
2681        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
2682    )]
2683    pub employee_id: f64,
2684    /**
2685     * The representation of an employee benefit.
2686     */
2687    #[serde(
2688        default,
2689        skip_serializing_if = "crate::utils::zero_f64",
2690        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
2691    )]
2692    pub id: f64,
2693    /**
2694     * The representation of an employee benefit.
2695     */
2696    #[serde(
2697        default,
2698        skip_serializing_if = "String::is_empty",
2699        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2700    )]
2701    pub limit_option: String,
2702    /**
2703     * The representation of an employee benefit.
2704     */
2705    #[serde(
2706        default,
2707        skip_serializing_if = "String::is_empty",
2708        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2709    )]
2710    pub version: String,
2711}
2712
2713#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2714pub struct EligibleEmployees {
2715    #[serde(
2716        default,
2717        skip_serializing_if = "crate::utils::zero_f64",
2718        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
2719    )]
2720    pub id: f64,
2721    #[serde(
2722        default,
2723        skip_serializing_if = "Vec::is_empty",
2724        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
2725    )]
2726    pub job_ids: Vec<f64>,
2727}
2728
2729/// Information about the payroll for the pay period.
2730#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2731pub struct Payroll {
2732    /**
2733     * Information about the payroll for the pay period.
2734     */
2735    #[serde(
2736        default,
2737        skip_serializing_if = "String::is_empty",
2738        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2739    )]
2740    pub payroll_deadline: String,
2741    /**
2742     * Information about the payroll for the pay period.
2743     */
2744    #[serde(
2745        default,
2746        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
2747    )]
2748    pub processed: bool,
2749}
2750
2751/// The representation of a pay period.
2752#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2753pub struct PayPeriod {
2754    /**
2755     * The representation of a pay period.
2756     */
2757    #[serde(
2758        default,
2759        skip_serializing_if = "Vec::is_empty",
2760        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
2761    )]
2762    pub eligible_employees: Vec<EligibleEmployees>,
2763    #[serde(
2764        default,
2765        skip_serializing_if = "Option::is_none",
2766        deserialize_with = "crate::utils::date_format::deserialize"
2767    )]
2768    pub end_date: Option<chrono::NaiveDate>,
2769    /**
2770     * The representation of a pay period.
2771     */
2772    #[serde(
2773        default,
2774        skip_serializing_if = "crate::utils::zero_f64",
2775        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
2776    )]
2777    pub pay_schedule_id: f64,
2778    /**
2779     * The representation of a pay period.
2780     */
2781    #[serde(
2782        default,
2783        skip_serializing_if = "String::is_empty",
2784        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2785    )]
2786    pub pay_schedule_uuid: String,
2787    /**
2788     * The representation of a pay period.
2789     */
2790    #[serde(default, skip_serializing_if = "Option::is_none")]
2791    pub payroll: Option<Payroll>,
2792    #[serde(
2793        default,
2794        skip_serializing_if = "Option::is_none",
2795        deserialize_with = "crate::utils::date_format::deserialize"
2796    )]
2797    pub start_date: Option<chrono::NaiveDate>,
2798}
2799
2800#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2801pub struct PayrollPayPeriod {
2802    #[serde(
2803        default,
2804        skip_serializing_if = "Option::is_none",
2805        deserialize_with = "crate::utils::date_format::deserialize"
2806    )]
2807    pub end_date: Option<chrono::NaiveDate>,
2808    #[serde(
2809        default,
2810        skip_serializing_if = "crate::utils::zero_f64",
2811        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
2812    )]
2813    pub pay_schedule_id: f64,
2814    #[serde(
2815        default,
2816        skip_serializing_if = "String::is_empty",
2817        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2818    )]
2819    pub pay_schedule_uuid: String,
2820    #[serde(
2821        default,
2822        skip_serializing_if = "Option::is_none",
2823        deserialize_with = "crate::utils::date_format::deserialize"
2824    )]
2825    pub start_date: Option<chrono::NaiveDate>,
2826}
2827
2828/// The subtotals for the payroll.
2829#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
2830pub struct Totals {
2831    /**
2832     * The subtotals for the payroll.
2833     */
2834    #[serde(
2835        default,
2836        skip_serializing_if = "String::is_empty",
2837        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2838    )]
2839    pub additional_earnings: String,
2840    /**
2841     * The subtotals for the payroll.
2842     */
2843    #[serde(
2844        default,
2845        skip_serializing_if = "String::is_empty",
2846        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2847    )]
2848    pub benefits: String,
2849    /**
2850     * The subtotals for the payroll.
2851     */
2852    #[serde(
2853        default,
2854        skip_serializing_if = "String::is_empty",
2855        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2856    )]
2857    pub check_amount: String,
2858    /**
2859     * The subtotals for the payroll.
2860     */
2861    #[serde(
2862        default,
2863        skip_serializing_if = "String::is_empty",
2864        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2865    )]
2866    pub child_support_debit: String,
2867    /**
2868     * The subtotals for the payroll.
2869     */
2870    #[serde(
2871        default,
2872        skip_serializing_if = "String::is_empty",
2873        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2874    )]
2875    pub company_debit: String,
2876    /**
2877     * The subtotals for the payroll.
2878     */
2879    #[serde(
2880        default,
2881        skip_serializing_if = "String::is_empty",
2882        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2883    )]
2884    pub deferred_payroll_taxes: String,
2885    /**
2886     * The subtotals for the payroll.
2887     */
2888    #[serde(
2889        default,
2890        skip_serializing_if = "String::is_empty",
2891        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2892    )]
2893    pub employee_benefits_deductions: String,
2894    /**
2895     * The subtotals for the payroll.
2896     */
2897    #[serde(
2898        default,
2899        skip_serializing_if = "String::is_empty",
2900        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2901    )]
2902    pub employee_bonuses: String,
2903    /**
2904     * The subtotals for the payroll.
2905     */
2906    #[serde(
2907        default,
2908        skip_serializing_if = "String::is_empty",
2909        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2910    )]
2911    pub employee_cash_tips: String,
2912    /**
2913     * The subtotals for the payroll.
2914     */
2915    #[serde(
2916        default,
2917        skip_serializing_if = "String::is_empty",
2918        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2919    )]
2920    pub employee_commissions: String,
2921    /**
2922     * The subtotals for the payroll.
2923     */
2924    #[serde(
2925        default,
2926        skip_serializing_if = "String::is_empty",
2927        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2928    )]
2929    pub employee_paycheck_tips: String,
2930    /**
2931     * The subtotals for the payroll.
2932     */
2933    #[serde(
2934        default,
2935        skip_serializing_if = "String::is_empty",
2936        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2937    )]
2938    pub employee_taxes: String,
2939    /**
2940     * The subtotals for the payroll.
2941     */
2942    #[serde(
2943        default,
2944        skip_serializing_if = "String::is_empty",
2945        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2946    )]
2947    pub employer_taxes: String,
2948    /**
2949     * The subtotals for the payroll.
2950     */
2951    #[serde(
2952        default,
2953        skip_serializing_if = "String::is_empty",
2954        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2955    )]
2956    pub gross_pay: String,
2957    /**
2958     * The subtotals for the payroll.
2959     */
2960    #[serde(
2961        default,
2962        skip_serializing_if = "String::is_empty",
2963        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2964    )]
2965    pub net_pay: String,
2966    /**
2967     * The subtotals for the payroll.
2968     */
2969    #[serde(
2970        default,
2971        skip_serializing_if = "String::is_empty",
2972        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2973    )]
2974    pub net_pay_debit: String,
2975    /**
2976     * The subtotals for the payroll.
2977     */
2978    #[serde(
2979        default,
2980        skip_serializing_if = "String::is_empty",
2981        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2982    )]
2983    pub owners_draw: String,
2984    /**
2985     * The subtotals for the payroll.
2986     */
2987    #[serde(
2988        default,
2989        skip_serializing_if = "String::is_empty",
2990        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
2991    )]
2992    pub reimbursement_debit: String,
2993    /**
2994     * The subtotals for the payroll.
2995     */
2996    #[serde(
2997        default,
2998        skip_serializing_if = "String::is_empty",
2999        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3000    )]
3001    pub reimbursements: String,
3002    /**
3003     * The subtotals for the payroll.
3004     */
3005    #[serde(
3006        default,
3007        skip_serializing_if = "String::is_empty",
3008        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3009    )]
3010    pub tax_debit: String,
3011}
3012
3013/**
3014 * The employee's compensation payment method. This value is only available for processed payrolls.
3015 */
3016#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
3017pub enum PayrollEmployeeCompensationsPaymentMethod {
3018    #[serde(rename = "Check")]
3019    Check,
3020    #[serde(rename = "Direct Deposit")]
3021    DirectDeposit,
3022    #[serde(rename = "")]
3023    #[default]
3024    Noop,
3025    #[serde(other)]
3026    FallthroughString,
3027}
3028
3029impl std::fmt::Display for PayrollEmployeeCompensationsPaymentMethod {
3030    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3031        match self {
3032            PayrollEmployeeCompensationsPaymentMethod::Check => "Check",
3033            PayrollEmployeeCompensationsPaymentMethod::DirectDeposit => "Direct Deposit",
3034            PayrollEmployeeCompensationsPaymentMethod::Noop => "",
3035            PayrollEmployeeCompensationsPaymentMethod::FallthroughString => "*",
3036        }
3037        .fmt(f)
3038    }
3039}
3040
3041impl PayrollEmployeeCompensationsPaymentMethod {
3042    pub fn is_noop(&self) -> bool {
3043        matches!(self, PayrollEmployeeCompensationsPaymentMethod::Noop)
3044    }
3045}
3046
3047#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3048pub struct FixedCompensations {
3049    /**
3050     * A unique identifier of the employee in Gusto.
3051     */
3052    #[serde(
3053        default,
3054        skip_serializing_if = "String::is_empty",
3055        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3056    )]
3057    pub amount: String,
3058    /**
3059     * The ID of the employee in Gusto.
3060     */
3061    #[serde(
3062        default,
3063        skip_serializing_if = "crate::utils::zero_f64",
3064        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
3065    )]
3066    pub job_id: f64,
3067    /**
3068     * A unique identifier of the employee in Gusto.
3069     */
3070    #[serde(
3071        default,
3072        skip_serializing_if = "String::is_empty",
3073        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3074    )]
3075    pub name: String,
3076}
3077
3078#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3079pub struct HourlyCompensations {
3080    /**
3081     * The ID of the employee in Gusto.
3082     */
3083    #[serde(
3084        default,
3085        skip_serializing_if = "crate::utils::zero_f64",
3086        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
3087    )]
3088    pub compensation_multiplier: f64,
3089    /**
3090     * A unique identifier of the employee in Gusto.
3091     */
3092    #[serde(
3093        default,
3094        skip_serializing_if = "String::is_empty",
3095        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3096    )]
3097    pub hours: String,
3098    /**
3099     * The ID of the employee in Gusto.
3100     */
3101    #[serde(
3102        default,
3103        skip_serializing_if = "crate::utils::zero_f64",
3104        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
3105    )]
3106    pub job_id: f64,
3107    /**
3108     * A unique identifier of the employee in Gusto.
3109     */
3110    #[serde(
3111        default,
3112        skip_serializing_if = "String::is_empty",
3113        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3114    )]
3115    pub name: String,
3116}
3117
3118#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3119pub struct PayrollEmployeeCompensationsPaidTimeOff {
3120    /**
3121     * A unique identifier of the employee in Gusto.
3122     */
3123    #[serde(
3124        default,
3125        skip_serializing_if = "String::is_empty",
3126        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3127    )]
3128    pub hours: String,
3129    /**
3130     * A unique identifier of the employee in Gusto.
3131     */
3132    #[serde(
3133        default,
3134        skip_serializing_if = "String::is_empty",
3135        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3136    )]
3137    pub name: String,
3138}
3139
3140#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3141pub struct Benefits {
3142    #[serde(
3143        default,
3144        skip_serializing_if = "String::is_empty",
3145        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3146    )]
3147    pub company_contribution: String,
3148    #[serde(
3149        default,
3150        skip_serializing_if = "String::is_empty",
3151        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3152    )]
3153    pub employee_deduction: String,
3154    #[serde(
3155        default,
3156        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
3157    )]
3158    pub imputed: bool,
3159    #[serde(
3160        default,
3161        skip_serializing_if = "String::is_empty",
3162        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3163    )]
3164    pub name: String,
3165}
3166
3167#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3168pub struct Deductions {
3169    #[serde(
3170        default,
3171        skip_serializing_if = "String::is_empty",
3172        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3173    )]
3174    pub amount: String,
3175    #[serde(
3176        default,
3177        skip_serializing_if = "String::is_empty",
3178        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3179    )]
3180    pub name: String,
3181}
3182
3183#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3184pub struct Taxes {
3185    /**
3186     * A unique identifier of the employee in Gusto.
3187     */
3188    #[serde(
3189        default,
3190        skip_serializing_if = "String::is_empty",
3191        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3192    )]
3193    pub amount: String,
3194    /**
3195     * Whether the employee is terminated.
3196     */
3197    #[serde(
3198        default,
3199        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
3200    )]
3201    pub employer: bool,
3202    /**
3203     * A unique identifier of the employee in Gusto.
3204     */
3205    #[serde(
3206        default,
3207        skip_serializing_if = "String::is_empty",
3208        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3209    )]
3210    pub name: String,
3211}
3212
3213#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3214pub struct EmployeeCompensations {
3215    /**
3216     * An array of employee benefits for the pay period. Benefits are only included for processed payroll when the include parameter is present.
3217     */
3218    #[serde(
3219        default,
3220        skip_serializing_if = "Vec::is_empty",
3221        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
3222    )]
3223    pub benefits: Vec<Benefits>,
3224    /**
3225     * An array of employee deductions for the pay period. Deductions are only included for processed payroll when the include parameter is present.
3226     */
3227    #[serde(
3228        default,
3229        skip_serializing_if = "Vec::is_empty",
3230        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
3231    )]
3232    pub deductions: Vec<Deductions>,
3233    /**
3234     * The ID of the employee in Gusto.
3235     */
3236    #[serde(
3237        default,
3238        skip_serializing_if = "crate::utils::zero_f64",
3239        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
3240    )]
3241    pub employee_id: f64,
3242    /**
3243     * An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements. If this payroll has been procesed, only fixed compensations with a value greater than 0.00 are returned. For an unprocess payroll, all active fixed compensations are returned.
3244     */
3245    #[serde(
3246        default,
3247        skip_serializing_if = "Vec::is_empty",
3248        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
3249    )]
3250    pub fixed_compensations: Vec<FixedCompensations>,
3251    /**
3252     * A unique identifier of the employee in Gusto.
3253     */
3254    #[serde(
3255        default,
3256        skip_serializing_if = "String::is_empty",
3257        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3258    )]
3259    pub gross_pay: String,
3260    /**
3261     * An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours. If this payroll has been procesed, only hourly compensations with a value greater than 0.00 are returned. For an unprocess payroll, all active hourly compensations are returned.
3262     */
3263    #[serde(
3264        default,
3265        skip_serializing_if = "Vec::is_empty",
3266        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
3267    )]
3268    pub hourly_compensations: Vec<HourlyCompensations>,
3269    /**
3270     * A unique identifier of the employee in Gusto.
3271     */
3272    #[serde(
3273        default,
3274        skip_serializing_if = "String::is_empty",
3275        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3276    )]
3277    pub net_pay: String,
3278    /**
3279     * An array of all paid time off the employee is eligible for this pay period.
3280     */
3281    #[serde(
3282        default,
3283        skip_serializing_if = "Vec::is_empty",
3284        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
3285    )]
3286    pub paid_time_off: Vec<PayrollEmployeeCompensationsPaidTimeOff>,
3287    /**
3288     * The employee's compensation payment method. This value is only available for processed payrolls.
3289     */
3290    #[serde(default, skip_serializing_if = "Option::is_none")]
3291    pub payment_method: Option<PayrollEmployeeCompensationsPaymentMethod>,
3292    /**
3293     * An array of employer and employee taxes for the pay period. Taxes are only included for processed payroll when the include parameter is present.
3294     */
3295    #[serde(
3296        default,
3297        skip_serializing_if = "Vec::is_empty",
3298        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
3299    )]
3300    pub taxes: Vec<Taxes>,
3301}
3302
3303///
3304#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3305pub struct PayrollData {
3306    /**
3307     *
3308     */
3309    #[serde(
3310        default,
3311        skip_serializing_if = "String::is_empty",
3312        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3313    )]
3314    pub calculated_at: String,
3315    #[serde(
3316        default,
3317        skip_serializing_if = "Option::is_none",
3318        deserialize_with = "crate::utils::date_format::deserialize"
3319    )]
3320    pub check_date: Option<chrono::NaiveDate>,
3321    /**
3322     *
3323     */
3324    #[serde(
3325        default,
3326        skip_serializing_if = "crate::utils::zero_f64",
3327        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
3328    )]
3329    pub company_id: f64,
3330    /**
3331     *
3332     */
3333    #[serde(
3334        default,
3335        skip_serializing_if = "String::is_empty",
3336        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3337    )]
3338    pub company_uuid: String,
3339    /**
3340     *
3341     */
3342    #[serde(
3343        default,
3344        skip_serializing_if = "Vec::is_empty",
3345        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
3346    )]
3347    pub employee_compensations: Vec<EmployeeCompensations>,
3348    /**
3349     *
3350     */
3351    #[serde(default, skip_serializing_if = "Option::is_none")]
3352    pub pay_period: Option<PayrollPayPeriod>,
3353    /**
3354     *
3355     */
3356    #[serde(
3357        default,
3358        skip_serializing_if = "String::is_empty",
3359        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3360    )]
3361    pub payroll_deadline: String,
3362    /**
3363     *
3364     */
3365    #[serde(
3366        default,
3367        skip_serializing_if = "crate::utils::zero_f64",
3368        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
3369    )]
3370    pub payroll_id: f64,
3371    /**
3372     *
3373     */
3374    #[serde(
3375        default,
3376        skip_serializing_if = "String::is_empty",
3377        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3378    )]
3379    pub payroll_uuid: String,
3380    /**
3381     *
3382     */
3383    #[serde(
3384        default,
3385        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
3386    )]
3387    pub processed: bool,
3388    #[serde(
3389        default,
3390        skip_serializing_if = "Option::is_none",
3391        deserialize_with = "crate::utils::date_format::deserialize"
3392    )]
3393    pub processed_date: Option<chrono::NaiveDate>,
3394    /**
3395     *
3396     */
3397    #[serde(default, skip_serializing_if = "Option::is_none")]
3398    pub totals: Option<Totals>,
3399    /**
3400     *
3401     */
3402    #[serde(
3403        default,
3404        skip_serializing_if = "String::is_empty",
3405        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3406    )]
3407    pub version: String,
3408}
3409
3410#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
3411pub enum CustomFieldType {
3412    #[serde(rename = "currency")]
3413    Currency,
3414    #[serde(rename = "date")]
3415    Date,
3416    #[serde(rename = "number")]
3417    Number,
3418    #[serde(rename = "radio")]
3419    Radio,
3420    #[serde(rename = "text")]
3421    Text,
3422    #[serde(rename = "")]
3423    #[default]
3424    Noop,
3425    #[serde(other)]
3426    FallthroughString,
3427}
3428
3429impl std::fmt::Display for CustomFieldType {
3430    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3431        match self {
3432            CustomFieldType::Currency => "currency",
3433            CustomFieldType::Date => "date",
3434            CustomFieldType::Number => "number",
3435            CustomFieldType::Radio => "radio",
3436            CustomFieldType::Text => "text",
3437            CustomFieldType::Noop => "",
3438            CustomFieldType::FallthroughString => "*",
3439        }
3440        .fmt(f)
3441    }
3442}
3443
3444impl CustomFieldType {
3445    pub fn is_noop(&self) -> bool {
3446        matches!(self, CustomFieldType::Noop)
3447    }
3448}
3449
3450/// A custom field of an employee
3451#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3452pub struct EmployeeCustomField {
3453    /**
3454     * A unique identifier of the employee in Gusto.
3455     */
3456    #[serde(
3457        default,
3458        skip_serializing_if = "String::is_empty",
3459        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3460    )]
3461    pub company_custom_field_id: String,
3462    /**
3463     * A custom field of an employee
3464     */
3465    #[serde(
3466        default,
3467        skip_serializing_if = "String::is_empty",
3468        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3469    )]
3470    pub description: String,
3471    /**
3472     * A unique identifier of the employee in Gusto.
3473     */
3474    #[serde(
3475        default,
3476        skip_serializing_if = "String::is_empty",
3477        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3478    )]
3479    pub id: String,
3480    /**
3481     * A unique identifier of the employee in Gusto.
3482     */
3483    #[serde(
3484        default,
3485        skip_serializing_if = "String::is_empty",
3486        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3487    )]
3488    pub name: String,
3489    /**
3490     * A custom field of an employee
3491     */
3492    #[serde(
3493        default,
3494        skip_serializing_if = "Vec::is_empty",
3495        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
3496    )]
3497    pub selection_options: Vec<String>,
3498    #[serde(rename = "type")]
3499    pub type_: CustomFieldType,
3500    /**
3501     * A unique identifier of the employee in Gusto.
3502     */
3503    #[serde(
3504        default,
3505        skip_serializing_if = "String::is_empty",
3506        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3507    )]
3508    pub value: String,
3509}
3510
3511/// A custom field on a company
3512#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3513pub struct CompanyCustomField {
3514    /**
3515     * A custom field on a company
3516     */
3517    #[serde(
3518        default,
3519        skip_serializing_if = "String::is_empty",
3520        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3521    )]
3522    pub description: String,
3523    /**
3524     * A unique identifier of the employee in Gusto.
3525     */
3526    #[serde(
3527        default,
3528        skip_serializing_if = "String::is_empty",
3529        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3530    )]
3531    pub id: String,
3532    /**
3533     * A unique identifier of the employee in Gusto.
3534     */
3535    #[serde(
3536        default,
3537        skip_serializing_if = "String::is_empty",
3538        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3539    )]
3540    pub name: String,
3541    /**
3542     * A custom field on a company
3543     */
3544    #[serde(
3545        default,
3546        skip_serializing_if = "Vec::is_empty",
3547        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
3548    )]
3549    pub selection_options: Vec<String>,
3550    #[serde(rename = "type")]
3551    pub type_: CustomFieldType,
3552}
3553
3554#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
3555pub enum GustoPersonType {
3556    #[serde(rename = "Candidate")]
3557    Candidate,
3558    #[serde(rename = "Contractor")]
3559    Contractor,
3560    #[serde(rename = "Employee")]
3561    Employee,
3562    #[serde(rename = "")]
3563    #[default]
3564    Noop,
3565    #[serde(other)]
3566    FallthroughString,
3567}
3568
3569impl std::fmt::Display for GustoPersonType {
3570    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3571        match self {
3572            GustoPersonType::Candidate => "Candidate",
3573            GustoPersonType::Contractor => "Contractor",
3574            GustoPersonType::Employee => "Employee",
3575            GustoPersonType::Noop => "",
3576            GustoPersonType::FallthroughString => "*",
3577        }
3578        .fmt(f)
3579    }
3580}
3581
3582impl GustoPersonType {
3583    pub fn is_noop(&self) -> bool {
3584        matches!(self, GustoPersonType::Noop)
3585    }
3586}
3587
3588/// The representation of a job applicant in Gusto.
3589#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3590pub struct JobApplicant {
3591    /**
3592     * The representation of a job applicant in Gusto.
3593     */
3594    #[serde(
3595        default,
3596        skip_serializing_if = "crate::utils::zero_f64",
3597        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
3598    )]
3599    pub company_id: f64,
3600    /**
3601     * The representation of a job applicant in Gusto.
3602     */
3603    #[serde(
3604        default,
3605        skip_serializing_if = "String::is_empty",
3606        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3607    )]
3608    pub company_uuid: String,
3609    #[serde(
3610        default,
3611        skip_serializing_if = "Option::is_none",
3612        deserialize_with = "crate::utils::date_format::deserialize"
3613    )]
3614    pub date_of_birth: Option<chrono::NaiveDate>,
3615    /**
3616     * The representation of a job applicant in Gusto.
3617     */
3618    #[serde(
3619        default,
3620        skip_serializing_if = "String::is_empty",
3621        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3622    )]
3623    pub email: String,
3624    /**
3625     * The representation of a job applicant in Gusto.
3626     */
3627    #[serde(
3628        default,
3629        skip_serializing_if = "String::is_empty",
3630        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3631    )]
3632    pub first_name: String,
3633    /**
3634     * The representation of a job applicant in Gusto.
3635     */
3636    #[serde(
3637        default,
3638        skip_serializing_if = "crate::utils::zero_f64",
3639        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
3640    )]
3641    pub gusto_person_id: f64,
3642    #[serde(default, skip_serializing_if = "Option::is_none")]
3643    pub gusto_person_type: Option<GustoPersonType>,
3644    /**
3645     * The representation of a job applicant in Gusto.
3646     */
3647    #[serde(
3648        default,
3649        skip_serializing_if = "String::is_empty",
3650        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3651    )]
3652    pub gusto_person_uuid: String,
3653    /**
3654     * The representation of a job applicant in Gusto.
3655     */
3656    #[serde(
3657        default,
3658        skip_serializing_if = "String::is_empty",
3659        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3660    )]
3661    pub job_title: String,
3662    /**
3663     * The representation of a job applicant in Gusto.
3664     */
3665    #[serde(
3666        default,
3667        skip_serializing_if = "String::is_empty",
3668        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3669    )]
3670    pub last_name: String,
3671    /**
3672     * The representation of a job applicant in Gusto.
3673     */
3674    #[serde(
3675        default,
3676        skip_serializing_if = "String::is_empty",
3677        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3678    )]
3679    pub phone: String,
3680    #[serde(
3681        default,
3682        skip_serializing_if = "Option::is_none",
3683        deserialize_with = "crate::utils::date_format::deserialize"
3684    )]
3685    pub start_date: Option<chrono::NaiveDate>,
3686    /**
3687     * The representation of a job applicant in Gusto.
3688     */
3689    #[serde(
3690        default,
3691        skip_serializing_if = "String::is_empty",
3692        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3693    )]
3694    pub uuid: String,
3695}
3696
3697#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3698pub struct FederalTaxDetails {
3699    #[serde(
3700        default,
3701        skip_serializing_if = "String::is_empty",
3702        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3703    )]
3704    pub ein: String,
3705    #[serde(
3706        default,
3707        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
3708    )]
3709    pub ein_verified: bool,
3710    #[serde(
3711        default,
3712        skip_serializing_if = "String::is_empty",
3713        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3714    )]
3715    pub filing_form: String,
3716    #[serde(
3717        default,
3718        skip_serializing_if = "String::is_empty",
3719        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3720    )]
3721    pub legal_name: String,
3722    #[serde(
3723        default,
3724        skip_serializing_if = "String::is_empty",
3725        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3726    )]
3727    pub tax_payer_type: String,
3728    #[serde(
3729        default,
3730        skip_serializing_if = "String::is_empty",
3731        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3732    )]
3733    pub taxable_as_scorp: String,
3734    #[serde(
3735        default,
3736        skip_serializing_if = "String::is_empty",
3737        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3738    )]
3739    pub version: String,
3740}
3741
3742#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3743pub struct PostEmployeeYtdBenefitAmountsFromDifferentCompanyRequest {
3744    /**
3745     * The ID of the employee in Gusto.
3746     */
3747    #[serde(
3748        default,
3749        skip_serializing_if = "crate::utils::zero_f64",
3750        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
3751    )]
3752    pub benefit_id: f64,
3753    /**
3754     * The ID of the employee in Gusto.
3755     */
3756    #[serde(
3757        default,
3758        skip_serializing_if = "crate::utils::zero_f64",
3759        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
3760    )]
3761    pub tax_year: f64,
3762    /**
3763     * A unique identifier of the employee in Gusto.
3764     */
3765    #[serde(
3766        default,
3767        skip_serializing_if = "String::is_empty",
3768        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3769    )]
3770    pub ytd_company_contribution_amount: String,
3771    /**
3772     * A unique identifier of the employee in Gusto.
3773     */
3774    #[serde(
3775        default,
3776        skip_serializing_if = "String::is_empty",
3777        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3778    )]
3779    pub ytd_employee_deduction_amount: String,
3780}
3781
3782#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3783pub struct EarningTypeListResponse {
3784    /**
3785     * The default earning types for the company.
3786     */
3787    #[serde(
3788        default,
3789        skip_serializing_if = "Vec::is_empty",
3790        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
3791    )]
3792    pub custom: Vec<EarningType>,
3793    /**
3794     * The default earning types for the company.
3795     */
3796    #[serde(
3797        default,
3798        skip_serializing_if = "Vec::is_empty",
3799        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
3800    )]
3801    pub default: Vec<EarningType>,
3802}
3803
3804#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
3805pub enum Include {
3806    #[serde(rename = "custom_fields")]
3807    CustomFields,
3808    #[serde(rename = "")]
3809    #[default]
3810    Noop,
3811    #[serde(other)]
3812    FallthroughString,
3813}
3814
3815impl std::fmt::Display for Include {
3816    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3817        match self {
3818            Include::CustomFields => "custom_fields",
3819            Include::Noop => "",
3820            Include::FallthroughString => "*",
3821        }
3822        .fmt(f)
3823    }
3824}
3825
3826impl Include {
3827    pub fn is_noop(&self) -> bool {
3828        matches!(self, Include::Noop)
3829    }
3830}
3831
3832///
3833#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3834pub struct PutEmployeesRequest {
3835    #[serde(
3836        default,
3837        skip_serializing_if = "Option::is_none",
3838        deserialize_with = "crate::utils::date_format::deserialize"
3839    )]
3840    pub date_of_birth: Option<chrono::NaiveDate>,
3841    /**
3842     *
3843     */
3844    #[serde(
3845        default,
3846        skip_serializing_if = "String::is_empty",
3847        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3848    )]
3849    pub email: String,
3850    /**
3851     *
3852     */
3853    #[serde(
3854        default,
3855        skip_serializing_if = "String::is_empty",
3856        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3857    )]
3858    pub first_name: String,
3859    /**
3860     *
3861     */
3862    #[serde(
3863        default,
3864        skip_serializing_if = "String::is_empty",
3865        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3866    )]
3867    pub last_name: String,
3868    /**
3869     *
3870     */
3871    #[serde(
3872        default,
3873        skip_serializing_if = "String::is_empty",
3874        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3875    )]
3876    pub middle_initial: String,
3877    /**
3878     *
3879     */
3880    #[serde(
3881        default,
3882        skip_serializing_if = "String::is_empty",
3883        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3884    )]
3885    pub ssn: String,
3886    /**
3887     *
3888     */
3889    #[serde(default, skip_serializing_if = "Option::is_none")]
3890    pub two_percent_shareholder: Option<bool>,
3891    /**
3892     * A unique identifier of the employee in Gusto.
3893     */
3894    #[serde(
3895        default,
3896        skip_serializing_if = "String::is_empty",
3897        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3898    )]
3899    pub version: String,
3900}
3901
3902///
3903#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3904pub struct PostEmployeesRequest {
3905    #[serde(
3906        default,
3907        skip_serializing_if = "Option::is_none",
3908        deserialize_with = "crate::utils::date_format::deserialize"
3909    )]
3910    pub date_of_birth: Option<chrono::NaiveDate>,
3911    /**
3912     *
3913     */
3914    #[serde(
3915        default,
3916        skip_serializing_if = "String::is_empty",
3917        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3918    )]
3919    pub email: String,
3920    /**
3921     *
3922     */
3923    #[serde(
3924        default,
3925        skip_serializing_if = "String::is_empty",
3926        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3927    )]
3928    pub first_name: String,
3929    /**
3930     *
3931     */
3932    #[serde(
3933        default,
3934        skip_serializing_if = "String::is_empty",
3935        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3936    )]
3937    pub last_name: String,
3938    /**
3939     *
3940     */
3941    #[serde(
3942        default,
3943        skip_serializing_if = "String::is_empty",
3944        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3945    )]
3946    pub middle_initial: String,
3947    /**
3948     *
3949     */
3950    #[serde(
3951        default,
3952        skip_serializing_if = "String::is_empty",
3953        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3954    )]
3955    pub ssn: String,
3956}
3957
3958///
3959#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3960pub struct PutJobRequest {
3961    #[serde(
3962        default,
3963        skip_serializing_if = "Option::is_none",
3964        deserialize_with = "crate::utils::date_format::deserialize"
3965    )]
3966    pub hire_date: Option<chrono::NaiveDate>,
3967    /**
3968     *
3969     */
3970    #[serde(
3971        default,
3972        skip_serializing_if = "crate::utils::zero_f64",
3973        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
3974    )]
3975    pub location_id: f64,
3976    /**
3977     *
3978     */
3979    #[serde(
3980        default,
3981        skip_serializing_if = "String::is_empty",
3982        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3983    )]
3984    pub title: String,
3985    /**
3986     * A unique identifier of the employee in Gusto.
3987     */
3988    #[serde(
3989        default,
3990        skip_serializing_if = "String::is_empty",
3991        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
3992    )]
3993    pub version: String,
3994}
3995
3996///
3997#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
3998pub struct PostJobRequest {
3999    #[serde(
4000        default,
4001        skip_serializing_if = "Option::is_none",
4002        deserialize_with = "crate::utils::date_format::deserialize"
4003    )]
4004    pub hire_date: Option<chrono::NaiveDate>,
4005    /**
4006     *
4007     */
4008    #[serde(
4009        default,
4010        skip_serializing_if = "crate::utils::zero_f64",
4011        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
4012    )]
4013    pub location_id: f64,
4014    /**
4015     *
4016     */
4017    #[serde(
4018        default,
4019        skip_serializing_if = "String::is_empty",
4020        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4021    )]
4022    pub title: String,
4023}
4024
4025///
4026#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4027pub struct PostCompanyLocationsRequest {
4028    /**
4029     * A unique identifier of the employee in Gusto.
4030     */
4031    #[serde(
4032        default,
4033        skip_serializing_if = "String::is_empty",
4034        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4035    )]
4036    pub city: String,
4037    /**
4038     *
4039     */
4040    #[serde(
4041        default,
4042        skip_serializing_if = "String::is_empty",
4043        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4044    )]
4045    pub country: String,
4046    /**
4047     *
4048     */
4049    #[serde(default, skip_serializing_if = "Option::is_none")]
4050    pub filing_address: Option<bool>,
4051    /**
4052     *
4053     */
4054    #[serde(default, skip_serializing_if = "Option::is_none")]
4055    pub mailing_address: Option<bool>,
4056    /**
4057     * A unique identifier of the employee in Gusto.
4058     */
4059    #[serde(
4060        default,
4061        skip_serializing_if = "String::is_empty",
4062        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4063    )]
4064    pub phone_number: String,
4065    /**
4066     * A unique identifier of the employee in Gusto.
4067     */
4068    #[serde(
4069        default,
4070        skip_serializing_if = "String::is_empty",
4071        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4072    )]
4073    pub state: String,
4074    /**
4075     * A unique identifier of the employee in Gusto.
4076     */
4077    #[serde(
4078        default,
4079        skip_serializing_if = "String::is_empty",
4080        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4081    )]
4082    pub street_1: String,
4083    /**
4084     *
4085     */
4086    #[serde(
4087        default,
4088        skip_serializing_if = "String::is_empty",
4089        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4090    )]
4091    pub street_2: String,
4092    /**
4093     * A unique identifier of the employee in Gusto.
4094     */
4095    #[serde(
4096        default,
4097        skip_serializing_if = "String::is_empty",
4098        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4099    )]
4100    pub zip: String,
4101}
4102
4103///
4104#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4105pub struct PutLocationRequest {
4106    /**
4107     *
4108     */
4109    #[serde(
4110        default,
4111        skip_serializing_if = "String::is_empty",
4112        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4113    )]
4114    pub city: String,
4115    /**
4116     *
4117     */
4118    #[serde(
4119        default,
4120        skip_serializing_if = "String::is_empty",
4121        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4122    )]
4123    pub country: String,
4124    /**
4125     *
4126     */
4127    #[serde(default, skip_serializing_if = "Option::is_none")]
4128    pub filing_address: Option<bool>,
4129    /**
4130     *
4131     */
4132    #[serde(default, skip_serializing_if = "Option::is_none")]
4133    pub mailing_address: Option<bool>,
4134    /**
4135     *
4136     */
4137    #[serde(
4138        default,
4139        skip_serializing_if = "String::is_empty",
4140        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4141    )]
4142    pub phone_number: String,
4143    /**
4144     *
4145     */
4146    #[serde(
4147        default,
4148        skip_serializing_if = "String::is_empty",
4149        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4150    )]
4151    pub state: String,
4152    /**
4153     *
4154     */
4155    #[serde(
4156        default,
4157        skip_serializing_if = "String::is_empty",
4158        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4159    )]
4160    pub street_1: String,
4161    /**
4162     *
4163     */
4164    #[serde(
4165        default,
4166        skip_serializing_if = "String::is_empty",
4167        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4168    )]
4169    pub street_2: String,
4170    /**
4171     *
4172     */
4173    #[serde(
4174        default,
4175        skip_serializing_if = "String::is_empty",
4176        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4177    )]
4178    pub zip: String,
4179}
4180
4181///
4182#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4183pub struct PutComntractorRequest {
4184    /**
4185     *
4186     */
4187    #[serde(
4188        default,
4189        skip_serializing_if = "String::is_empty",
4190        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4191    )]
4192    pub business_name: String,
4193    /**
4194     *
4195     */
4196    #[serde(
4197        default,
4198        skip_serializing_if = "String::is_empty",
4199        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4200    )]
4201    pub ein: String,
4202    /**
4203     *
4204     */
4205    #[serde(
4206        default,
4207        skip_serializing_if = "String::is_empty",
4208        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4209    )]
4210    pub first_name: String,
4211    /**
4212     *
4213     */
4214    #[serde(
4215        default,
4216        skip_serializing_if = "String::is_empty",
4217        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4218    )]
4219    pub hourly_rate: String,
4220    /**
4221     *
4222     */
4223    #[serde(
4224        default,
4225        skip_serializing_if = "String::is_empty",
4226        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4227    )]
4228    pub last_name: String,
4229    /**
4230     *
4231     */
4232    #[serde(
4233        default,
4234        skip_serializing_if = "String::is_empty",
4235        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4236    )]
4237    pub middle_initial: String,
4238    #[serde(
4239        default,
4240        skip_serializing_if = "Option::is_none",
4241        deserialize_with = "crate::utils::date_format::deserialize"
4242    )]
4243    pub start_date: Option<chrono::NaiveDate>,
4244    /**
4245     *
4246     */
4247    #[serde(
4248        default,
4249        skip_serializing_if = "String::is_empty",
4250        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4251    )]
4252    pub version: String,
4253    /**
4254     *
4255     */
4256    #[serde(default, skip_serializing_if = "Option::is_none")]
4257    pub wage_type: Option<WageType>,
4258}
4259
4260///
4261#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4262pub struct PostCompanyContractorsRequest {
4263    /**
4264     *
4265     */
4266    #[serde(
4267        default,
4268        skip_serializing_if = "String::is_empty",
4269        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4270    )]
4271    pub business_name: String,
4272    /**
4273     *
4274     */
4275    #[serde(
4276        default,
4277        skip_serializing_if = "String::is_empty",
4278        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4279    )]
4280    pub ein: String,
4281    /**
4282     *
4283     */
4284    #[serde(
4285        default,
4286        skip_serializing_if = "String::is_empty",
4287        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4288    )]
4289    pub email: String,
4290    /**
4291     *
4292     */
4293    #[serde(
4294        default,
4295        skip_serializing_if = "String::is_empty",
4296        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4297    )]
4298    pub first_name: String,
4299    /**
4300     *
4301     */
4302    #[serde(
4303        default,
4304        skip_serializing_if = "String::is_empty",
4305        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4306    )]
4307    pub last_name: String,
4308    /**
4309     *
4310     */
4311    #[serde(
4312        default,
4313        skip_serializing_if = "String::is_empty",
4314        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4315    )]
4316    pub middle_initial: String,
4317    /**
4318     *
4319     */
4320    #[serde(default, skip_serializing_if = "Option::is_none")]
4321    pub self_onboarding: Option<bool>,
4322    #[serde(
4323        default,
4324        skip_serializing_if = "Option::is_none",
4325        deserialize_with = "crate::utils::date_format::deserialize"
4326    )]
4327    pub start_date: Option<chrono::NaiveDate>,
4328    /**
4329     * The contractor's type, either "Individual" or "Business".
4330     */
4331    #[serde(default, skip_serializing_if = "Type::is_noop", rename = "type")]
4332    pub type_: Type,
4333    /**
4334     * The contractor's wage type, either "Fixed" or "Hourly".
4335     */
4336    #[serde(default, skip_serializing_if = "WageType::is_noop")]
4337    pub wage_type: WageType,
4338}
4339
4340///
4341#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4342pub struct PutCompensationRequest {
4343    /**
4344     *
4345     */
4346    #[serde(default, skip_serializing_if = "Option::is_none")]
4347    pub flsa_status: Option<FlsaStatus>,
4348    /**
4349     *
4350     */
4351    #[serde(default, skip_serializing_if = "Option::is_none")]
4352    pub payment_unit: Option<PaymentUnit>,
4353    /**
4354     *
4355     */
4356    #[serde(
4357        default,
4358        skip_serializing_if = "String::is_empty",
4359        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4360    )]
4361    pub rate: String,
4362    /**
4363     * A unique identifier of the employee in Gusto.
4364     */
4365    #[serde(
4366        default,
4367        skip_serializing_if = "String::is_empty",
4368        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4369    )]
4370    pub version: String,
4371}
4372
4373///
4374#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4375pub struct PostJobCompensationsRequest {
4376    #[serde(
4377        default,
4378        skip_serializing_if = "Option::is_none",
4379        deserialize_with = "crate::utils::date_format::deserialize"
4380    )]
4381    pub effective_date: Option<chrono::NaiveDate>,
4382    /**
4383     * The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ('Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company.
4384     */
4385    #[serde(default, skip_serializing_if = "FlsaStatus::is_noop")]
4386    pub flsa_status: FlsaStatus,
4387    /**
4388     * The unit accompanying the compensation rate. If the employee is an owner, rate should be 'Paycheck'.
4389     */
4390    #[serde(default, skip_serializing_if = "PaymentUnit::is_noop")]
4391    pub payment_unit: PaymentUnit,
4392    /**
4393     * A unique identifier of the employee in Gusto.
4394     */
4395    #[serde(
4396        default,
4397        skip_serializing_if = "String::is_empty",
4398        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4399    )]
4400    pub rate: String,
4401}
4402
4403///
4404#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4405pub struct PostEmployeeGarnishmentsRequest {
4406    /**
4407     *
4408     */
4409    #[serde(default, skip_serializing_if = "Option::is_none")]
4410    pub active: Option<bool>,
4411    /**
4412     * The ID of the employee in Gusto.
4413     */
4414    #[serde(
4415        default,
4416        skip_serializing_if = "crate::utils::zero_f64",
4417        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
4418    )]
4419    pub amount: f64,
4420    /**
4421     *
4422     */
4423    #[serde(
4424        default,
4425        skip_serializing_if = "crate::utils::zero_f64",
4426        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
4427    )]
4428    pub annual_maximum: f64,
4429    /**
4430     * Whether the employee is terminated.
4431     */
4432    #[serde(default, skip_serializing_if = "Option::is_none")]
4433    pub court_ordered: Option<bool>,
4434    /**
4435     *
4436     */
4437    #[serde(default, skip_serializing_if = "Option::is_none")]
4438    pub deduct_as_percentage: Option<bool>,
4439    /**
4440     * A unique identifier of the employee in Gusto.
4441     */
4442    #[serde(
4443        default,
4444        skip_serializing_if = "String::is_empty",
4445        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4446    )]
4447    pub description: String,
4448    /**
4449     *
4450     */
4451    #[serde(
4452        default,
4453        skip_serializing_if = "crate::utils::zero_f64",
4454        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
4455    )]
4456    pub pay_period_maximum: f64,
4457    /**
4458     *
4459     */
4460    #[serde(default, skip_serializing_if = "Option::is_none")]
4461    pub recurring: Option<bool>,
4462    /**
4463     *
4464     */
4465    #[serde(
4466        default,
4467        skip_serializing_if = "crate::utils::zero_i64",
4468        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
4469    )]
4470    pub times: i64,
4471}
4472
4473#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4474pub struct PutGarnishmentRequest {
4475    /**
4476     * Whether the employee is terminated.
4477     */
4478    #[serde(default, skip_serializing_if = "Option::is_none")]
4479    pub active: Option<bool>,
4480    /**
4481     * The ID of the employee in Gusto.
4482     */
4483    #[serde(
4484        default,
4485        skip_serializing_if = "crate::utils::zero_f64",
4486        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
4487    )]
4488    pub amount: f64,
4489    /**
4490     * The ID of the employee in Gusto.
4491     */
4492    #[serde(
4493        default,
4494        skip_serializing_if = "crate::utils::zero_f64",
4495        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
4496    )]
4497    pub annual_maximum: f64,
4498    /**
4499     * Whether the employee is terminated.
4500     */
4501    #[serde(default, skip_serializing_if = "Option::is_none")]
4502    pub court_ordered: Option<bool>,
4503    /**
4504     * Whether the employee is terminated.
4505     */
4506    #[serde(default, skip_serializing_if = "Option::is_none")]
4507    pub deduct_as_percentage: Option<bool>,
4508    /**
4509     * A unique identifier of the employee in Gusto.
4510     */
4511    #[serde(
4512        default,
4513        skip_serializing_if = "String::is_empty",
4514        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4515    )]
4516    pub description: String,
4517    /**
4518     * The ID of the employee in Gusto.
4519     */
4520    #[serde(
4521        default,
4522        skip_serializing_if = "crate::utils::zero_f64",
4523        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
4524    )]
4525    pub pay_period_maximum: f64,
4526    /**
4527     * Whether the employee is terminated.
4528     */
4529    #[serde(default, skip_serializing_if = "Option::is_none")]
4530    pub recurring: Option<bool>,
4531    /**
4532     * The unique identifier of the location in Gusto.
4533     */
4534    #[serde(
4535        default,
4536        skip_serializing_if = "crate::utils::zero_i64",
4537        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
4538    )]
4539    pub times: i64,
4540    /**
4541     * A unique identifier of the employee in Gusto.
4542     */
4543    #[serde(
4544        default,
4545        skip_serializing_if = "String::is_empty",
4546        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4547    )]
4548    pub version: String,
4549}
4550
4551///
4552#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4553pub struct PostEmployeeTerminationsRequest {
4554    #[serde(
4555        default,
4556        skip_serializing_if = "Option::is_none",
4557        deserialize_with = "crate::utils::date_format::deserialize"
4558    )]
4559    pub effective_date: Option<chrono::NaiveDate>,
4560    /**
4561     *
4562     */
4563    #[serde(default, skip_serializing_if = "Option::is_none")]
4564    pub run_termination_payroll: Option<bool>,
4565}
4566
4567///
4568#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4569pub struct PutEmployeeHomeAddressRequest {
4570    /**
4571     *
4572     */
4573    #[serde(
4574        default,
4575        skip_serializing_if = "String::is_empty",
4576        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4577    )]
4578    pub city: String,
4579    /**
4580     *
4581     */
4582    #[serde(
4583        default,
4584        skip_serializing_if = "String::is_empty",
4585        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4586    )]
4587    pub state: String,
4588    /**
4589     *
4590     */
4591    #[serde(
4592        default,
4593        skip_serializing_if = "String::is_empty",
4594        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4595    )]
4596    pub street_1: String,
4597    /**
4598     *
4599     */
4600    #[serde(
4601        default,
4602        skip_serializing_if = "String::is_empty",
4603        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4604    )]
4605    pub street_2: String,
4606    /**
4607     * A unique identifier of the employee in Gusto.
4608     */
4609    #[serde(
4610        default,
4611        skip_serializing_if = "String::is_empty",
4612        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4613    )]
4614    pub version: String,
4615    /**
4616     *
4617     */
4618    #[serde(
4619        default,
4620        skip_serializing_if = "String::is_empty",
4621        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4622    )]
4623    pub zip: String,
4624}
4625
4626///
4627#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4628pub struct PutCompanyPaySchedulesScheduleRequest {
4629    /**
4630     *
4631     */
4632    #[serde(default, skip_serializing_if = "Option::is_none")]
4633    pub auto_pilot: Option<bool>,
4634    /**
4635     * A unique identifier of the employee in Gusto.
4636     */
4637    #[serde(
4638        default,
4639        skip_serializing_if = "String::is_empty",
4640        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4641    )]
4642    pub version: String,
4643}
4644
4645///
4646#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4647pub struct PostCompanyBankAccountsRequest {
4648    /**
4649     *
4650     */
4651    #[serde(
4652        default,
4653        skip_serializing_if = "String::is_empty",
4654        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4655    )]
4656    pub account_number: String,
4657    /**
4658     *
4659     */
4660    #[serde(default, skip_serializing_if = "Option::is_none")]
4661    pub account_type: Option<AccountType>,
4662    /**
4663     *
4664     */
4665    #[serde(
4666        default,
4667        skip_serializing_if = "String::is_empty",
4668        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4669    )]
4670    pub routing_number: String,
4671}
4672
4673///
4674#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4675pub struct PutCompanyBankAccountsVerifyRequest {
4676    /**
4677     *
4678     */
4679    #[serde(
4680        default,
4681        skip_serializing_if = "crate::utils::zero_f64",
4682        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
4683    )]
4684    pub deposit_1: f64,
4685    /**
4686     *
4687     */
4688    #[serde(
4689        default,
4690        skip_serializing_if = "crate::utils::zero_f64",
4691        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
4692    )]
4693    pub deposit_2: f64,
4694}
4695
4696///
4697#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4698pub struct PostCompanyBenefitsRequest {
4699    /**
4700     *
4701     */
4702    #[serde(default, skip_serializing_if = "Option::is_none")]
4703    pub active: Option<bool>,
4704    /**
4705     * The ID of the employee in Gusto.
4706     */
4707    #[serde(
4708        default,
4709        skip_serializing_if = "crate::utils::zero_f64",
4710        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
4711    )]
4712    pub benefit_id: f64,
4713    /**
4714     * A unique identifier of the employee in Gusto.
4715     */
4716    #[serde(
4717        default,
4718        skip_serializing_if = "String::is_empty",
4719        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4720    )]
4721    pub description: String,
4722    /**
4723     *
4724     */
4725    #[serde(
4726        default,
4727        skip_serializing_if = "Option::is_none",
4728        rename = "responsible_for_employee_w2"
4729    )]
4730    pub responsible_for_employee_w_2: Option<bool>,
4731    /**
4732     *
4733     */
4734    #[serde(default, skip_serializing_if = "Option::is_none")]
4735    pub responsible_for_employer_taxes: Option<bool>,
4736}
4737
4738///
4739#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4740pub struct PutCompanyBenefitRequest {
4741    /**
4742     *
4743     */
4744    #[serde(default, skip_serializing_if = "Option::is_none")]
4745    pub active: Option<bool>,
4746    /**
4747     *
4748     */
4749    #[serde(
4750        default,
4751        skip_serializing_if = "String::is_empty",
4752        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4753    )]
4754    pub description: String,
4755    /**
4756     * A unique identifier of the employee in Gusto.
4757     */
4758    #[serde(
4759        default,
4760        skip_serializing_if = "String::is_empty",
4761        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4762    )]
4763    pub version: String,
4764}
4765
4766#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4767pub struct PostCompanyEarningTypesRequest {
4768    /**
4769     * A unique identifier of the employee in Gusto.
4770     */
4771    #[serde(
4772        default,
4773        skip_serializing_if = "String::is_empty",
4774        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4775    )]
4776    pub name: String,
4777}
4778
4779#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4780pub struct PutCompanyEarningTypeRequest {
4781    /**
4782     * A unique identifier of the employee in Gusto.
4783     */
4784    #[serde(
4785        default,
4786        skip_serializing_if = "String::is_empty",
4787        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4788    )]
4789    pub name: String,
4790}
4791
4792///
4793#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4794pub struct PostEmployeeBenefitsRequest {
4795    /**
4796     *
4797     */
4798    #[serde(default, skip_serializing_if = "Option::is_none")]
4799    pub active: Option<bool>,
4800    /**
4801     *
4802     */
4803    #[serde(default, skip_serializing_if = "Option::is_none")]
4804    pub catch_up: Option<bool>,
4805    /**
4806     * The ID of the employee in Gusto.
4807     */
4808    #[serde(
4809        default,
4810        skip_serializing_if = "crate::utils::zero_f64",
4811        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
4812    )]
4813    pub company_benefit_id: f64,
4814    /**
4815     *
4816     */
4817    #[serde(
4818        default,
4819        skip_serializing_if = "String::is_empty",
4820        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4821    )]
4822    pub company_contribution: String,
4823    /**
4824     *
4825     */
4826    #[serde(
4827        default,
4828        skip_serializing_if = "String::is_empty",
4829        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4830    )]
4831    pub company_contribution_annual_maximum: String,
4832    /**
4833     *
4834     */
4835    #[serde(default, skip_serializing_if = "Option::is_none")]
4836    pub contribute_as_percentage: Option<bool>,
4837    /**
4838     *
4839     */
4840    #[serde(
4841        default,
4842        skip_serializing_if = "String::is_empty",
4843        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4844    )]
4845    pub coverage_amount: String,
4846    /**
4847     *
4848     */
4849    #[serde(
4850        default,
4851        skip_serializing_if = "String::is_empty",
4852        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4853    )]
4854    pub coverage_salary_multiplier: String,
4855    /**
4856     *
4857     */
4858    #[serde(default, skip_serializing_if = "Option::is_none")]
4859    pub deduct_as_percentage: Option<bool>,
4860    /**
4861     * Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not "unset", coverage amount and coverage salary multiplier are ignored.
4862     */
4863    #[serde(default, skip_serializing_if = "Option::is_none")]
4864    pub deduction_reduces_taxable_income: Option<DeductionReducesTaxableIncome>,
4865    /**
4866     *
4867     */
4868    #[serde(
4869        default,
4870        skip_serializing_if = "String::is_empty",
4871        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4872    )]
4873    pub employee_deduction: String,
4874    /**
4875     *
4876     */
4877    #[serde(
4878        default,
4879        skip_serializing_if = "String::is_empty",
4880        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4881    )]
4882    pub employee_deduction_annual_maximum: String,
4883    /**
4884     *
4885     */
4886    #[serde(
4887        default,
4888        skip_serializing_if = "String::is_empty",
4889        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4890    )]
4891    pub limit_option: String,
4892}
4893
4894#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
4895pub struct PutEmployeeBenefitRequest {
4896    /**
4897     * Whether the employee is terminated.
4898     */
4899    #[serde(default, skip_serializing_if = "Option::is_none")]
4900    pub active: Option<bool>,
4901    /**
4902     * Whether the employee is terminated.
4903     */
4904    #[serde(default, skip_serializing_if = "Option::is_none")]
4905    pub catch_up: Option<bool>,
4906    /**
4907     * A unique identifier of the employee in Gusto.
4908     */
4909    #[serde(
4910        default,
4911        skip_serializing_if = "String::is_empty",
4912        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4913    )]
4914    pub company_contribution: String,
4915    /**
4916     * A unique identifier of the employee in Gusto.
4917     */
4918    #[serde(
4919        default,
4920        skip_serializing_if = "String::is_empty",
4921        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4922    )]
4923    pub company_contribution_annual_maximum: String,
4924    /**
4925     * Whether the employee is terminated.
4926     */
4927    #[serde(default, skip_serializing_if = "Option::is_none")]
4928    pub contribute_as_percentage: Option<bool>,
4929    /**
4930     * A unique identifier of the employee in Gusto.
4931     */
4932    #[serde(
4933        default,
4934        skip_serializing_if = "String::is_empty",
4935        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4936    )]
4937    pub coverage_amount: String,
4938    /**
4939     * A unique identifier of the employee in Gusto.
4940     */
4941    #[serde(
4942        default,
4943        skip_serializing_if = "String::is_empty",
4944        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4945    )]
4946    pub coverage_salary_multiplier: String,
4947    /**
4948     * Whether the employee is terminated.
4949     */
4950    #[serde(default, skip_serializing_if = "Option::is_none")]
4951    pub deduct_as_percentage: Option<bool>,
4952    /**
4953     * Whether the employee deduction reduces taxable income or not. Only valid for Group Term Life benefits. Note: when the value is not "unset", coverage amount and coverage salary multiplier are ignored.
4954     */
4955    #[serde(default, skip_serializing_if = "Option::is_none")]
4956    pub deduction_reduces_taxable_income: Option<DeductionReducesTaxableIncome>,
4957    /**
4958     * A unique identifier of the employee in Gusto.
4959     */
4960    #[serde(
4961        default,
4962        skip_serializing_if = "String::is_empty",
4963        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4964    )]
4965    pub employee_deduction: String,
4966    /**
4967     * A unique identifier of the employee in Gusto.
4968     */
4969    #[serde(
4970        default,
4971        skip_serializing_if = "String::is_empty",
4972        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4973    )]
4974    pub employee_deduction_annual_maximum: String,
4975    /**
4976     * A unique identifier of the employee in Gusto.
4977     */
4978    #[serde(
4979        default,
4980        skip_serializing_if = "String::is_empty",
4981        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4982    )]
4983    pub limit_option: String,
4984    /**
4985     * A unique identifier of the employee in Gusto.
4986     */
4987    #[serde(
4988        default,
4989        skip_serializing_if = "String::is_empty",
4990        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
4991    )]
4992    pub version: String,
4993}
4994
4995#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
4996pub enum GetCompanyPayrollsInclude {
4997    #[serde(rename = "benefits")]
4998    Benefits,
4999    #[serde(rename = "deductions")]
5000    Deductions,
5001    #[serde(rename = "taxes")]
5002    Taxes,
5003    #[serde(rename = "")]
5004    #[default]
5005    Noop,
5006    #[serde(other)]
5007    FallthroughString,
5008}
5009
5010impl std::fmt::Display for GetCompanyPayrollsInclude {
5011    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5012        match self {
5013            GetCompanyPayrollsInclude::Benefits => "benefits",
5014            GetCompanyPayrollsInclude::Deductions => "deductions",
5015            GetCompanyPayrollsInclude::Taxes => "taxes",
5016            GetCompanyPayrollsInclude::Noop => "",
5017            GetCompanyPayrollsInclude::FallthroughString => "*",
5018        }
5019        .fmt(f)
5020    }
5021}
5022
5023impl GetCompanyPayrollsInclude {
5024    pub fn is_noop(&self) -> bool {
5025        matches!(self, GetCompanyPayrollsInclude::Noop)
5026    }
5027}
5028
5029#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
5030pub enum OffCycleReason {
5031    #[serde(rename = "Bonus")]
5032    Bonus,
5033    #[serde(rename = "Correction")]
5034    Correction,
5035    #[serde(rename = "")]
5036    #[default]
5037    Noop,
5038    #[serde(other)]
5039    FallthroughString,
5040}
5041
5042impl std::fmt::Display for OffCycleReason {
5043    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5044        match self {
5045            OffCycleReason::Bonus => "Bonus",
5046            OffCycleReason::Correction => "Correction",
5047            OffCycleReason::Noop => "",
5048            OffCycleReason::FallthroughString => "*",
5049        }
5050        .fmt(f)
5051    }
5052}
5053
5054impl OffCycleReason {
5055    pub fn is_noop(&self) -> bool {
5056        matches!(self, OffCycleReason::Noop)
5057    }
5058}
5059
5060#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5061pub struct PostCompanyPayrollsRequest {
5062    #[serde(
5063        default,
5064        skip_serializing_if = "Option::is_none",
5065        deserialize_with = "crate::utils::date_format::deserialize"
5066    )]
5067    pub check_date: Option<chrono::NaiveDate>,
5068    #[serde(
5069        default,
5070        skip_serializing_if = "Vec::is_empty",
5071        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
5072    )]
5073    pub employee_ids: Vec<i64>,
5074    #[serde(
5075        default,
5076        skip_serializing_if = "Option::is_none",
5077        deserialize_with = "crate::utils::date_format::deserialize"
5078    )]
5079    pub end_date: Option<chrono::NaiveDate>,
5080    /**
5081     * A unique identifier of the employee in Gusto.
5082     */
5083    #[serde(
5084        default,
5085        skip_serializing_if = "String::is_empty",
5086        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5087    )]
5088    pub off_cycle: String,
5089    #[serde(default, skip_serializing_if = "Option::is_none")]
5090    pub off_cycle_reason: Option<OffCycleReason>,
5091    #[serde(
5092        default,
5093        skip_serializing_if = "Option::is_none",
5094        deserialize_with = "crate::utils::date_format::deserialize"
5095    )]
5096    pub start_date: Option<chrono::NaiveDate>,
5097}
5098
5099/// An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements.
5100#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5101pub struct PutCompanyPayrollsRequestEmployeeCompensationsFixed {
5102    /**
5103     * An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements.
5104     */
5105    #[serde(
5106        default,
5107        skip_serializing_if = "String::is_empty",
5108        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5109    )]
5110    pub amount: String,
5111    /**
5112     * An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements.
5113     */
5114    #[serde(
5115        default,
5116        skip_serializing_if = "crate::utils::zero_i64",
5117        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
5118    )]
5119    pub job_id: i64,
5120    /**
5121     * An array of fixed compensations for the employee. Fixed compensations include tips, bonuses, and one time reimbursements.
5122     */
5123    #[serde(
5124        default,
5125        skip_serializing_if = "String::is_empty",
5126        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5127    )]
5128    pub name: String,
5129}
5130
5131/// An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours.
5132#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5133pub struct PutCompanyPayrollsRequestEmployeeCompensationsHourly {
5134    /**
5135     * An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours.
5136     */
5137    #[serde(
5138        default,
5139        skip_serializing_if = "String::is_empty",
5140        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5141    )]
5142    pub hours: String,
5143    /**
5144     * An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours.
5145     */
5146    #[serde(
5147        default,
5148        skip_serializing_if = "crate::utils::zero_i64",
5149        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
5150    )]
5151    pub job_id: i64,
5152    /**
5153     * An array of hourly compensations for the employee. Hourly compensations include regular, overtime, and double overtime hours.
5154     */
5155    #[serde(
5156        default,
5157        skip_serializing_if = "String::is_empty",
5158        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5159    )]
5160    pub name: String,
5161}
5162
5163///
5164#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5165pub struct PutCompanyPayrollsRequestEmployeeCompensations {
5166    /**
5167     * The unique identifier of the location in Gusto.
5168     */
5169    #[serde(
5170        default,
5171        skip_serializing_if = "crate::utils::zero_i64",
5172        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
5173    )]
5174    pub employee_id: i64,
5175    /**
5176     *
5177     */
5178    #[serde(
5179        default,
5180        skip_serializing_if = "Vec::is_empty",
5181        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
5182    )]
5183    pub fixed_compensations: Vec<PutCompanyPayrollsRequestEmployeeCompensationsFixed>,
5184    /**
5185     *
5186     */
5187    #[serde(
5188        default,
5189        skip_serializing_if = "Vec::is_empty",
5190        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
5191    )]
5192    pub hourly_compensations: Vec<PutCompanyPayrollsRequestEmployeeCompensationsHourly>,
5193    /**
5194     *
5195     */
5196    #[serde(
5197        default,
5198        skip_serializing_if = "Vec::is_empty",
5199        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
5200    )]
5201    pub paid_time_off: Vec<PayrollEmployeeCompensationsPaidTimeOff>,
5202}
5203
5204#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5205pub struct PutCompanyPayrollsRequest {
5206    #[serde(
5207        default,
5208        skip_serializing_if = "Vec::is_empty",
5209        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
5210    )]
5211    pub employee_compensations: Vec<PutCompanyPayrollsRequestEmployeeCompensations>,
5212    /**
5213     * A unique identifier of the employee in Gusto.
5214     */
5215    #[serde(
5216        default,
5217        skip_serializing_if = "String::is_empty",
5218        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5219    )]
5220    pub version: String,
5221}
5222
5223/// Information for the user who will be the primary payroll administrator for the new company.
5224#[derive(Serialize, Default, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5225pub struct User {
5226    /**
5227     * A unique identifier of the employee in Gusto.
5228     */
5229    #[serde(
5230        default,
5231        skip_serializing_if = "String::is_empty",
5232        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5233    )]
5234    pub email: String,
5235    /**
5236     * A unique identifier of the employee in Gusto.
5237     */
5238    #[serde(
5239        default,
5240        skip_serializing_if = "String::is_empty",
5241        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5242    )]
5243    pub first_name: String,
5244    /**
5245     * A unique identifier of the employee in Gusto.
5246     */
5247    #[serde(
5248        default,
5249        skip_serializing_if = "String::is_empty",
5250        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5251    )]
5252    pub last_name: String,
5253    /**
5254     * Information for the user who will be the primary payroll administrator for the new company.
5255     */
5256    #[serde(
5257        default,
5258        skip_serializing_if = "String::is_empty",
5259        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5260    )]
5261    pub phone: String,
5262}
5263
5264#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5265pub struct PostPartnerManagedCompaniesRequestCompany {
5266    /**
5267     * A unique identifier of the employee in Gusto.
5268     */
5269    #[serde(
5270        default,
5271        skip_serializing_if = "String::is_empty",
5272        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5273    )]
5274    pub ein: String,
5275    /**
5276     * A unique identifier of the employee in Gusto.
5277     */
5278    #[serde(
5279        default,
5280        skip_serializing_if = "String::is_empty",
5281        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5282    )]
5283    pub name: String,
5284    /**
5285     * A unique identifier of the employee in Gusto.
5286     */
5287    #[serde(
5288        default,
5289        skip_serializing_if = "String::is_empty",
5290        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5291    )]
5292    pub trade_name: String,
5293}
5294
5295///
5296#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5297pub struct PostPartnerManagedCompaniesRequest {
5298    pub company: PostPartnerManagedCompaniesRequestCompany,
5299    /**
5300     * Information for the user who will be the primary payroll administrator for the new company.
5301     */
5302    pub user: User,
5303}
5304
5305///
5306#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5307pub struct PostPartnerManagedCompaniesResponse {
5308    /**
5309     *
5310     */
5311    #[serde(
5312        default,
5313        skip_serializing_if = "String::is_empty",
5314        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5315    )]
5316    pub access_token: String,
5317    /**
5318     *
5319     */
5320    #[serde(
5321        default,
5322        skip_serializing_if = "String::is_empty",
5323        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5324    )]
5325    pub company_uuid: String,
5326    /**
5327     *
5328     */
5329    #[serde(
5330        default,
5331        skip_serializing_if = "String::is_empty",
5332        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5333    )]
5334    pub refresh_token: String,
5335}
5336
5337#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5338pub struct Addresses {
5339    /**
5340     * A unique identifier of the employee in Gusto.
5341     */
5342    #[serde(
5343        default,
5344        skip_serializing_if = "String::is_empty",
5345        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5346    )]
5347    pub city: String,
5348    /**
5349     * A unique identifier of the employee in Gusto.
5350     */
5351    #[serde(
5352        default,
5353        skip_serializing_if = "String::is_empty",
5354        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5355    )]
5356    pub is_primary: String,
5357    /**
5358     * A unique identifier of the employee in Gusto.
5359     */
5360    #[serde(
5361        default,
5362        skip_serializing_if = "String::is_empty",
5363        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5364    )]
5365    pub phone: String,
5366    /**
5367     * A unique identifier of the employee in Gusto.
5368     */
5369    #[serde(
5370        default,
5371        skip_serializing_if = "String::is_empty",
5372        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5373    )]
5374    pub state: String,
5375    /**
5376     * A unique identifier of the employee in Gusto.
5377     */
5378    #[serde(
5379        default,
5380        skip_serializing_if = "String::is_empty",
5381        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5382    )]
5383    pub street_1: String,
5384    /**
5385     * A unique identifier of the employee in Gusto.
5386     */
5387    #[serde(
5388        default,
5389        skip_serializing_if = "String::is_empty",
5390        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5391    )]
5392    pub street_2: String,
5393    /**
5394     * A unique identifier of the employee in Gusto.
5395     */
5396    #[serde(
5397        default,
5398        skip_serializing_if = "String::is_empty",
5399        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5400    )]
5401    pub zip: String,
5402}
5403
5404#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5405pub struct PostProvisionRequestCompany {
5406    /**
5407     * The locations for the company. This includes mailing, work, and filing addresses.
5408     */
5409    #[serde(
5410        default,
5411        skip_serializing_if = "Vec::is_empty",
5412        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
5413    )]
5414    pub addresses: Vec<Addresses>,
5415    /**
5416     * A unique identifier of the employee in Gusto.
5417     */
5418    #[serde(
5419        default,
5420        skip_serializing_if = "String::is_empty",
5421        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5422    )]
5423    pub ein: String,
5424    /**
5425     * A unique identifier of the employee in Gusto.
5426     */
5427    #[serde(
5428        default,
5429        skip_serializing_if = "String::is_empty",
5430        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5431    )]
5432    pub name: String,
5433    /**
5434     * The ID of the employee in Gusto.
5435     */
5436    #[serde(
5437        default,
5438        skip_serializing_if = "crate::utils::zero_f64",
5439        deserialize_with = "crate::utils::deserialize_null_f64::deserialize"
5440    )]
5441    pub number_employees: f64,
5442    /**
5443     * An array of options for fields of type radio. Otherwise, null.
5444     */
5445    #[serde(
5446        default,
5447        skip_serializing_if = "Vec::is_empty",
5448        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
5449    )]
5450    pub states: Vec<String>,
5451    /**
5452     * A unique identifier of the employee in Gusto.
5453     */
5454    #[serde(
5455        default,
5456        skip_serializing_if = "String::is_empty",
5457        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5458    )]
5459    pub trade_name: String,
5460}
5461
5462///
5463#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5464pub struct PostProvisionRequest {
5465    pub company: PostProvisionRequestCompany,
5466    /**
5467     * Information for the user who will be the primary payroll administrator for the new company.
5468     */
5469    pub user: User,
5470}
5471
5472///
5473#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5474pub struct PostProvisionResponse {
5475    /**
5476     *
5477     */
5478    #[serde(
5479        default,
5480        skip_serializing_if = "String::is_empty",
5481        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5482    )]
5483    pub account_claim_url: String,
5484}
5485
5486#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5487pub struct GetEmployeeCustomFieldsResponse {
5488    /**
5489     * Custom fields are only included for the employee if the include param has the custom_fields value set
5490     */
5491    #[serde(
5492        default,
5493        skip_serializing_if = "Vec::is_empty",
5494        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
5495    )]
5496    pub custom_fields: Vec<EmployeeCustomField>,
5497}
5498
5499#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5500pub struct GetCompanyCustomFieldsResponse {
5501    #[serde(
5502        default,
5503        skip_serializing_if = "Vec::is_empty",
5504        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
5505    )]
5506    pub custom_fields: Vec<CompanyCustomField>,
5507}
5508
5509/**
5510 * Must be "Employee" if send_offer is set to true.
5511 */
5512#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema, Default)]
5513pub enum OnboardingPersonType {
5514    #[serde(rename = "Contractor")]
5515    Contractor,
5516    #[serde(rename = "Employee")]
5517    Employee,
5518    #[serde(rename = "")]
5519    #[default]
5520    Noop,
5521    #[serde(other)]
5522    FallthroughString,
5523}
5524
5525impl std::fmt::Display for OnboardingPersonType {
5526    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5527        match self {
5528            OnboardingPersonType::Contractor => "Contractor",
5529            OnboardingPersonType::Employee => "Employee",
5530            OnboardingPersonType::Noop => "",
5531            OnboardingPersonType::FallthroughString => "*",
5532        }
5533        .fmt(f)
5534    }
5535}
5536
5537impl OnboardingPersonType {
5538    pub fn is_noop(&self) -> bool {
5539        matches!(self, OnboardingPersonType::Noop)
5540    }
5541}
5542
5543///
5544#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5545pub struct PostCompanyJobApplicantsRequest {
5546    #[serde(
5547        default,
5548        skip_serializing_if = "Option::is_none",
5549        deserialize_with = "crate::utils::date_format::deserialize"
5550    )]
5551    pub date_of_birth: Option<chrono::NaiveDate>,
5552    /**
5553     * A unique identifier of the employee in Gusto.
5554     */
5555    #[serde(
5556        default,
5557        skip_serializing_if = "String::is_empty",
5558        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5559    )]
5560    pub email: String,
5561    /**
5562     * A unique identifier of the employee in Gusto.
5563     */
5564    #[serde(
5565        default,
5566        skip_serializing_if = "String::is_empty",
5567        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5568    )]
5569    pub first_name: String,
5570    /**
5571     *
5572     */
5573    #[serde(
5574        default,
5575        skip_serializing_if = "String::is_empty",
5576        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5577    )]
5578    pub job_title: String,
5579    /**
5580     * A unique identifier of the employee in Gusto.
5581     */
5582    #[serde(
5583        default,
5584        skip_serializing_if = "String::is_empty",
5585        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5586    )]
5587    pub last_name: String,
5588    /**
5589     * Must be "Employee" if send_offer is set to true.
5590     */
5591    #[serde(default, skip_serializing_if = "Option::is_none")]
5592    pub onboarding_person_type: Option<OnboardingPersonType>,
5593    /**
5594     *
5595     */
5596    #[serde(
5597        default,
5598        skip_serializing_if = "String::is_empty",
5599        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5600    )]
5601    pub phone: String,
5602    /**
5603     *
5604     */
5605    #[serde(default, skip_serializing_if = "Option::is_none")]
5606    pub send_offer: Option<bool>,
5607    #[serde(
5608        default,
5609        skip_serializing_if = "Option::is_none",
5610        deserialize_with = "crate::utils::date_format::deserialize"
5611    )]
5612    pub start_date: Option<chrono::NaiveDate>,
5613}
5614
5615///
5616#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5617pub struct PutCompanyJobApplicantRequest {
5618    #[serde(
5619        default,
5620        skip_serializing_if = "Option::is_none",
5621        deserialize_with = "crate::utils::date_format::deserialize"
5622    )]
5623    pub date_of_birth: Option<chrono::NaiveDate>,
5624    /**
5625     *
5626     */
5627    #[serde(
5628        default,
5629        skip_serializing_if = "String::is_empty",
5630        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5631    )]
5632    pub email: String,
5633    /**
5634     *
5635     */
5636    #[serde(
5637        default,
5638        skip_serializing_if = "String::is_empty",
5639        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5640    )]
5641    pub first_name: String,
5642    /**
5643     *
5644     */
5645    #[serde(
5646        default,
5647        skip_serializing_if = "String::is_empty",
5648        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5649    )]
5650    pub job_title: String,
5651    /**
5652     *
5653     */
5654    #[serde(
5655        default,
5656        skip_serializing_if = "String::is_empty",
5657        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5658    )]
5659    pub last_name: String,
5660    /**
5661     * Must be "Employee" if send_offer is set to true.
5662     */
5663    #[serde(default, skip_serializing_if = "Option::is_none")]
5664    pub onboarding_person_type: Option<OnboardingPersonType>,
5665    /**
5666     *
5667     */
5668    #[serde(
5669        default,
5670        skip_serializing_if = "String::is_empty",
5671        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5672    )]
5673    pub phone: String,
5674    /**
5675     *
5676     */
5677    #[serde(default, skip_serializing_if = "Option::is_none")]
5678    pub send_offer: Option<bool>,
5679    #[serde(
5680        default,
5681        skip_serializing_if = "Option::is_none",
5682        deserialize_with = "crate::utils::date_format::deserialize"
5683    )]
5684    pub start_date: Option<chrono::NaiveDate>,
5685}
5686
5687#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5688pub struct GetCompanyPayrollReversalsResponse {
5689    /**
5690     * A unique identifier of the employee in Gusto.
5691     */
5692    #[serde(
5693        default,
5694        skip_serializing_if = "String::is_empty",
5695        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5696    )]
5697    pub approved_at: String,
5698    /**
5699     * A unique identifier of the employee in Gusto.
5700     */
5701    #[serde(
5702        default,
5703        skip_serializing_if = "String::is_empty",
5704        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5705    )]
5706    pub category: String,
5707    /**
5708     * A unique identifier of the employee in Gusto.
5709     */
5710    #[serde(
5711        default,
5712        skip_serializing_if = "String::is_empty",
5713        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5714    )]
5715    pub reason: String,
5716    /**
5717     * The unique identifier of the location in Gusto.
5718     */
5719    #[serde(
5720        default,
5721        skip_serializing_if = "crate::utils::zero_i64",
5722        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
5723    )]
5724    pub reversal_payroll_id: i64,
5725    #[serde(
5726        default,
5727        skip_serializing_if = "Vec::is_empty",
5728        deserialize_with = "crate::utils::deserialize_null_vector::deserialize"
5729    )]
5730    pub reversed_employee_ids: Vec<i64>,
5731    /**
5732     * The unique identifier of the location in Gusto.
5733     */
5734    #[serde(
5735        default,
5736        skip_serializing_if = "crate::utils::zero_i64",
5737        deserialize_with = "crate::utils::deserialize_null_i64::deserialize"
5738    )]
5739    pub reversed_payroll_id: i64,
5740}
5741
5742///
5743#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5744pub struct PostCompanyAdminsRequest {
5745    /**
5746     * A unique identifier of the employee in Gusto.
5747     */
5748    #[serde(
5749        default,
5750        skip_serializing_if = "String::is_empty",
5751        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5752    )]
5753    pub email: String,
5754    /**
5755     * A unique identifier of the employee in Gusto.
5756     */
5757    #[serde(
5758        default,
5759        skip_serializing_if = "String::is_empty",
5760        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5761    )]
5762    pub first_name: String,
5763    /**
5764     * A unique identifier of the employee in Gusto.
5765     */
5766    #[serde(
5767        default,
5768        skip_serializing_if = "String::is_empty",
5769        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5770    )]
5771    pub last_name: String,
5772}
5773
5774#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5775pub struct GetCompanyFederalTaxDetailsResponse {
5776    /**
5777     * A unique identifier of the employee in Gusto.
5778     */
5779    #[serde(
5780        default,
5781        skip_serializing_if = "String::is_empty",
5782        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5783    )]
5784    pub ein: String,
5785    /**
5786     * Whether the employee is terminated.
5787     */
5788    #[serde(
5789        default,
5790        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
5791    )]
5792    pub ein_verified: bool,
5793    /**
5794     * A unique identifier of the employee in Gusto.
5795     */
5796    #[serde(
5797        default,
5798        skip_serializing_if = "String::is_empty",
5799        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5800    )]
5801    pub filing_form: String,
5802    /**
5803     * A unique identifier of the employee in Gusto.
5804     */
5805    #[serde(
5806        default,
5807        skip_serializing_if = "String::is_empty",
5808        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5809    )]
5810    pub legal_name: String,
5811    /**
5812     * A unique identifier of the employee in Gusto.
5813     */
5814    #[serde(
5815        default,
5816        skip_serializing_if = "String::is_empty",
5817        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5818    )]
5819    pub tax_payer_type: String,
5820    /**
5821     * Whether the employee is terminated.
5822     */
5823    #[serde(
5824        default,
5825        deserialize_with = "crate::utils::deserialize_null_boolean::deserialize"
5826    )]
5827    pub taxable_as_scorp: bool,
5828    /**
5829     * A unique identifier of the employee in Gusto.
5830     */
5831    #[serde(
5832        default,
5833        skip_serializing_if = "String::is_empty",
5834        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5835    )]
5836    pub version: String,
5837}
5838
5839#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)]
5840pub struct PutCompanyFederalTaxDetailsRequest {
5841    /**
5842     * A unique identifier of the employee in Gusto.
5843     */
5844    #[serde(
5845        default,
5846        skip_serializing_if = "String::is_empty",
5847        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5848    )]
5849    pub ein: String,
5850    /**
5851     * A unique identifier of the employee in Gusto.
5852     */
5853    #[serde(
5854        default,
5855        skip_serializing_if = "String::is_empty",
5856        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5857    )]
5858    pub filing_form: String,
5859    /**
5860     * A unique identifier of the employee in Gusto.
5861     */
5862    #[serde(
5863        default,
5864        skip_serializing_if = "String::is_empty",
5865        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5866    )]
5867    pub legal_name: String,
5868    /**
5869     * A unique identifier of the employee in Gusto.
5870     */
5871    #[serde(
5872        default,
5873        skip_serializing_if = "String::is_empty",
5874        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5875    )]
5876    pub tax_payer_type: String,
5877    /**
5878     * Whether the employee is terminated.
5879     */
5880    #[serde(default, skip_serializing_if = "Option::is_none")]
5881    pub taxable_as_scorp: Option<bool>,
5882    /**
5883     * A unique identifier of the employee in Gusto.
5884     */
5885    #[serde(
5886        default,
5887        skip_serializing_if = "String::is_empty",
5888        deserialize_with = "crate::utils::deserialize_null_string::deserialize"
5889    )]
5890    pub version: String,
5891}