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
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.816.0
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AclGrant {
#[serde(rename = "grantee")]
pub grantee: String,
#[serde(rename = "privileges")]
pub privileges: Vec<String>,
#[serde(rename = "object", skip_serializing_if = "Option::is_none")]
pub object: Option<Box<models::AclObject>>,
/// set for a default privilege, naming the kind of object it covers (TABLES, SEQUENCES, FUNCTIONS, TYPES, or SCHEMAS). On a schema, the defaults set in that schema; on the database, the ones set database-wide, which apply in every schema and which no schema's own defaults take back.
#[serde(rename = "future", skip_serializing_if = "Option::is_none")]
pub future: Option<String>,
/// the roles the grant comes from, each once — who granted it, or for a default privilege the role whose future objects it covers. A revoke of some of the grant's privileges takes them back from every source that gave them.
#[serde(rename = "sources")]
pub sources: Vec<models::AclSource>,
}
impl AclGrant {
pub fn new(grantee: String, privileges: Vec<String>, sources: Vec<models::AclSource>) -> AclGrant {
AclGrant {
grantee,
privileges,
object: None,
future: None,
sources,
}
}
}