Skip to main content

geoengine_api_client/models/
layer_listing.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 LayerListing {
16    #[serde(rename = "description")]
17    pub description: String,
18    #[serde(rename = "id")]
19    pub id: Box<models::ProviderLayerId>,
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 = "type")]
26    pub r#type: Type,
27}
28
29impl LayerListing {
30    pub fn new(description: String, id: models::ProviderLayerId, name: String, r#type: Type) -> LayerListing {
31        LayerListing {
32            description,
33            id: Box::new(id),
34            name,
35            properties: None,
36            r#type,
37        }
38    }
39}
40/// 
41#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
42pub enum Type {
43    #[serde(rename = "layer")]
44    Layer,
45}
46
47impl Default for Type {
48    fn default() -> Type {
49        Self::Layer
50    }
51}
52