Skip to main content

windmill_api/models/
get_flow_by_path_200_response.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.826.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 GetFlowByPath200Response {
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 the runnable runs as: 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.
30    #[serde(rename = "on_behalf_of", skip_serializing_if = "Option::is_none")]
31    pub on_behalf_of: Option<String>,
32    #[serde(rename = "workspace_id", skip_serializing_if = "Option::is_none")]
33    pub workspace_id: Option<String>,
34    #[serde(rename = "path")]
35    pub path: String,
36    #[serde(rename = "edited_by")]
37    pub edited_by: String,
38    #[serde(rename = "edited_at")]
39    pub edited_at: String,
40    #[serde(rename = "archived")]
41    pub archived: bool,
42    #[serde(rename = "extra_perms")]
43    pub extra_perms: std::collections::HashMap<String, bool>,
44    #[serde(rename = "starred", skip_serializing_if = "Option::is_none")]
45    pub starred: Option<bool>,
46    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
47    pub draft_only: Option<bool>,
48    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
49    pub tag: Option<String>,
50    #[serde(rename = "ws_error_handler_muted", skip_serializing_if = "Option::is_none")]
51    pub ws_error_handler_muted: Option<bool>,
52    #[serde(rename = "priority", skip_serializing_if = "Option::is_none")]
53    pub priority: Option<i32>,
54    #[serde(rename = "dedicated_worker", skip_serializing_if = "Option::is_none")]
55    pub dedicated_worker: Option<bool>,
56    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
57    pub timeout: Option<f64>,
58    #[serde(rename = "visible_to_runner_only", skip_serializing_if = "Option::is_none")]
59    pub visible_to_runner_only: Option<bool>,
60    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
61    pub labels: Option<Vec<String>>,
62    /// Scopes the token of every job of this runnable is restricted to (domain:action[:resource], e.g. oidc:write). Jobs it starts, flow steps and AI agent tools inherit the restriction. Unset, the job token carries the full permissions of the identity the job runs as; an empty list leaves it no API access beyond its own job.
63    #[serde(rename = "job_token_scopes", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
64    pub job_token_scopes: Option<Option<Vec<String>>>,
65    /// Labels inherited from the parent folder, computed at read time. Read-only — edit them on the folder. 
66    #[serde(rename = "inherited_labels", skip_serializing_if = "Option::is_none")]
67    pub inherited_labels: Option<Vec<String>>,
68    #[serde(rename = "lock_error_logs", skip_serializing_if = "Option::is_none")]
69    pub lock_error_logs: Option<String>,
70    #[serde(rename = "version_id", skip_serializing_if = "Option::is_none")]
71    pub version_id: Option<f64>,
72    #[serde(rename = "is_draft")]
73    pub is_draft: bool,
74    #[serde(rename = "draft_saved_at", skip_serializing_if = "Option::is_none")]
75    pub draft_saved_at: Option<String>,
76    /// The deployed version the draft forked from, as text whatever the kind (script hash, flow version id, app version id). Compare to the deployed head to tell a draft that is behind. Absent when there is no draft or it was never forked from a deploy. 
77    #[serde(rename = "draft_base", skip_serializing_if = "Option::is_none")]
78    pub draft_base: Option<String>,
79    #[serde(rename = "no_deployed", skip_serializing_if = "Option::is_none")]
80    pub no_deployed: Option<bool>,
81    #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
82    pub draft: Option<std::collections::HashMap<String, serde_json::Value>>,
83    /// Other workspace users (and the legacy NULL-email row, if any) with a saved draft at the same path. Populated only on the authed user's \"get by path\" responses for kinds the editor surfaces a fork banner for (script, flow, app, raw_app). Empty / omitted for kinds without that UI. 
84    #[serde(rename = "other_drafts_users", skip_serializing_if = "Option::is_none")]
85    pub other_drafts_users: Option<Vec<models::UserDraftOverlayOtherDraftsUsersInner>>,
86}
87
88impl GetFlowByPath200Response {
89    pub fn new(summary: String, value: models::FlowValue, path: String, edited_by: String, edited_at: String, archived: bool, extra_perms: std::collections::HashMap<String, bool>, is_draft: bool) -> GetFlowByPath200Response {
90        GetFlowByPath200Response {
91            summary,
92            description: None,
93            value: Box::new(value),
94            schema: None,
95            on_behalf_of_email: None,
96            on_behalf_of: None,
97            workspace_id: None,
98            path,
99            edited_by,
100            edited_at,
101            archived,
102            extra_perms,
103            starred: None,
104            draft_only: None,
105            tag: None,
106            ws_error_handler_muted: None,
107            priority: None,
108            dedicated_worker: None,
109            timeout: None,
110            visible_to_runner_only: None,
111            labels: None,
112            job_token_scopes: None,
113            inherited_labels: None,
114            lock_error_logs: None,
115            version_id: None,
116            is_draft,
117            draft_saved_at: None,
118            draft_base: None,
119            no_deployed: None,
120            draft: None,
121            other_drafts_users: None,
122        }
123    }
124}
125