windmill-api 1.817.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.817.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>,
}

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,
        }
    }
}
/// 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
    }
}