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
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.894.1
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// TokenRisk : superadmin / admin: minted with those rights (and the owner still an admin where the token reaches), not narrowed by scopes or read-only mode. all_workspaces: not bound to a workspace. never_expires: no expiration. unused: not used in over 90 days.
/// superadmin / admin: minted with those rights (and the owner still an admin where the token reaches), not narrowed by scopes or read-only mode. all_workspaces: not bound to a workspace. never_expires: no expiration. unused: not used in over 90 days.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TokenRisk {
#[serde(rename = "superadmin")]
Superadmin,
#[serde(rename = "admin")]
Admin,
#[serde(rename = "all_workspaces")]
AllWorkspaces,
#[serde(rename = "never_expires")]
NeverExpires,
#[serde(rename = "unused")]
Unused,
}
impl std::fmt::Display for TokenRisk {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Superadmin => write!(f, "superadmin"),
Self::Admin => write!(f, "admin"),
Self::AllWorkspaces => write!(f, "all_workspaces"),
Self::NeverExpires => write!(f, "never_expires"),
Self::Unused => write!(f, "unused"),
}
}
}
impl Default for TokenRisk {
fn default() -> TokenRisk {
Self::Superadmin
}
}