amazon_spapi/models/services/
appointment.rs

1/*
2 * Selling Partner API for Services
3 *
4 * With the Services API, you can build applications that help service providers get and modify their service orders and manage their resources.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Appointment : The details of an appointment.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Appointment {
17    /// The appointment identifier.
18    #[serde(rename = "appointmentId", skip_serializing_if = "Option::is_none")]
19    pub appointment_id: Option<String>,
20    /// The status of the appointment.
21    #[serde(rename = "appointmentStatus", skip_serializing_if = "Option::is_none")]
22    pub appointment_status: Option<AppointmentStatus>,
23    #[serde(rename = "appointmentTime", skip_serializing_if = "Option::is_none")]
24    pub appointment_time: Option<Box<models::services::AppointmentTime>>,
25    /// A list of technicians assigned to the service job.
26    #[serde(rename = "assignedTechnicians", skip_serializing_if = "Option::is_none")]
27    pub assigned_technicians: Option<Vec<models::services::Technician>>,
28    /// The appointment identifier.
29    #[serde(rename = "rescheduledAppointmentId", skip_serializing_if = "Option::is_none")]
30    pub rescheduled_appointment_id: Option<String>,
31    #[serde(rename = "poa", skip_serializing_if = "Option::is_none")]
32    pub poa: Option<Box<models::services::Poa>>,
33}
34
35impl Appointment {
36    /// The details of an appointment.
37    pub fn new() -> Appointment {
38        Appointment {
39            appointment_id: None,
40            appointment_status: None,
41            appointment_time: None,
42            assigned_technicians: None,
43            rescheduled_appointment_id: None,
44            poa: None,
45        }
46    }
47}
48/// The status of the appointment.
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum AppointmentStatus {
51    #[serde(rename = "ACTIVE")]
52    Active,
53    #[serde(rename = "CANCELLED")]
54    Cancelled,
55    #[serde(rename = "COMPLETED")]
56    Completed,
57}
58
59impl Default for AppointmentStatus {
60    fn default() -> AppointmentStatus {
61        Self::Active
62    }
63}
64