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

/// V1LoadResultDataCompact : Compact data format - a single object with the members list and a dataset of primitive arrays. Returned when `responseFormat=compact` is requested.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct V1LoadResultDataCompact {
    /// Ordered list of member names that correspond to each cell position in `dataset` rows.
    #[serde(rename = "members")]
    pub members: Vec<String>,
    /// Array of rows, where each row is an array of primitive values (null, boolean, number, string) aligned with `members`.
    #[serde(rename = "dataset")]
    pub dataset: Vec<Vec<serde_json::Value>>,
}

impl V1LoadResultDataCompact {
    /// Compact data format - a single object with the members list and a dataset of primitive arrays. Returned when `responseFormat=compact` is requested.
    pub fn new(
        members: Vec<String>,
        dataset: Vec<Vec<serde_json::Value>>,
    ) -> V1LoadResultDataCompact {
        V1LoadResultDataCompact { members, dataset }
    }
}
