hotdata 0.1.2

Powerful data platform API for datasets, queries, and analytics.
Documentation
/*
 * Hotdata API
 *
 * Powerful data platform API for datasets, queries, and analytics.
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: developers@hotdata.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DatasetSourceOneOf {
    /// Optional explicit column definitions. Keys are column names, values are type specs. When provided, the schema is built from these definitions instead of being inferred.
    #[serde(rename = "columns", skip_serializing_if = "Option::is_none")]
    pub columns: Option<std::collections::HashMap<String, String>>,
    #[serde(rename = "format", skip_serializing_if = "Option::is_none")]
    pub format: Option<String>,
    #[serde(rename = "upload_id")]
    pub upload_id: String,
    #[serde(rename = "type")]
    pub r#type: Type,
}

impl DatasetSourceOneOf {
    pub fn new(upload_id: String, r#type: Type) -> DatasetSourceOneOf {
        DatasetSourceOneOf {
            columns: None,
            format: None,
            upload_id,
            r#type,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "upload")]
    Upload,
}

impl Default for Type {
    fn default() -> Type {
        Self::Upload
    }
}