1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Orvanta API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 6.5.0
* Contact: contact@orvanta.cloud
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// LicenceHealth : `ok` -- a licence answers and its ladder is not running; `degraded` -- the ladder is running (expired, stale, or the licence service unreachable) but writes still work; `read_only` -- the 72h rung; `missing` -- managed mode, no verified licence held (never bound, revoked/unbound, or not verifying); `retired` -- managed mode, the workspace was deleted and its binding retired.
/// `ok` -- a licence answers and its ladder is not running; `degraded` -- the ladder is running (expired, stale, or the licence service unreachable) but writes still work; `read_only` -- the 72h rung; `missing` -- managed mode, no verified licence held (never bound, revoked/unbound, or not verifying); `retired` -- managed mode, the workspace was deleted and its binding retired.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum LicenceHealth {
#[serde(rename = "ok")]
Ok,
#[serde(rename = "degraded")]
Degraded,
#[serde(rename = "read_only")]
ReadOnly,
#[serde(rename = "missing")]
Missing,
#[serde(rename = "retired")]
Retired,
}
impl std::fmt::Display for LicenceHealth {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Ok => write!(f, "ok"),
Self::Degraded => write!(f, "degraded"),
Self::ReadOnly => write!(f, "read_only"),
Self::Missing => write!(f, "missing"),
Self::Retired => write!(f, "retired"),
}
}
}
impl Default for LicenceHealth {
fn default() -> LicenceHealth {
Self::Ok
}
}