/*
 * The Jira Cloud platform REST API
 *
 * Jira Cloud platform REST API documentation
 *
 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT-48dd1e2d75e7eac65741e465279d2700f927137d
 * Contact: ecosystem@atlassian.com
 * Generated by: https://openapi-generator.tech
 */

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

/// WorkflowTransitionRulesUpdateErrorDetails : Details of any errors encountered while updating workflow transition rules for a workflow.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WorkflowTransitionRulesUpdateErrorDetails {
    /// A list of transition rule update errors, indexed by the transition rule ID. Any transition rule that appears here wasn't updated.
    #[serde(rename = "ruleUpdateErrors")]
    pub rule_update_errors: std::collections::HashMap<String, Vec<String>>,
    /// The list of errors that specify why the workflow update failed. The workflow was not updated if the list contains any entries.
    #[serde(rename = "updateErrors")]
    pub update_errors: Vec<String>,
    #[serde(rename = "workflowId")]
    pub workflow_id: Box<models::WorkflowId>,
}

impl WorkflowTransitionRulesUpdateErrorDetails {
    /// Details of any errors encountered while updating workflow transition rules for a workflow.
    pub fn new(rule_update_errors: std::collections::HashMap<String, Vec<String>>, update_errors: Vec<String>, workflow_id: models::WorkflowId) -> WorkflowTransitionRulesUpdateErrorDetails {
        WorkflowTransitionRulesUpdateErrorDetails {
            rule_update_errors,
            update_errors,
            workflow_id: Box::new(workflow_id),
        }
    }
}

