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

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

/// EditErrorHandlerLegacy : Legacy flat format for editing error handler (deprecated, use new format)
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EditErrorHandlerLegacy {
    /// Path to the error handler script or flow
    #[serde(rename = "error_handler", skip_serializing_if = "Option::is_none")]
    pub error_handler: Option<String>,
    /// The arguments to pass to the script or flow
    #[serde(rename = "error_handler_extra_args", skip_serializing_if = "Option::is_none")]
    pub error_handler_extra_args: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "error_handler_muted_on_cancel", skip_serializing_if = "Option::is_none")]
    pub error_handler_muted_on_cancel: Option<bool>,
}

impl EditErrorHandlerLegacy {
    /// Legacy flat format for editing error handler (deprecated, use new format)
    pub fn new() -> EditErrorHandlerLegacy {
        EditErrorHandlerLegacy {
            error_handler: None,
            error_handler_extra_args: None,
            error_handler_muted_on_cancel: None,
        }
    }
}

