Skip to main content

geoengine_api_client/models/
dataset.rs

1/*
2 * Geo Engine API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * Contact: dev@geoengine.de
7 * Generated by: https://openapi-generator.tech
8 */
9
10use crate::models;
11use serde::{Deserialize, Serialize};
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct Dataset {
15    #[serde(rename = "dataPath", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
16    pub data_path: Option<Option<Box<models::DataPath>>>,
17    #[serde(rename = "description")]
18    pub description: String,
19    #[serde(rename = "displayName")]
20    pub display_name: String,
21    #[serde(rename = "id")]
22    pub id: uuid::Uuid,
23    #[serde(rename = "name")]
24    pub name: String,
25    #[serde(rename = "provenance", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub provenance: Option<Option<Vec<models::Provenance>>>,
27    #[serde(rename = "resultDescriptor")]
28    pub result_descriptor: Box<models::TypedResultDescriptor>,
29    #[serde(rename = "sourceOperator")]
30    pub source_operator: String,
31    #[serde(rename = "symbology", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
32    pub symbology: Option<Option<Box<models::Symbology>>>,
33    #[serde(rename = "tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
34    pub tags: Option<Option<Vec<String>>>,
35}
36
37impl Dataset {
38    pub fn new(description: String, display_name: String, id: uuid::Uuid, name: String, result_descriptor: models::TypedResultDescriptor, source_operator: String) -> Dataset {
39        Dataset {
40            data_path: None,
41            description,
42            display_name,
43            id,
44            name,
45            provenance: None,
46            result_descriptor: Box::new(result_descriptor),
47            source_operator,
48            symbology: None,
49            tags: None,
50        }
51    }
52}
53