trieve_client/models/
granularity.rs

1/*
2 * Trieve API
3 *
4 * Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
5 *
6 * The version of the OpenAPI document: 0.11.7
7 * Contact: developers@trieve.ai
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// 
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
15pub enum Granularity {
16    #[serde(rename = "minute")]
17    Minute,
18    #[serde(rename = "second")]
19    Second,
20    #[serde(rename = "hour")]
21    Hour,
22    #[serde(rename = "day")]
23    Day,
24
25}
26
27impl ToString for Granularity {
28    fn to_string(&self) -> String {
29        match self {
30            Self::Minute => String::from("minute"),
31            Self::Second => String::from("second"),
32            Self::Hour => String::from("hour"),
33            Self::Day => String::from("day"),
34        }
35    }
36}
37
38impl Default for Granularity {
39    fn default() -> Granularity {
40        Self::Minute
41    }
42}
43