/*
 * Hotdata API
 *
 * Powerful data platform API for datasets, queries, and analytics.
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: developers@hotdata.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// IndexStatus : Index build status exposed to API consumers.
/// Index build status exposed to API consumers.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum IndexStatus {
    #[serde(rename = "ready")]
    Ready,
    #[serde(rename = "pending")]
    Pending,
}

impl std::fmt::Display for IndexStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Ready => write!(f, "ready"),
            Self::Pending => write!(f, "pending"),
        }
    }
}

impl Default for IndexStatus {
    fn default() -> IndexStatus {
        Self::Ready
    }
}
