Skip to main content

windmill_api/models/
token_admin_reliance.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.890.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 TokenAdminReliance {
16    #[serde(rename = "workspace_id")]
17    pub workspace_id: String,
18    /// the caller's username in the workspace
19    #[serde(rename = "username")]
20    pub username: String,
21    /// folders within the scopes the caller cannot read, or write to when `folders_write` (first 50)
22    #[serde(rename = "folders")]
23    pub folders: Vec<String>,
24    #[serde(rename = "folders_total")]
25    pub folders_total: i32,
26    /// the folders are ones the caller cannot write to (the token can change items), rather than ones they cannot read 
27    #[serde(rename = "folders_write")]
28    pub folders_write: bool,
29    /// items under other users' paths not shared with the caller
30    #[serde(rename = "other_users_items")]
31    pub other_users_items: i32,
32    /// resources the runnables named by the scopes reference
33    #[serde(rename = "assets")]
34    pub assets: Vec<models::TokenAdminRelianceAssetsInner>,
35    /// admin-only actions the scopes allow
36    #[serde(rename = "admin_only")]
37    pub admin_only: Vec<String>,
38}
39
40impl TokenAdminReliance {
41    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 {
42        TokenAdminReliance {
43            workspace_id,
44            username,
45            folders,
46            folders_total,
47            folders_write,
48            other_users_items,
49            assets,
50            admin_only,
51        }
52    }
53}
54