Skip to main content

windmill_api/models/
update_flow_request.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.776.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 UpdateFlowRequest {
16    /// Short description of what this flow does
17    #[serde(rename = "summary")]
18    pub summary: String,
19    /// Detailed documentation for this flow
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21    pub description: Option<String>,
22    #[serde(rename = "value")]
23    pub value: Box<models::FlowValue>,
24    /// JSON Schema for flow inputs. Use this to define input parameters, their types, defaults, and validation. For resource inputs, set type to 'object' and format to 'resource-<type>' (e.g., 'resource-stripe')
25    #[serde(rename = "schema", skip_serializing_if = "Option::is_none")]
26    pub schema: Option<serde_json::Value>,
27    #[serde(rename = "on_behalf_of_email", skip_serializing_if = "Option::is_none")]
28    pub on_behalf_of_email: Option<String>,
29    /// Authorization identity to run as: u/{username}, g/{group}, or a bare email when the username is itself email-shaped. Supply this or on_behalf_of_email; when only the address is given it is resolved to the account it names, and an address naming nobody is rejected. A pair that disagrees is rejected.
30    #[serde(rename = "on_behalf_of", skip_serializing_if = "Option::is_none")]
31    pub on_behalf_of: Option<String>,
32    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
33    pub path: Option<String>,
34    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
35    pub tag: Option<String>,
36    #[serde(rename = "ws_error_handler_muted", skip_serializing_if = "Option::is_none")]
37    pub ws_error_handler_muted: Option<bool>,
38    #[serde(rename = "priority", skip_serializing_if = "Option::is_none")]
39    pub priority: Option<i32>,
40    #[serde(rename = "dedicated_worker", skip_serializing_if = "Option::is_none")]
41    pub dedicated_worker: Option<bool>,
42    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
43    pub timeout: Option<f64>,
44    #[serde(rename = "visible_to_runner_only", skip_serializing_if = "Option::is_none")]
45    pub visible_to_runner_only: Option<bool>,
46    /// When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of_email / on_behalf_of pair instead of overwriting it with the caller's own identity.
47    #[serde(rename = "preserve_on_behalf_of", skip_serializing_if = "Option::is_none")]
48    pub preserve_on_behalf_of: Option<bool>,
49    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
50    pub labels: Option<Vec<String>>,
51    #[serde(rename = "deployment_message", skip_serializing_if = "Option::is_none")]
52    pub deployment_message: Option<String>,
53    /// When true (set by the CLI / git sync), deploying this flow does not delete an existing user draft at the same path.
54    #[serde(rename = "skip_draft_deletion", skip_serializing_if = "Option::is_none")]
55    pub skip_draft_deletion: Option<bool>,
56}
57
58impl UpdateFlowRequest {
59    pub fn new(summary: String, value: models::FlowValue) -> UpdateFlowRequest {
60        UpdateFlowRequest {
61            summary,
62            description: None,
63            value: Box::new(value),
64            schema: None,
65            on_behalf_of_email: None,
66            on_behalf_of: None,
67            path: None,
68            tag: None,
69            ws_error_handler_muted: None,
70            priority: None,
71            dedicated_worker: None,
72            timeout: None,
73            visible_to_runner_only: None,
74            preserve_on_behalf_of: None,
75            labels: None,
76            deployment_message: None,
77            skip_draft_deletion: None,
78        }
79    }
80}
81