Skip to main content

amazon_spapi/models/supply_sources_2020_07_01/
time_unit.rs

1/*
2 * Selling Partner API for Supply Sources
3 *
4 * Manage configurations and capabilities of seller supply sources.
5 *
6 * The version of the OpenAPI document: 2020-07-01
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// TimeUnit : The time unit
15/// The time unit
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum TimeUnit {
18    #[serde(rename = "Hours")]
19    Hours,
20    #[serde(rename = "Minutes")]
21    Minutes,
22    #[serde(rename = "Days")]
23    Days,
24
25}
26
27impl std::fmt::Display for TimeUnit {
28    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29        match self {
30            Self::Hours => write!(f, "Hours"),
31            Self::Minutes => write!(f, "Minutes"),
32            Self::Days => write!(f, "Days"),
33        }
34    }
35}
36
37impl Default for TimeUnit {
38    fn default() -> TimeUnit {
39        Self::Hours
40    }
41}
42