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.592.1
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}
29
30impl OpenFlow {
31    /// Top-level flow definition containing metadata, configuration, and the flow structure
32    pub fn new(summary: String, value: models::FlowValue) -> OpenFlow {
33        OpenFlow {
34            summary,
35            description: None,
36            value: Box::new(value),
37            schema: None,
38        }
39    }
40}
41