Skip to main content

windmill_api/models/
edit_resource.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.841.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 EditResource {
16    /// The path to the resource
17    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
18    pub path: Option<String>,
19    /// The new description of the resource
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21    pub description: Option<String>,
22    #[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub value: Option<Option<serde_json::Value>>,
24    /// The new resource_type to be associated with the resource
25    #[serde(rename = "resource_type", skip_serializing_if = "Option::is_none")]
26    pub resource_type: Option<String>,
27    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
28    pub labels: Option<Vec<String>>,
29    #[serde(rename = "ws_specific", skip_serializing_if = "Option::is_none")]
30    pub ws_specific: Option<bool>,
31    /// ai_agent only. Keep the identity `value.on_behalf_of` names (`u/<username>`, `g/<group>`) rather than the caller's own. Honoured for admins and members of wm_deployers; otherwise every write of an agent sets it to the caller.
32    #[serde(rename = "preserve_on_behalf_of", skip_serializing_if = "Option::is_none")]
33    pub preserve_on_behalf_of: Option<bool>,
34}
35
36impl EditResource {
37    pub fn new() -> EditResource {
38        EditResource {
39            path: None,
40            description: None,
41            value: None,
42            resource_type: None,
43            labels: None,
44            ws_specific: None,
45            preserve_on_behalf_of: None,
46        }
47    }
48}
49