windmill-api 1.816.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.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 DataTableTables {
    #[serde(rename = "datatable_name")]
    pub datatable_name: String,
    /// Hierarchical metadata: schema_name -> table_names
    #[serde(rename = "schemas")]
    pub schemas: std::collections::HashMap<String, Vec<String>>,
    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /// on the instance database, the only kind that can be under roles or have its access edited
    #[serde(rename = "instance")]
    pub instance: bool,
    #[serde(rename = "permissioned")]
    pub permissioned: bool,
    /// the roles the caller may connect as, by name; empty when not under roles
    #[serde(rename = "usable_roles")]
    pub usable_roles: Vec<String>,
    #[serde(rename = "default_role")]
    pub default_role: String,
    /// whether the role the listing connected as may create schemas
    #[serde(rename = "can_create_schema")]
    pub can_create_schema: bool,
    /// the schemas the role the listing connected as may create in
    #[serde(rename = "creatable_schemas")]
    pub creatable_schemas: Vec<String>,
}

impl DataTableTables {
    pub fn new(datatable_name: String, schemas: std::collections::HashMap<String, Vec<String>>, instance: bool, permissioned: bool, usable_roles: Vec<String>, default_role: String, can_create_schema: bool, creatable_schemas: Vec<String>) -> DataTableTables {
        DataTableTables {
            datatable_name,
            schemas,
            error: None,
            instance,
            permissioned,
            usable_roles,
            default_role,
            can_create_schema,
            creatable_schemas,
        }
    }
}