Skip to main content

naurt_api/models/
key_value.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 KeyValue {
16    #[serde(rename = "building", skip_serializing_if = "Option::is_none")]
17    pub building: Option<Box<models::Polygon>>,
18    #[serde(rename = "default_geocode")]
19    pub default_geocode: Box<models::Point>,
20    #[serde(rename = "entrance", skip_serializing_if = "Option::is_none")]
21    pub entrance: Option<Box<models::Multipoint>>,
22    #[serde(rename = "parking", skip_serializing_if = "Option::is_none")]
23    pub parking: Option<Box<models::Polygon>>,
24}
25
26impl KeyValue {
27    pub fn new(default_geocode: models::Point) -> KeyValue {
28        KeyValue {
29            building: None,
30            default_geocode: Box::new(default_geocode),
31            entrance: None,
32            parking: None,
33        }
34    }
35}
36