jira-api-v2 1.0.1

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

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

/// WorkflowTransitionRules : A workflow with transition rules.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WorkflowTransitionRules {
    #[serde(rename = "workflowId")]
    pub workflow_id: Box<models::WorkflowId>,
    /// The list of post functions within the workflow.
    #[serde(rename = "postFunctions")]
    pub post_functions: Vec<models::ConnectWorkflowTransitionRule>,
    /// The list of conditions within the workflow.
    #[serde(rename = "conditions")]
    pub conditions: Vec<models::ConnectWorkflowTransitionRule>,
    /// The list of validators within the workflow.
    #[serde(rename = "validators")]
    pub validators: Vec<models::ConnectWorkflowTransitionRule>,
}

impl WorkflowTransitionRules {
    /// A workflow with transition rules.
    pub fn new(workflow_id: models::WorkflowId, post_functions: Vec<models::ConnectWorkflowTransitionRule>, conditions: Vec<models::ConnectWorkflowTransitionRule>, validators: Vec<models::ConnectWorkflowTransitionRule>) -> WorkflowTransitionRules {
        WorkflowTransitionRules {
            workflow_id: Box::new(workflow_id),
            post_functions,
            conditions,
            validators,
        }
    }
}