Skip to main content

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