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

/// V1LoadResultDataColumnar : Columnar data format - members list paired with one primitive array per column. Returned when `responseFormat=columnar` is requested.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct V1LoadResultDataColumnar {
    /// Ordered list of member names. Element `i` of `columns` holds the values for `members[i]` across all rows.
    #[serde(rename = "members")]
    pub members: Vec<String>,
    /// One array per member, in the same order as `members`. Each inner array contains the primitive value of that member for every row (null, boolean, number, string).
    #[serde(rename = "columns")]
    pub columns: Vec<Vec<serde_json::Value>>,
}

impl V1LoadResultDataColumnar {
    /// Columnar data format - members list paired with one primitive array per column. Returned when `responseFormat=columnar` is requested.
    pub fn new(
        members: Vec<String>,
        columns: Vec<Vec<serde_json::Value>>,
    ) -> V1LoadResultDataColumnar {
        V1LoadResultDataColumnar { members, columns }
    }
}
