amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * 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
 */

use crate::models;
use serde::{Deserialize, Serialize};

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