/*
 * Cube.js
 *
 * Cube.js Swagger Schema
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

/// V1LoadResultData : Result `data` payload. Either an array of objects keyed by member name (default); a compact `{ members, dataset }` object when `responseFormat=compact`; or a columnar `{ members, columns }` object when `responseFormat=columnar`.
/// Result `data` payload. Either an array of objects keyed by member name (default); a compact `{ members, dataset }` object when `responseFormat=compact`; or a columnar `{ members, columns }` object when `responseFormat=columnar`.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum V1LoadResultData {
    /// Row-oriented (default) data format - an array of rows, each row is an object keyed by member name.
    V1LoadResultDataRow(Vec<serde_json::Value>),
    V1LoadResultDataCompact(Box<models::V1LoadResultDataCompact>),
    V1LoadResultDataColumnar(Box<models::V1LoadResultDataColumnar>),
}

impl Default for V1LoadResultData {
    fn default() -> Self {
        Self::V1LoadResultDataRow(Default::default())
    }
}
