geoengine_api_client/models/
usage_summary_granularity.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum UsageSummaryGranularity {
17 #[serde(rename = "minutes")]
18 Minutes,
19 #[serde(rename = "hours")]
20 Hours,
21 #[serde(rename = "days")]
22 Days,
23 #[serde(rename = "months")]
24 Months,
25 #[serde(rename = "years")]
26 Years,
27
28}
29
30impl std::fmt::Display for UsageSummaryGranularity {
31 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
32 match self {
33 Self::Minutes => write!(f, "minutes"),
34 Self::Hours => write!(f, "hours"),
35 Self::Days => write!(f, "days"),
36 Self::Months => write!(f, "months"),
37 Self::Years => write!(f, "years"),
38 }
39 }
40}
41
42impl Default for UsageSummaryGranularity {
43 fn default() -> UsageSummaryGranularity {
44 Self::Minutes
45 }
46}
47