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

/// ResultsFormatQuery : Schema for the `?format=` query parameter on `GET /v1/results/{id}`.  Documents the canonical values that SDKs should treat as a closed set (`arrow`, `json`, `csv`, `md`, `parquet`). The runtime handler's negotiator (`negotiate_results_format`) additionally accepts `markdown` as an alias for `md` — case-insensitive, with unknown values falling through to the `Accept` header — but `markdown` is intentionally NOT listed in this enum so SDK generators emit a single canonical `Markdown` (or equivalent) variant rather than two distinct ones for the same logical format.
/// Schema for the `?format=` query parameter on `GET /v1/results/{id}`.  Documents the canonical values that SDKs should treat as a closed set (`arrow`, `json`, `csv`, `md`, `parquet`). The runtime handler's negotiator (`negotiate_results_format`) additionally accepts `markdown` as an alias for `md` — case-insensitive, with unknown values falling through to the `Accept` header — but `markdown` is intentionally NOT listed in this enum so SDK generators emit a single canonical `Markdown` (or equivalent) variant rather than two distinct ones for the same logical format.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ResultsFormatQuery {
    #[serde(rename = "arrow")]
    Arrow,
    #[serde(rename = "json")]
    Json,
    #[serde(rename = "csv")]
    Csv,
    #[serde(rename = "md")]
    Md,
    #[serde(rename = "parquet")]
    Parquet,
}

impl std::fmt::Display for ResultsFormatQuery {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Arrow => write!(f, "arrow"),
            Self::Json => write!(f, "json"),
            Self::Csv => write!(f, "csv"),
            Self::Md => write!(f, "md"),
            Self::Parquet => write!(f, "parquet"),
        }
    }
}

impl Default for ResultsFormatQuery {
    fn default() -> ResultsFormatQuery {
        Self::Arrow
    }
}
