Skip to main content

geoengine_api_client/models/
wildlive_data_connector_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 WildliveDataConnectorDefinition {
15    #[serde(rename = "description")]
16    pub description: String,
17    #[serde(rename = "expiryDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18    pub expiry_date: Option<Option<String>>,
19    #[serde(rename = "id")]
20    pub id: uuid::Uuid,
21    #[serde(rename = "name")]
22    pub name: String,
23    #[serde(rename = "priority", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub priority: Option<Option<i32>>,
25    /// A wrapper type that serializes to \"*****\" and can be deserialized from any string. If the inner value is \"*****\", it is considered unknown and `as_option` returns `None`. This is useful for secrets that should not be exposed in API responses, but can be set in API requests.
26    #[serde(rename = "refreshToken", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub refresh_token: Option<Option<String>>,
28    #[serde(rename = "type")]
29    pub r#type: Type,
30    #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
31    pub user: Option<Option<String>>,
32}
33
34impl WildliveDataConnectorDefinition {
35    pub fn new(description: String, id: uuid::Uuid, name: String, r#type: Type) -> WildliveDataConnectorDefinition {
36        WildliveDataConnectorDefinition {
37            description,
38            expiry_date: None,
39            id,
40            name,
41            priority: None,
42            refresh_token: None,
43            r#type,
44            user: None,
45        }
46    }
47}
48/// 
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum Type {
51    #[serde(rename = "WildLIVE!")]
52    WildLiveExclamation,
53}
54
55impl Default for Type {
56    fn default() -> Type {
57        Self::WildLiveExclamation
58    }
59}
60