Skip to main content

clientapi_pve/models/
pve_active_state_enum.rs

1/*
2 * Proxmox Virtual Environment API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// 
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum PveActiveStateEnum {
17    #[serde(rename = "active")]
18    Active,
19    #[serde(rename = "inactive")]
20    Inactive,
21    #[serde(rename = "failed")]
22    Failed,
23    #[serde(rename = "activating")]
24    Activating,
25    #[serde(rename = "deactivating")]
26    Deactivating,
27    #[serde(rename = "maintenance")]
28    Maintenance,
29    #[serde(rename = "reloading")]
30    Reloading,
31    #[serde(rename = "refreshing")]
32    Refreshing,
33    #[serde(rename = "unknown")]
34    Unknown,
35
36}
37
38impl std::fmt::Display for PveActiveStateEnum {
39    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
40        match self {
41            Self::Active => write!(f, "active"),
42            Self::Inactive => write!(f, "inactive"),
43            Self::Failed => write!(f, "failed"),
44            Self::Activating => write!(f, "activating"),
45            Self::Deactivating => write!(f, "deactivating"),
46            Self::Maintenance => write!(f, "maintenance"),
47            Self::Reloading => write!(f, "reloading"),
48            Self::Refreshing => write!(f, "refreshing"),
49            Self::Unknown => write!(f, "unknown"),
50        }
51    }
52}
53
54impl Default for PveActiveStateEnum {
55    fn default() -> PveActiveStateEnum {
56        Self::Active
57    }
58}
59