/*
 * Mithril
 *
 * Mithril Compute API
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

/// BidStatusResponse : Response model for the detailed bid status endpoint.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BidStatusResponse {
    #[serde(rename = "bid_fid")]
    pub bid_fid: String,
    #[serde(rename = "status")]
    pub status: Status,
}

impl BidStatusResponse {
    /// Response model for the detailed bid status endpoint.
    pub fn new(bid_fid: String, status: Status) -> BidStatusResponse {
        BidStatusResponse { bid_fid, status }
    }
}
///
#[derive(
    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Default,
)]
pub enum Status {
    #[serde(rename = "Open")]
    #[default]
    Open,
    #[serde(rename = "Allocated")]
    Allocated,
    #[serde(rename = "Preempting")]
    Preempting,
    #[serde(rename = "Terminated")]
    Terminated,
    #[serde(rename = "Paused")]
    Paused,
    #[serde(rename = "Relocating")]
    Relocating,
}
