windmill_api/models/
scope_definition.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.555.2
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 ScopeDefinition {
16    #[serde(rename = "value")]
17    pub value: String,
18    #[serde(rename = "label")]
19    pub label: String,
20    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub description: Option<Option<String>>,
22    #[serde(rename = "requires_resource_path")]
23    pub requires_resource_path: bool,
24}
25
26impl ScopeDefinition {
27    pub fn new(value: String, label: String, requires_resource_path: bool) -> ScopeDefinition {
28        ScopeDefinition {
29            value,
30            label,
31            description: None,
32            requires_resource_path,
33        }
34    }
35}
36