use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DatasetLayerListingProviderDefinition {
#[serde(rename = "collections")]
pub collections: Vec<models::DatasetLayerListingCollection>,
#[serde(rename = "description")]
pub description: String,
#[serde(rename = "id")]
pub id: uuid::Uuid,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "priority", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub priority: Option<Option<i32>>,
#[serde(rename = "type")]
pub r#type: Type,
}
impl DatasetLayerListingProviderDefinition {
pub fn new(collections: Vec<models::DatasetLayerListingCollection>, description: String, id: uuid::Uuid, name: String, r#type: Type) -> DatasetLayerListingProviderDefinition {
DatasetLayerListingProviderDefinition {
collections,
description,
id,
name,
priority: None,
r#type,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "DatasetLayerListing")]
DatasetLayerListing,
}
impl Default for Type {
fn default() -> Type {
Self::DatasetLayerListing
}
}