amazon_spapi/models/services/
service_location.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ServiceLocation {
17 #[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 pub fn new() -> ServiceLocation {
27 ServiceLocation {
28 service_location_type: None,
29 address: None,
30 }
31 }
32}
33#[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