/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.6
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ErrorHandlerConfig : Configuration for the workspace error handler
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ErrorHandlerConfig {
    /// Path to the error handler script or flow
    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
    pub path: Option<String>,
    /// The arguments to pass to the script or flow
    #[serde(rename = "extra_args", skip_serializing_if = "Option::is_none")]
    pub extra_args: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "muted_on_cancel", skip_serializing_if = "Option::is_none")]
    pub muted_on_cancel: Option<bool>,
    #[serde(rename = "muted_on_user_path", skip_serializing_if = "Option::is_none")]
    pub muted_on_user_path: Option<bool>,
}

impl ErrorHandlerConfig {
    /// Configuration for the workspace error handler
    pub fn new() -> ErrorHandlerConfig {
        ErrorHandlerConfig {
            path: None,
            extra_args: None,
            muted_on_cancel: None,
            muted_on_user_path: None,
        }
    }
}

