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

/// V1CubeMetaSimpleFormat : Simple format
/// Simple format
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum V1CubeMetaSimpleFormat {
    #[serde(rename = "percent")]
    Percent,
    #[serde(rename = "currency")]
    Currency,
    #[serde(rename = "number")]
    Number,
    #[serde(rename = "imageUrl")]
    ImageUrl,
    #[serde(rename = "id")]
    Id,
    #[serde(rename = "link")]
    Link,
}

impl std::fmt::Display for V1CubeMetaSimpleFormat {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Percent => write!(f, "percent"),
            Self::Currency => write!(f, "currency"),
            Self::Number => write!(f, "number"),
            Self::ImageUrl => write!(f, "imageUrl"),
            Self::Id => write!(f, "id"),
            Self::Link => write!(f, "link"),
        }
    }
}

impl Default for V1CubeMetaSimpleFormat {
    fn default() -> V1CubeMetaSimpleFormat {
        Self::Percent
    }
}
