Skip to main content

windmill_api/models/
author_level.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.846.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AuthorLevel : How much of a kind of runnable a role may author. `compose` assembles already-deployed runnables with no code of one's own.
15/// How much of a kind of runnable a role may author. `compose` assembles already-deployed runnables with no code of one's own.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum AuthorLevel {
18    #[serde(rename = "none")]
19    None,
20    #[serde(rename = "compose")]
21    Compose,
22    #[serde(rename = "full")]
23    Full,
24
25}
26
27impl std::fmt::Display for AuthorLevel {
28    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29        match self {
30            Self::None => write!(f, "none"),
31            Self::Compose => write!(f, "compose"),
32            Self::Full => write!(f, "full"),
33        }
34    }
35}
36
37impl Default for AuthorLevel {
38    fn default() -> AuthorLevel {
39        Self::None
40    }
41}
42