Skip to main content

geoengine_api_client/models/
copernicus_dataspace_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 CopernicusDataspaceDataProviderDefinition {
16    #[serde(rename = "description")]
17    pub description: String,
18    #[serde(rename = "gdalConfig")]
19    pub gdal_config: Vec<Vec<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    #[serde(rename = "s3AccessKey")]
27    pub s3_access_key: String,
28    #[serde(rename = "s3SecretKey")]
29    pub s3_secret_key: String,
30    #[serde(rename = "s3Url")]
31    pub s3_url: String,
32    #[serde(rename = "stacUrl")]
33    pub stac_url: String,
34    #[serde(rename = "type")]
35    pub r#type: Type,
36}
37
38impl CopernicusDataspaceDataProviderDefinition {
39    pub fn new(description: String, gdal_config: Vec<Vec<String>>, id: uuid::Uuid, name: String, s3_access_key: String, s3_secret_key: String, s3_url: String, stac_url: String, r#type: Type) -> CopernicusDataspaceDataProviderDefinition {
40        CopernicusDataspaceDataProviderDefinition {
41            description,
42            gdal_config,
43            id,
44            name,
45            priority: None,
46            s3_access_key,
47            s3_secret_key,
48            s3_url,
49            stac_url,
50            r#type,
51        }
52    }
53}
54/// 
55#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
56pub enum Type {
57    #[serde(rename = "CopernicusDataspace")]
58    CopernicusDataspace,
59}
60
61impl Default for Type {
62    fn default() -> Type {
63        Self::CopernicusDataspace
64    }
65}
66