1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
 * Selling Partner API for Services
 *
 * With the Services API, you can build applications that help service providers get and modify their service orders and manage their resources.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

/// Appointment : The details of an appointment.



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Appointment {
    /// The appointment identifier.
    #[serde(default, rename = "appointmentId", skip_serializing_if = "Option::is_none")]
    pub appointment_id: Option<String>,
    /// The status of the appointment.
    #[serde(default, rename = "appointmentStatus", skip_serializing_if = "Option::is_none")]
    pub appointment_status: Option<AppointmentStatus>,
    #[serde(default, rename = "appointmentTime", skip_serializing_if = "Option::is_none")]
    pub appointment_time: Option<Box<crate::models::AppointmentTime>>,
    /// A list of technicians assigned to the service job.
    #[serde(default, rename = "assignedTechnicians", skip_serializing_if = "Option::is_none")]
    pub assigned_technicians: Option<Vec<crate::models::Technician>>,
    /// The appointment identifier.
    #[serde(default, rename = "rescheduledAppointmentId", skip_serializing_if = "Option::is_none")]
    pub rescheduled_appointment_id: Option<String>,
    #[serde(default, rename = "poa", skip_serializing_if = "Option::is_none")]
    pub poa: Option<Box<crate::models::Poa>>,
}

impl Appointment {
    /// The details of an appointment.
    pub fn new() -> Appointment {
        Appointment {
            appointment_id: None,
            appointment_status: None,
            appointment_time: None,
            assigned_technicians: None,
            rescheduled_appointment_id: None,
            poa: None,
        }
    }
}

/// The status of the appointment.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AppointmentStatus {
    #[serde(rename = "ACTIVE")]
    ACTIVE,
    #[serde(rename = "CANCELLED")]
    CANCELLED,
    #[serde(rename = "COMPLETED")]
    COMPLETED,
}

impl Default for AppointmentStatus {
    fn default() -> AppointmentStatus {
        Self::ACTIVE
    }
}