Skip to main content

windmill_api/models/
datatable_acl_info.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.816.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 DatatableAclInfo {
16    #[serde(rename = "owner")]
17    pub owner: String,
18    /// the roles a change may name; empty unless the caller may change anything
19    #[serde(rename = "roles")]
20    pub roles: Vec<String>,
21    /// whether the caller may plan and apply changes
22    #[serde(rename = "editable")]
23    pub editable: bool,
24    /// whether this is a clone, whose grants stay as they were copied
25    #[serde(rename = "clone")]
26    pub clone: bool,
27    /// whether the server is Postgres 17+, which added the MAINTAIN table privilege
28    #[serde(rename = "supports_maintain")]
29    pub supports_maintain: bool,
30    /// the database the target lives in
31    #[serde(rename = "dbname")]
32    pub dbname: String,
33    #[serde(rename = "grants")]
34    pub grants: Vec<models::AclGrant>,
35    /// a database's schemas, or a schema's tables
36    #[serde(rename = "children")]
37    pub children: Vec<String>,
38}
39
40impl DatatableAclInfo {
41    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 {
42        DatatableAclInfo {
43            owner,
44            roles,
45            editable,
46            clone,
47            supports_maintain,
48            dbname,
49            grants,
50            children,
51        }
52    }
53}
54