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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.848.1
* 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 UpdateAppRequest {
#[serde(rename = "path", skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
pub summary: Option<String>,
#[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub value: Option<Option<serde_json::Value>>,
#[serde(rename = "policy", skip_serializing_if = "Option::is_none")]
pub policy: Option<Box<models::Policy>>,
/// Changes who may open the app and leaves the rest of the deployed policy, its run-as user included, as it is. Applied under the same lock as a deploy, so neither overwrites the other. Cannot be sent with `policy`, which states its own mode. When the app runs as another user, refused to a caller who is neither an admin nor in 'wm_deployers', and to an operator with builder rights even in 'wm_deployers'; they change the mode by deploying.
#[serde(rename = "execution_mode", skip_serializing_if = "Option::is_none")]
pub execution_mode: Option<ExecutionMode>,
#[serde(rename = "deployment_message", skip_serializing_if = "Option::is_none")]
pub deployment_message: Option<String>,
#[serde(rename = "custom_path", skip_serializing_if = "Option::is_none")]
pub custom_path: Option<String>,
/// When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of value in the policy instead of overwriting it.
#[serde(rename = "preserve_on_behalf_of", skip_serializing_if = "Option::is_none")]
pub preserve_on_behalf_of: Option<bool>,
#[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<String>>,
/// When true (set by the CLI / git sync), deploying this app does not delete an existing user draft at the same path.
#[serde(rename = "skip_draft_deletion", skip_serializing_if = "Option::is_none")]
pub skip_draft_deletion: Option<bool>,
/// When true, this deploy may switch the app between low-code and raw. Without it, deploying a value to an app of the other kind is refused so an app is never converted by accident.
#[serde(rename = "allow_kind_change", skip_serializing_if = "Option::is_none")]
pub allow_kind_change: Option<bool>,
}
impl UpdateAppRequest {
pub fn new() -> UpdateAppRequest {
UpdateAppRequest {
path: None,
summary: None,
value: None,
policy: None,
execution_mode: None,
deployment_message: None,
custom_path: None,
preserve_on_behalf_of: None,
labels: None,
skip_draft_deletion: None,
allow_kind_change: None,
}
}
}
/// Changes who may open the app and leaves the rest of the deployed policy, its run-as user included, as it is. Applied under the same lock as a deploy, so neither overwrites the other. Cannot be sent with `policy`, which states its own mode. When the app runs as another user, refused to a caller who is neither an admin nor in 'wm_deployers', and to an operator with builder rights even in 'wm_deployers'; they change the mode by deploying.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ExecutionMode {
#[serde(rename = "viewer")]
Viewer,
#[serde(rename = "publisher")]
Publisher,
#[serde(rename = "guest")]
Guest,
#[serde(rename = "anonymous")]
Anonymous,
}
impl Default for ExecutionMode {
fn default() -> ExecutionMode {
Self::Viewer
}
}