/*
 * 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 V1CubeMetaDimensionGranularity {
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "title")]
    pub title: String,
    #[serde(rename = "interval", skip_serializing_if = "Option::is_none")]
    pub interval: Option<String>,
    #[serde(rename = "sql", skip_serializing_if = "Option::is_none")]
    pub sql: Option<String>,
    #[serde(rename = "offset", skip_serializing_if = "Option::is_none")]
    pub offset: Option<String>,
    #[serde(rename = "origin", skip_serializing_if = "Option::is_none")]
    pub origin: Option<String>,
}

impl V1CubeMetaDimensionGranularity {
    pub fn new(name: String, title: String) -> V1CubeMetaDimensionGranularity {
        V1CubeMetaDimensionGranularity {
            name,
            title,
            interval: None,
            sql: None,
            offset: None,
            origin: None,
        }
    }
}
