Skip to main content

naurt_api/models/
feature.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Feature {
16    #[serde(rename = "geometry")]
17    pub geometry: Box<models::FeatureGeometry>,
18    #[serde(rename = "properties")]
19    pub properties: Box<models::FeatureProperties>,
20    #[serde(rename = "type")]
21    pub r#type: Type,
22}
23
24impl Feature {
25    pub fn new(geometry: models::FeatureGeometry, properties: models::FeatureProperties, r#type: Type) -> Feature {
26        Feature {
27            geometry: Box::new(geometry),
28            properties: Box::new(properties),
29            r#type,
30        }
31    }
32}
33/// 
34#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
35pub enum Type {
36    #[serde(rename = "Feature")]
37    Feature,
38}
39
40impl Default for Type {
41    fn default() -> Type {
42        Self::Feature
43    }
44}
45