windmill_api/models/
acl_change_revoke.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AclChangeRevoke {
16 #[serde(rename = "type")]
17 pub r#type: Type,
18 #[serde(rename = "role")]
20 pub role: String,
21 #[serde(rename = "privileges")]
22 pub privileges: Vec<String>,
23 #[serde(rename = "scope")]
24 pub scope: models::AclGrantScope,
25 #[serde(rename = "objects", skip_serializing_if = "Option::is_none")]
27 pub objects: Option<Vec<models::AclObject>>,
28}
29
30impl AclChangeRevoke {
31 pub fn new(r#type: Type, role: String, privileges: Vec<String>, scope: models::AclGrantScope) -> AclChangeRevoke {
32 AclChangeRevoke {
33 r#type,
34 role,
35 privileges,
36 scope,
37 objects: None,
38 }
39 }
40}
41#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
43pub enum Type {
44 #[serde(rename = "revoke")]
45 Revoke,
46}
47
48impl Default for Type {
49 fn default() -> Type {
50 Self::Revoke
51 }
52}
53