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.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/// 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 /// Address of the account the flow runs on behalf of. Derived from on_behalf_of on read; accepted on write, where it is resolved to the account it names.
29 #[serde(rename = "on_behalf_of_email", skip_serializing_if = "Option::is_none")]
30 pub on_behalf_of_email: Option<String>,
31 /// The flow runs with the permissions of this identity: u/{username}, g/{group}, or a bare email when the username is itself email-shaped. The only stored half of the identity; on_behalf_of_email is derived from it. Omit it when writing and it is resolved from that address instead.
32 #[serde(rename = "on_behalf_of", skip_serializing_if = "Option::is_none")]
33 pub on_behalf_of: Option<String>,
34}
35
36impl OpenFlow {
37 /// Top-level flow definition containing metadata, configuration, and the flow structure
38 pub fn new(summary: String, value: models::FlowValue) -> OpenFlow {
39 OpenFlow {
40 summary,
41 description: None,
42 value: Box::new(value),
43 schema: None,
44 on_behalf_of_email: None,
45 on_behalf_of: None,
46 }
47 }
48}
49