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

/// V1CubeMetaLinkFormat : Link format with label and type
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct V1CubeMetaLinkFormat {
    /// Label for the link
    #[serde(rename = "label")]
    pub label: String,
    /// Type of the format (must be 'link')
    #[serde(rename = "type")]
    pub r#type: Type,
}

impl V1CubeMetaLinkFormat {
    /// Link format with label and type
    pub fn new(label: String, r#type: Type) -> V1CubeMetaLinkFormat {
        V1CubeMetaLinkFormat { label, r#type }
    }
}
/// Type of the format (must be 'link')
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "link")]
    Link,
}

impl Default for Type {
    fn default() -> Type {
        Self::Link
    }
}
