Skip to main content

openapi_service_fabric/models/
node_status.rs

1/*
2 * Service Fabric Client APIs
3 *
4 * Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services.
5 *
6 * The version of the OpenAPI document: 8.2
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// NodeStatus : The status of the node.
15/// The status of the node.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum NodeStatus {
18    #[serde(rename = "Invalid")]
19    Invalid,
20    #[serde(rename = "Up")]
21    Up,
22    #[serde(rename = "Down")]
23    Down,
24    #[serde(rename = "Enabling")]
25    Enabling,
26    #[serde(rename = "Disabling")]
27    Disabling,
28    #[serde(rename = "Disabled")]
29    Disabled,
30    #[serde(rename = "Unknown")]
31    Unknown,
32    #[serde(rename = "Removed")]
33    Removed,
34}
35
36impl std::fmt::Display for NodeStatus {
37    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
38        match self {
39            Self::Invalid => write!(f, "Invalid"),
40            Self::Up => write!(f, "Up"),
41            Self::Down => write!(f, "Down"),
42            Self::Enabling => write!(f, "Enabling"),
43            Self::Disabling => write!(f, "Disabling"),
44            Self::Disabled => write!(f, "Disabled"),
45            Self::Unknown => write!(f, "Unknown"),
46            Self::Removed => write!(f, "Removed"),
47        }
48    }
49}
50
51impl Default for NodeStatus {
52    fn default() -> NodeStatus {
53        Self::Invalid
54    }
55}