1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.895.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 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,
}
}
}