jira_v3_openapi 1.6.1

Jira Cloud platform REST API lib (OpenAPI document version: 1001.0.0-SNAPSHOT-af42c50d50804c2f1b8ad4bb80d52c53890867e2)
Documentation
/*
 * The Jira Cloud platform REST API
 *
 * Jira Cloud platform REST API documentation
 *
 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT-af42c50d50804c2f1b8ad4bb80d52c53890867e2
 * 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 {
    /// The list of conditions within the workflow.
    #[serde(rename = "conditions", skip_serializing_if = "Option::is_none")]
    pub conditions: Option<Vec<models::AppWorkflowTransitionRule>>,
    /// The list of post functions within the workflow.
    #[serde(rename = "postFunctions", skip_serializing_if = "Option::is_none")]
    pub post_functions: Option<Vec<models::AppWorkflowTransitionRule>>,
    /// The list of validators within the workflow.
    #[serde(rename = "validators", skip_serializing_if = "Option::is_none")]
    pub validators: Option<Vec<models::AppWorkflowTransitionRule>>,
    #[serde(rename = "workflowId")]
    pub workflow_id: Box<models::WorkflowId>,
}

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