Skip to main content

naurt_api/models/
geojson_type.rs

1/*
2 * Naurt API
3 *
4 * OpenAPI specification for Naurt's APIs. 
5 *
6 * The version of the OpenAPI document: 0.1.2
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// GeojsonType : Use this to switch between a key-value style GeoJSON or a classic GeoJSON 
15/// Use this to switch between a key-value style GeoJSON or a classic GeoJSON 
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum GeojsonType {
18    #[serde(rename = "geojson")]
19    Geojson,
20    #[serde(rename = "key_value")]
21    KeyValue,
22
23}
24
25impl std::fmt::Display for GeojsonType {
26    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
27        match self {
28            Self::Geojson => write!(f, "geojson"),
29            Self::KeyValue => write!(f, "key_value"),
30        }
31    }
32}
33
34impl Default for GeojsonType {
35    fn default() -> GeojsonType {
36        Self::Geojson
37    }
38}
39