Skip to main content

geoengine_api_client/models/
ogr_source.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/// OgrSource : The [`OgrSource`] is a source operator that reads vector data using OGR (part of GDAL). The counterpart for raster data is the [`GdalSource`].  ## Errors  If the given dataset does not exist or is not readable, an error is thrown. 
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct OgrSource {
16    #[serde(rename = "params")]
17    pub params: Box<models::OgrSourceParameters>,
18    #[serde(rename = "type")]
19    pub r#type: Type,
20}
21
22impl OgrSource {
23    /// The [`OgrSource`] is a source operator that reads vector data using OGR (part of GDAL). The counterpart for raster data is the [`GdalSource`].  ## Errors  If the given dataset does not exist or is not readable, an error is thrown. 
24    pub fn new(params: models::OgrSourceParameters, r#type: Type) -> OgrSource {
25        OgrSource {
26            params: Box::new(params),
27            r#type,
28        }
29    }
30}
31/// 
32#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
33pub enum Type {
34    #[serde(rename = "OgrSource")]
35    OgrSource,
36}
37
38impl Default for Type {
39    fn default() -> Type {
40        Self::OgrSource
41    }
42}
43