Skip to main content

openapi_service_fabric/models/
node_deactivation_intent.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/// NodeDeactivationIntent : The intent or the reason for deactivating the node. Following are the possible values for it.
15/// The intent or the reason for deactivating the node. Following are the possible values for it.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum NodeDeactivationIntent {
18    #[serde(rename = "Invalid")]
19    Invalid,
20    #[serde(rename = "Pause")]
21    Pause,
22    #[serde(rename = "Restart")]
23    Restart,
24    #[serde(rename = "RemoveData")]
25    RemoveData,
26    #[serde(rename = "RemoveNode")]
27    RemoveNode,
28}
29
30impl std::fmt::Display for NodeDeactivationIntent {
31    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
32        match self {
33            Self::Invalid => write!(f, "Invalid"),
34            Self::Pause => write!(f, "Pause"),
35            Self::Restart => write!(f, "Restart"),
36            Self::RemoveData => write!(f, "RemoveData"),
37            Self::RemoveNode => write!(f, "RemoveNode"),
38        }
39    }
40}
41
42impl Default for NodeDeactivationIntent {
43    fn default() -> NodeDeactivationIntent {
44        Self::Invalid
45    }
46}