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 * 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 WildliveDataConnectorDefinition {
16    #[serde(rename = "description")]
17    pub description: String,
18    #[serde(rename = "expiryDate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub expiry_date: Option<Option<String>>,
20    #[serde(rename = "id")]
21    pub id: uuid::Uuid,
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    /// 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.
27    #[serde(rename = "refreshToken", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
28    pub refresh_token: Option<Option<String>>,
29    #[serde(rename = "type")]
30    pub r#type: Type,
31    #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
32    pub user: Option<Option<String>>,
33}
34
35impl WildliveDataConnectorDefinition {
36    pub fn new(description: String, id: uuid::Uuid, name: String, r#type: Type) -> WildliveDataConnectorDefinition {
37        WildliveDataConnectorDefinition {
38            description,
39            expiry_date: None,
40            id,
41            name,
42            priority: None,
43            refresh_token: None,
44            r#type,
45            user: None,
46        }
47    }
48}
49/// 
50#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
51pub enum Type {
52    #[serde(rename = "WildLIVE!")]
53    WildLiveExclamation,
54}
55
56impl Default for Type {
57    fn default() -> Type {
58        Self::WildLiveExclamation
59    }
60}
61