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
49
50
51
52
53
54
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.817.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 DatatableAclInfo {
#[serde(rename = "owner")]
pub owner: String,
/// the roles a change may name; empty unless the caller may change anything
#[serde(rename = "roles")]
pub roles: Vec<String>,
/// whether the caller may plan and apply changes
#[serde(rename = "editable")]
pub editable: bool,
/// whether this is a clone, whose grants stay as they were copied
#[serde(rename = "clone")]
pub clone: bool,
/// whether the server is Postgres 17+, which added the MAINTAIN table privilege
#[serde(rename = "supports_maintain")]
pub supports_maintain: bool,
/// the database the target lives in
#[serde(rename = "dbname")]
pub dbname: String,
#[serde(rename = "grants")]
pub grants: Vec<models::AclGrant>,
/// a database's schemas, or a schema's tables
#[serde(rename = "children")]
pub children: Vec<String>,
}
impl DatatableAclInfo {
pub fn new(owner: String, roles: Vec<String>, editable: bool, clone: bool, supports_maintain: bool, dbname: String, grants: Vec<models::AclGrant>, children: Vec<String>) -> DatatableAclInfo {
DatatableAclInfo {
owner,
roles,
editable,
clone,
supports_maintain,
dbname,
grants,
children,
}
}
}