amazon_spapi/models/services/
service_location.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/// ServiceLocation : Information about the location of the service job.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ServiceLocation {
17    /// The location of the service job.
18    #[serde(rename = "serviceLocationType", skip_serializing_if = "Option::is_none")]
19    pub service_location_type: Option<ServiceLocationType>,
20    #[serde(rename = "address", skip_serializing_if = "Option::is_none")]
21    pub address: Option<Box<models::services::Address>>,
22}
23
24impl ServiceLocation {
25    /// Information about the location of the service job.
26    pub fn new() -> ServiceLocation {
27        ServiceLocation {
28            service_location_type: None,
29            address: None,
30        }
31    }
32}
33/// The location of the service job.
34#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
35pub enum ServiceLocationType {
36    #[serde(rename = "IN_HOME")]
37    InHome,
38    #[serde(rename = "IN_STORE")]
39    InStore,
40    #[serde(rename = "ONLINE")]
41    Online,
42}
43
44impl Default for ServiceLocationType {
45    fn default() -> ServiceLocationType {
46        Self::InHome
47    }
48}
49