Skip to main content

windmill_api/models/
error_handler_config.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.884.1
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ErrorHandlerConfig : Configuration for the workspace error handler
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ErrorHandlerConfig {
17    /// Path to the error handler script or flow
18    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
19    pub path: Option<String>,
20    /// The arguments to pass to the script or flow
21    #[serde(rename = "extra_args", skip_serializing_if = "Option::is_none")]
22    pub extra_args: Option<std::collections::HashMap<String, serde_json::Value>>,
23    #[serde(rename = "muted_on_cancel", skip_serializing_if = "Option::is_none")]
24    pub muted_on_cancel: Option<bool>,
25    #[serde(rename = "muted_on_user_path", skip_serializing_if = "Option::is_none")]
26    pub muted_on_user_path: Option<bool>,
27    /// Skip jobs started from the UI, whose trigger kind is `ui`. Stored only when true.
28    #[serde(rename = "muted_on_ui_runs", skip_serializing_if = "Option::is_none")]
29    pub muted_on_ui_runs: Option<bool>,
30}
31
32impl ErrorHandlerConfig {
33    /// Configuration for the workspace error handler
34    pub fn new() -> ErrorHandlerConfig {
35        ErrorHandlerConfig {
36            path: None,
37            extra_args: None,
38            muted_on_cancel: None,
39            muted_on_user_path: None,
40            muted_on_ui_runs: None,
41        }
42    }
43}
44