jira_api_v2/models/
workflow_transition_rules.rs

1/*
2 * The Jira Cloud platform REST API
3 *
4 * Jira Cloud platform REST API documentation
5 *
6 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT
7 * Contact: ecosystem@atlassian.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// WorkflowTransitionRules : A workflow with transition rules.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WorkflowTransitionRules {
17    #[serde(rename = "workflowId")]
18    pub workflow_id: Box<models::WorkflowId>,
19    /// The list of post functions within the workflow.
20    #[serde(rename = "postFunctions")]
21    pub post_functions: Vec<models::ConnectWorkflowTransitionRule>,
22    /// The list of conditions within the workflow.
23    #[serde(rename = "conditions")]
24    pub conditions: Vec<models::ConnectWorkflowTransitionRule>,
25    /// The list of validators within the workflow.
26    #[serde(rename = "validators")]
27    pub validators: Vec<models::ConnectWorkflowTransitionRule>,
28}
29
30impl WorkflowTransitionRules {
31    /// A workflow with transition rules.
32    pub fn new(workflow_id: models::WorkflowId, post_functions: Vec<models::ConnectWorkflowTransitionRule>, conditions: Vec<models::ConnectWorkflowTransitionRule>, validators: Vec<models::ConnectWorkflowTransitionRule>) -> WorkflowTransitionRules {
33        WorkflowTransitionRules {
34            workflow_id: Box::new(workflow_id),
35            post_functions,
36            conditions,
37            validators,
38        }
39    }
40}
41