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.885.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    /// If true, a run waiting on this step is listed on the Home page of each user who can approve it. Leave unset when the approval request is sent through another channel (Slack, Discord, email), so it does not sit there unanswered
43    #[serde(rename = "show_on_home", skip_serializing_if = "Option::is_none")]
44    pub show_on_home: Option<bool>,
45}
46
47impl FlowModuleSuspend {
48    /// Configuration for approval/resume steps that wait for user input
49    pub fn new() -> FlowModuleSuspend {
50        FlowModuleSuspend {
51            required_events: None,
52            timeout: None,
53            resume_form: None,
54            user_auth_required: None,
55            user_groups_required: None,
56            self_approval_disabled: None,
57            hide_cancel: None,
58            continue_on_disapprove_timeout: None,
59            skin: None,
60            show_on_home: None,
61        }
62    }
63}
64/// 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
65#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
66pub enum Skin {
67    #[serde(rename = "detailed")]
68    Detailed,
69    #[serde(rename = "minimal")]
70    Minimal,
71}
72
73impl Default for Skin {
74    fn default() -> Skin {
75        Self::Detailed
76    }
77}
78