/*
* Hotdata API
*
* Powerful data platform API for managed databases, 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};
/// ColumnDefinition : The declared type of one column, as written in a load request's `columns` map. Accepts either a bare type name or an object carrying the extra parameters some types need: - simple: `\"VARCHAR\"`, `\"BIGINT\"`, `\"DECIMAL(10,2)\"` - detailed: `{ \"type\": \"DECIMAL\", \"precision\": 10, \"scale\": 2 }`
/// The declared type of one column, as written in a load request's `columns` map. Accepts either a bare type name or an object carrying the extra parameters some types need: - simple: `\"VARCHAR\"`, `\"BIGINT\"`, `\"DECIMAL(10,2)\"` - detailed: `{ \"type\": \"DECIMAL\", \"precision\": 10, \"scale\": 2 }`
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ColumnDefinition {
/// A bare type name, optionally parameterized: `\"VARCHAR\"`, `\"DECIMAL(10,2)\"`.
String(String),
ColumnTypeSpec(Box<models::ColumnTypeSpec>),
}
impl Default for ColumnDefinition {
fn default() -> Self {
Self::String(Default::default())
}
}