osdm-sys 0.1.0-alpha.3

Specifications for the OSDM API standard. The OSDM specification supports two modes of operation: Retailer Mode and Distributor Mode. The API works identically in both modes, except that in distributor mode the API also returns fare information. The following resources are key to get started: - [Processes](https://osdm.io/spec/processes/) - [Models](https://osdm.io/spec/models/) - [Getting started](https://osdm.io/spec/getting-started/)
Documentation
/*
 * UIC 90918-10 - OSDM
 *
 * Specifications for the OSDM API standard. The OSDM specification supports two modes of operation: Retailer Mode and Distributor Mode. The API works identically in both modes, except that in distributor mode the API also returns fare information.  The following resources are key to get started:    -  [Processes](https://osdm.io/spec/processes/)   -  [Models](https://osdm.io/spec/models/)   -  [Getting started](https://osdm.io/spec/getting-started/) 
 *
 * The version of the OpenAPI document: 3.7.0
 * Contact: osdm@uic.org
 * Generated by: https://openapi-generator.tech
 */

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

/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub enum BookingPartStatus {
    #[serde(rename = "PREBOOKED")]
    Prebooked,
    #[serde(rename = "ON_HOLD")]
    OnHold,
    #[serde(rename = "CONFIRMED")]
    Confirmed,
    #[serde(rename = "FULFILLED")]
    Fulfilled,
    #[serde(rename = "CANCELLED")]
    Cancelled,
    #[serde(rename = "RELEASED")]
    Released,
    #[serde(rename = "REFUNDED")]
    Refunded,
    #[serde(rename = "EXCHANGE_ONGOING")]
    ExchangeOngoing,
    #[serde(rename = "EXCHANGED")]
    Exchanged,
    #[serde(rename = "ERROR")]
    Error,

}

impl std::fmt::Display for BookingPartStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Prebooked => write!(f, "PREBOOKED"),
            Self::OnHold => write!(f, "ON_HOLD"),
            Self::Confirmed => write!(f, "CONFIRMED"),
            Self::Fulfilled => write!(f, "FULFILLED"),
            Self::Cancelled => write!(f, "CANCELLED"),
            Self::Released => write!(f, "RELEASED"),
            Self::Refunded => write!(f, "REFUNDED"),
            Self::ExchangeOngoing => write!(f, "EXCHANGE_ONGOING"),
            Self::Exchanged => write!(f, "EXCHANGED"),
            Self::Error => write!(f, "ERROR"),
        }
    }
}

impl Default for BookingPartStatus {
    fn default() -> BookingPartStatus {
        Self::Prebooked
    }
}