Skip to main content

geoengine_api_client/models/
update_layer.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 UpdateLayer {
15    #[serde(rename = "description")]
16    pub description: String,
17    /// metadata used for loading the data
18    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
19    pub metadata: Option<std::collections::HashMap<String, String>>,
20    #[serde(rename = "name")]
21    pub name: String,
22    /// properties, for instance, to be rendered in the UI
23    #[serde(rename = "properties", skip_serializing_if = "Option::is_none")]
24    pub properties: Option<Vec<Vec<String>>>,
25    #[serde(rename = "symbology", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub symbology: Option<Option<Box<models::Symbology>>>,
27    #[serde(rename = "workflow")]
28    pub workflow: Box<models::Workflow>,
29}
30
31impl UpdateLayer {
32    pub fn new(description: String, name: String, workflow: models::Workflow) -> UpdateLayer {
33        UpdateLayer {
34            description,
35            metadata: None,
36            name,
37            properties: None,
38            symbology: None,
39            workflow: Box::new(workflow),
40        }
41    }
42}
43