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

/// ServiceLocation : Information about the location of the service job.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ServiceLocation {
    /// The location of the service job.
    #[serde(rename = "serviceLocationType", skip_serializing_if = "Option::is_none")]
    pub service_location_type: Option<ServiceLocationType>,
    #[serde(rename = "address", skip_serializing_if = "Option::is_none")]
    pub address: Option<Box<models::services::Address>>,
}

impl ServiceLocation {
    /// Information about the location of the service job.
    pub fn new() -> ServiceLocation {
        ServiceLocation {
            service_location_type: None,
            address: None,
        }
    }
}
/// The location of the service job.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ServiceLocationType {
    #[serde(rename = "IN_HOME")]
    InHome,
    #[serde(rename = "IN_STORE")]
    InStore,
    #[serde(rename = "ONLINE")]
    Online,
}

impl Default for ServiceLocationType {
    fn default() -> ServiceLocationType {
        Self::InHome
    }
}