Skip to main content

geoengine_api_client/models/
pangaea_data_provider_definition.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 PangaeaDataProviderDefinition {
16    #[serde(rename = "baseUrl")]
17    pub base_url: String,
18    #[serde(rename = "cacheTtl")]
19    pub cache_ttl: i32,
20    #[serde(rename = "description")]
21    pub description: String,
22    #[serde(rename = "name")]
23    pub name: String,
24    #[serde(rename = "priority", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub priority: Option<Option<i32>>,
26    #[serde(rename = "type")]
27    pub r#type: Type,
28}
29
30impl PangaeaDataProviderDefinition {
31    pub fn new(base_url: String, cache_ttl: i32, description: String, name: String, r#type: Type) -> PangaeaDataProviderDefinition {
32        PangaeaDataProviderDefinition {
33            base_url,
34            cache_ttl,
35            description,
36            name,
37            priority: None,
38            r#type,
39        }
40    }
41}
42/// 
43#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
44pub enum Type {
45    #[serde(rename = "Pangaea")]
46    Pangaea,
47}
48
49impl Default for Type {
50    fn default() -> Type {
51        Self::Pangaea
52    }
53}
54