Skip to main content

windmill_api/models/
principal_access.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.862.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 PrincipalAccess {
16    #[serde(rename = "principal")]
17    pub principal: String,
18    #[serde(rename = "is_admin")]
19    pub is_admin: bool,
20    #[serde(rename = "groups")]
21    pub groups: Vec<String>,
22    #[serde(rename = "folders")]
23    pub folders: Vec<models::PrincipalAccessFoldersInner>,
24    #[serde(rename = "items")]
25    pub items: Vec<models::PrincipalAccessItemsInner>,
26}
27
28impl PrincipalAccess {
29    pub fn new(principal: String, is_admin: bool, groups: Vec<String>, folders: Vec<models::PrincipalAccessFoldersInner>, items: Vec<models::PrincipalAccessItemsInner>) -> PrincipalAccess {
30        PrincipalAccess {
31            principal,
32            is_admin,
33            groups,
34            folders,
35            items,
36        }
37    }
38}
39