geoengine_api_client/models/
gdal_meta_data_static.rs1use crate::models;
11use serde::{Deserialize, Serialize};
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct GdalMetaDataStatic {
15 #[serde(rename = "cacheTtl", skip_serializing_if = "Option::is_none")]
16 pub cache_ttl: Option<i32>,
17 #[serde(rename = "params")]
18 pub params: Box<models::GdalDatasetParameters>,
19 #[serde(rename = "resultDescriptor")]
20 pub result_descriptor: Box<models::RasterResultDescriptor>,
21 #[serde(rename = "time", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22 pub time: Option<Option<Box<models::TimeInterval>>>,
23 #[serde(rename = "type")]
24 pub r#type: Type,
25}
26
27impl GdalMetaDataStatic {
28 pub fn new(params: models::GdalDatasetParameters, result_descriptor: models::RasterResultDescriptor, r#type: Type) -> GdalMetaDataStatic {
29 GdalMetaDataStatic {
30 cache_ttl: None,
31 params: Box::new(params),
32 result_descriptor: Box::new(result_descriptor),
33 time: None,
34 r#type,
35 }
36 }
37}
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Type {
41 #[serde(rename = "GdalStatic")]
42 GdalStatic,
43}
44
45impl Default for Type {
46 fn default() -> Type {
47 Self::GdalStatic
48 }
49}
50