Skip to main content

windmill_api/models/
open_flow.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.630.2
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// OpenFlow : Top-level flow definition containing metadata, configuration, and the flow structure
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OpenFlow {
17    /// Short description of what this flow does
18    #[serde(rename = "summary")]
19    pub summary: String,
20    /// Detailed documentation for this flow
21    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
22    pub description: Option<String>,
23    #[serde(rename = "value")]
24    pub value: Box<models::FlowValue>,
25    /// 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')
26    #[serde(rename = "schema", skip_serializing_if = "Option::is_none")]
27    pub schema: Option<serde_json::Value>,
28    /// The flow will be run with the permissions of the user with this email.
29    #[serde(rename = "on_behalf_of_email", skip_serializing_if = "Option::is_none")]
30    pub on_behalf_of_email: Option<String>,
31}
32
33impl OpenFlow {
34    /// Top-level flow definition containing metadata, configuration, and the flow structure
35    pub fn new(summary: String, value: models::FlowValue) -> OpenFlow {
36        OpenFlow {
37            summary,
38            description: None,
39            value: Box::new(value),
40            schema: None,
41            on_behalf_of_email: None,
42        }
43    }
44}
45