/*
 * 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};

/// InlineData : Inline data specification
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InlineData {
    /// 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 = "content")]
    pub content: String,
    #[serde(rename = "format")]
    pub format: String,
}

impl InlineData {
    /// Inline data specification
    pub fn new(content: String, format: String) -> InlineData {
        InlineData {
            columns: None,
            content,
            format,
        }
    }
}
