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