Skip to main content

windmill_api/models/
acl_change_grant.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.817.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AclChangeGrant {
16    #[serde(rename = "type")]
17    pub r#type: Type,
18    /// a data table role of the instance, or admin
19    #[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}
26
27impl AclChangeGrant {
28    pub fn new(r#type: Type, role: String, privileges: Vec<String>, scope: models::AclGrantScope) -> AclChangeGrant {
29        AclChangeGrant {
30            r#type,
31            role,
32            privileges,
33            scope,
34        }
35    }
36}
37/// 
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
39pub enum Type {
40    #[serde(rename = "grant")]
41    Grant,
42}
43
44impl Default for Type {
45    fn default() -> Type {
46        Self::Grant
47    }
48}
49