geoengine_api_client/models/
layer_listing.rs1use crate::models;
11use serde::{Deserialize, Serialize};
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct LayerListing {
15 #[serde(rename = "description")]
16 pub description: String,
17 #[serde(rename = "id")]
18 pub id: Box<models::ProviderLayerId>,
19 #[serde(rename = "name")]
20 pub name: String,
21 #[serde(rename = "properties", skip_serializing_if = "Option::is_none")]
23 pub properties: Option<Vec<Vec<String>>>,
24 #[serde(rename = "type")]
25 pub r#type: Type,
26}
27
28impl LayerListing {
29 pub fn new(description: String, id: models::ProviderLayerId, name: String, r#type: Type) -> LayerListing {
30 LayerListing {
31 description,
32 id: Box::new(id),
33 name,
34 properties: 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 = "layer")]
43 Layer,
44}
45
46impl Default for Type {
47 fn default() -> Type {
48 Self::Layer
49 }
50}
51