Skip to main content

geoengine_api_client/models/
continuous_measurement.rs

1/*
2 * Geo Engine API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 0.9.0
7 * Contact: dev@geoengine.de
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 ContinuousMeasurement {
16    #[serde(rename = "measurement")]
17    pub measurement: String,
18    #[serde(rename = "type")]
19    pub r#type: Type,
20    #[serde(rename = "unit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub unit: Option<Option<String>>,
22}
23
24impl ContinuousMeasurement {
25    pub fn new(measurement: String, r#type: Type) -> ContinuousMeasurement {
26        ContinuousMeasurement {
27            measurement,
28            r#type,
29            unit: None,
30        }
31    }
32}
33/// 
34#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
35pub enum Type {
36    #[serde(rename = "continuous")]
37    Continuous,
38}
39
40impl Default for Type {
41    fn default() -> Type {
42        Self::Continuous
43    }
44}
45