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