Skip to main content

geoengine_api_client/models/
gfbio_collections_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 * Contact: dev@geoengine.de
7 * Generated by: https://openapi-generator.tech
8 */
9
10use crate::models;
11use serde::{Deserialize, Serialize};
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct GfbioCollectionsDataProviderDefinition {
15    #[serde(rename = "abcdDbConfig")]
16    pub abcd_db_config: Box<models::DatabaseConnectionConfig>,
17    #[serde(rename = "cacheTtl", skip_serializing_if = "Option::is_none")]
18    pub cache_ttl: Option<i32>,
19    #[serde(rename = "collectionApiAuthToken")]
20    pub collection_api_auth_token: String,
21    #[serde(rename = "collectionApiUrl")]
22    pub collection_api_url: String,
23    #[serde(rename = "description")]
24    pub description: String,
25    #[serde(rename = "name")]
26    pub name: String,
27    #[serde(rename = "pangaeaUrl")]
28    pub pangaea_url: String,
29    #[serde(rename = "priority", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub priority: Option<Option<i32>>,
31    #[serde(rename = "type")]
32    pub r#type: Type,
33}
34
35impl GfbioCollectionsDataProviderDefinition {
36    pub fn new(abcd_db_config: models::DatabaseConnectionConfig, collection_api_auth_token: String, collection_api_url: String, description: String, name: String, pangaea_url: String, r#type: Type) -> GfbioCollectionsDataProviderDefinition {
37        GfbioCollectionsDataProviderDefinition {
38            abcd_db_config: Box::new(abcd_db_config),
39            cache_ttl: None,
40            collection_api_auth_token,
41            collection_api_url,
42            description,
43            name,
44            pangaea_url,
45            priority: None,
46            r#type,
47        }
48    }
49}
50/// 
51#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
52pub enum Type {
53    #[serde(rename = "GfbioCollections")]
54    GfbioCollections,
55}
56
57impl Default for Type {
58    fn default() -> Type {
59        Self::GfbioCollections
60    }
61}
62