windmill-api 1.817.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * 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,
        }
    }
}