osdm_sys/models/availability_status.rs
1/*
2 * UIC 90918-10 - OSDM
3 *
4 * 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/)
5 *
6 * The version of the OpenAPI document: 3.7.0
7 * Contact: osdm@uic.org
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AvailabilityStatus : Availability status of a place or a compartment.
15/// Availability status of a place or a compartment.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum AvailabilityStatus {
18 #[serde(rename = "ALLOCATED")]
19 Allocated,
20 #[serde(rename = "FREE")]
21 Free,
22 #[serde(rename = "RESTRICTED")]
23 Restricted,
24
25}
26
27impl std::fmt::Display for AvailabilityStatus {
28 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29 match self {
30 Self::Allocated => write!(f, "ALLOCATED"),
31 Self::Free => write!(f, "FREE"),
32 Self::Restricted => write!(f, "RESTRICTED"),
33 }
34 }
35}
36
37impl Default for AvailabilityStatus {
38 fn default() -> AvailabilityStatus {
39 Self::Allocated
40 }
41}
42