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};

/// Poa : Proof of Appointment (POA) details.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Poa {
    #[serde(rename = "appointmentTime", skip_serializing_if = "Option::is_none")]
    pub appointment_time: Option<Box<models::services::AppointmentTime>>,
    /// A list of technicians.
    #[serde(rename = "technicians", skip_serializing_if = "Option::is_none")]
    pub technicians: Option<Vec<models::services::Technician>>,
    /// The identifier of the technician who uploaded the POA.
    #[serde(rename = "uploadingTechnician", skip_serializing_if = "Option::is_none")]
    pub uploading_technician: Option<String>,
    /// The date and time when the POA was uploaded in ISO 8601 format.
    #[serde(rename = "uploadTime", skip_serializing_if = "Option::is_none")]
    pub upload_time: Option<String>,
    /// The type of POA uploaded.
    #[serde(rename = "poaType", skip_serializing_if = "Option::is_none")]
    pub poa_type: Option<PoaType>,
}

impl Poa {
    /// Proof of Appointment (POA) details.
    pub fn new() -> Poa {
        Poa {
            appointment_time: None,
            technicians: None,
            uploading_technician: None,
            upload_time: None,
            poa_type: None,
        }
    }
}
/// The type of POA uploaded.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PoaType {
    #[serde(rename = "NO_SIGNATURE_DUMMY_POS")]
    NoSignatureDummyPos,
    #[serde(rename = "CUSTOMER_SIGNATURE")]
    CustomerSignature,
    #[serde(rename = "DUMMY_RECEIPT")]
    DummyReceipt,
    #[serde(rename = "POA_RECEIPT")]
    PoaReceipt,
}

impl Default for PoaType {
    fn default() -> PoaType {
        Self::NoSignatureDummyPos
    }
}