Skip to main content

geoengine_api_client/models/
vector_result_descriptor.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 VectorResultDescriptor {
16    #[serde(rename = "bbox", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
17    pub bbox: Option<Option<Box<models::BoundingBox2D>>>,
18    #[serde(rename = "columns")]
19    pub columns: std::collections::HashMap<String, models::VectorColumnInfo>,
20    #[serde(rename = "dataType")]
21    pub data_type: models::VectorDataType,
22    #[serde(rename = "spatialReference")]
23    pub spatial_reference: String,
24    #[serde(rename = "time", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub time: Option<Option<Box<models::TimeInterval>>>,
26}
27
28impl VectorResultDescriptor {
29    pub fn new(columns: std::collections::HashMap<String, models::VectorColumnInfo>, data_type: models::VectorDataType, spatial_reference: String) -> VectorResultDescriptor {
30        VectorResultDescriptor {
31            bbox: None,
32            columns,
33            data_type,
34            spatial_reference,
35            time: None,
36        }
37    }
38}
39