1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.885.0
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// FlowModuleSuspend : Configuration for approval/resume steps that wait for user input
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FlowModuleSuspend {
/// Number of approvals required before continuing
#[serde(rename = "required_events", skip_serializing_if = "Option::is_none")]
pub required_events: Option<i32>,
/// Timeout in seconds before auto-continuing or canceling
#[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
pub timeout: Option<i32>,
#[serde(rename = "resume_form", skip_serializing_if = "Option::is_none")]
pub resume_form: Option<Box<models::FlowModuleSuspendResumeForm>>,
/// If true, only authenticated users can approve
#[serde(rename = "user_auth_required", skip_serializing_if = "Option::is_none")]
pub user_auth_required: Option<bool>,
#[serde(rename = "user_groups_required", skip_serializing_if = "Option::is_none")]
pub user_groups_required: Option<Box<models::InputTransform>>,
/// If true, the user who started the flow cannot approve
#[serde(rename = "self_approval_disabled", skip_serializing_if = "Option::is_none")]
pub self_approval_disabled: Option<bool>,
/// If true, hide the cancel button on the approval form
#[serde(rename = "hide_cancel", skip_serializing_if = "Option::is_none")]
pub hide_cancel: Option<bool>,
/// If true, continue flow on timeout instead of canceling
#[serde(rename = "continue_on_disapprove_timeout", skip_serializing_if = "Option::is_none")]
pub continue_on_disapprove_timeout: Option<bool>,
/// 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
#[serde(rename = "skin", skip_serializing_if = "Option::is_none")]
pub skin: Option<Skin>,
/// 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
#[serde(rename = "show_on_home", skip_serializing_if = "Option::is_none")]
pub show_on_home: Option<bool>,
}
impl FlowModuleSuspend {
/// Configuration for approval/resume steps that wait for user input
pub fn new() -> FlowModuleSuspend {
FlowModuleSuspend {
required_events: None,
timeout: None,
resume_form: None,
user_auth_required: None,
user_groups_required: None,
self_approval_disabled: None,
hide_cancel: None,
continue_on_disapprove_timeout: None,
skin: None,
show_on_home: None,
}
}
}
/// 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
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Skin {
#[serde(rename = "detailed")]
Detailed,
#[serde(rename = "minimal")]
Minimal,
}
impl Default for Skin {
fn default() -> Skin {
Self::Detailed
}
}