Skip to main content

windmill_api/models/
principal_access_items_inner.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.896.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 PrincipalAccessItemsInner {
16    #[serde(rename = "kind")]
17    pub kind: String,
18    #[serde(rename = "path")]
19    pub path: String,
20    #[serde(rename = "write")]
21    pub write: bool,
22    #[serde(rename = "reasons")]
23    pub reasons: Vec<models::AccessReason>,
24    /// why the caller cannot change the principal's own grant; set only where there is one
25    #[serde(rename = "blocked", skip_serializing_if = "Option::is_none")]
26    pub blocked: Option<String>,
27}
28
29impl PrincipalAccessItemsInner {
30    pub fn new(kind: String, path: String, write: bool, reasons: Vec<models::AccessReason>) -> PrincipalAccessItemsInner {
31        PrincipalAccessItemsInner {
32            kind,
33            path,
34            write,
35            reasons,
36            blocked: None,
37        }
38    }
39}
40