use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LayerListing {
#[serde(rename = "description")]
pub description: String,
#[serde(rename = "id")]
pub id: Box<models::ProviderLayerId>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "properties", skip_serializing_if = "Option::is_none")]
pub properties: Option<Vec<Vec<String>>>,
#[serde(rename = "type")]
pub r#type: Type,
}
impl LayerListing {
pub fn new(description: String, id: models::ProviderLayerId, name: String, r#type: Type) -> LayerListing {
LayerListing {
description,
id: Box::new(id),
name,
properties: None,
r#type,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "layer")]
Layer,
}
impl Default for Type {
fn default() -> Type {
Self::Layer
}
}