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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct V1CubeMetaHierarchy {
    #[serde(rename = "name")]
    pub name: String,
    /// When hierarchy is defined in Cube, it keeps the original path: Cube.hierarchy
    #[serde(rename = "aliasMember", skip_serializing_if = "Option::is_none")]
    pub alias_member: Option<String>,
    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    #[serde(rename = "levels")]
    pub levels: Vec<String>,
}

impl V1CubeMetaHierarchy {
    pub fn new(name: String, levels: Vec<String>) -> V1CubeMetaHierarchy {
        V1CubeMetaHierarchy {
            name,
            alias_member: None,
            title: None,
            levels,
        }
    }
}
