windmill-api 1.895.1

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.895.1
 * 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 TokenAdminReliance {
    #[serde(rename = "workspace_id")]
    pub workspace_id: String,
    /// the caller's username in the workspace
    #[serde(rename = "username")]
    pub username: String,
    /// folders within the scopes the caller cannot read, or write to when `folders_write` (first 50)
    #[serde(rename = "folders")]
    pub folders: Vec<String>,
    #[serde(rename = "folders_total")]
    pub folders_total: i32,
    /// the folders are ones the caller cannot write to (the token can change items), rather than ones they cannot read 
    #[serde(rename = "folders_write")]
    pub folders_write: bool,
    /// items under other users' paths not shared with the caller
    #[serde(rename = "other_users_items")]
    pub other_users_items: i32,
    /// resources the runnables named by the scopes reference
    #[serde(rename = "assets")]
    pub assets: Vec<models::TokenAdminRelianceAssetsInner>,
    /// admin-only actions the scopes allow
    #[serde(rename = "admin_only")]
    pub admin_only: Vec<String>,
}

impl TokenAdminReliance {
    pub fn new(workspace_id: String, username: String, folders: Vec<String>, folders_total: i32, folders_write: bool, other_users_items: i32, assets: Vec<models::TokenAdminRelianceAssetsInner>, admin_only: Vec<String>) -> TokenAdminReliance {
        TokenAdminReliance {
            workspace_id,
            username,
            folders,
            folders_total,
            folders_write,
            other_users_items,
            assets,
            admin_only,
        }
    }
}