Skip to main content

windmill_api/models/
flow_module_suspend.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.812.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// FlowModuleSuspend : Configuration for approval/resume steps that wait for user input
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FlowModuleSuspend {
17    /// Number of approvals required before continuing
18    #[serde(rename = "required_events", skip_serializing_if = "Option::is_none")]
19    pub required_events: Option<i32>,
20    /// Timeout in seconds before auto-continuing or canceling
21    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
22    pub timeout: Option<i32>,
23    #[serde(rename = "resume_form", skip_serializing_if = "Option::is_none")]
24    pub resume_form: Option<Box<models::FlowModuleSuspendResumeForm>>,
25    /// If true, only authenticated users can approve
26    #[serde(rename = "user_auth_required", skip_serializing_if = "Option::is_none")]
27    pub user_auth_required: Option<bool>,
28    #[serde(rename = "user_groups_required", skip_serializing_if = "Option::is_none")]
29    pub user_groups_required: Option<Box<models::InputTransform>>,
30    /// If true, the user who started the flow cannot approve
31    #[serde(rename = "self_approval_disabled", skip_serializing_if = "Option::is_none")]
32    pub self_approval_disabled: Option<bool>,
33    /// If true, hide the cancel button on the approval form
34    #[serde(rename = "hide_cancel", skip_serializing_if = "Option::is_none")]
35    pub hide_cancel: Option<bool>,
36    /// If true, continue flow on timeout instead of canceling
37    #[serde(rename = "continue_on_disapprove_timeout", skip_serializing_if = "Option::is_none")]
38    pub continue_on_disapprove_timeout: Option<bool>,
39    /// How the approval request is presented, on the approval page and in Slack/Teams approval messages. 'detailed' (used when unset) shows the flow details (arguments, graph, approvers); 'minimal' shows only the request: the step description, form and approve/reject actions
40    #[serde(rename = "skin", skip_serializing_if = "Option::is_none")]
41    pub skin: Option<Skin>,
42}
43
44impl FlowModuleSuspend {
45    /// Configuration for approval/resume steps that wait for user input
46    pub fn new() -> FlowModuleSuspend {
47        FlowModuleSuspend {
48            required_events: None,
49            timeout: None,
50            resume_form: None,
51            user_auth_required: None,
52            user_groups_required: None,
53            self_approval_disabled: None,
54            hide_cancel: None,
55            continue_on_disapprove_timeout: None,
56            skin: None,
57        }
58    }
59}
60/// How the approval request is presented, on the approval page and in Slack/Teams approval messages. 'detailed' (used when unset) shows the flow details (arguments, graph, approvers); 'minimal' shows only the request: the step description, form and approve/reject actions
61#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
62pub enum Skin {
63    #[serde(rename = "detailed")]
64    Detailed,
65    #[serde(rename = "minimal")]
66    Minimal,
67}
68
69impl Default for Skin {
70    fn default() -> Skin {
71        Self::Detailed
72    }
73}
74