Skip to main content

windmill_api/models/
open_flow_w_path.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.662.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 OpenFlowWPath {
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    #[serde(rename = "path")]
30    pub path: String,
31    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
32    pub tag: Option<String>,
33    #[serde(rename = "ws_error_handler_muted", skip_serializing_if = "Option::is_none")]
34    pub ws_error_handler_muted: Option<bool>,
35    #[serde(rename = "priority", skip_serializing_if = "Option::is_none")]
36    pub priority: Option<i32>,
37    #[serde(rename = "dedicated_worker", skip_serializing_if = "Option::is_none")]
38    pub dedicated_worker: Option<bool>,
39    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
40    pub timeout: Option<f64>,
41    #[serde(rename = "visible_to_runner_only", skip_serializing_if = "Option::is_none")]
42    pub visible_to_runner_only: Option<bool>,
43    /// When true and the caller is a member of the 'wm_deployers' group, preserves the original on_behalf_of_email value instead of overwriting it.
44    #[serde(rename = "preserve_on_behalf_of", skip_serializing_if = "Option::is_none")]
45    pub preserve_on_behalf_of: Option<bool>,
46}
47
48impl OpenFlowWPath {
49    pub fn new(summary: String, value: models::FlowValue, path: String) -> OpenFlowWPath {
50        OpenFlowWPath {
51            summary,
52            description: None,
53            value: Box::new(value),
54            schema: None,
55            on_behalf_of_email: None,
56            path,
57            tag: None,
58            ws_error_handler_muted: None,
59            priority: None,
60            dedicated_worker: None,
61            timeout: None,
62            visible_to_runner_only: None,
63            preserve_on_behalf_of: None,
64        }
65    }
66}
67