jira_api_v2/models/
workflow_compound_condition.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/// WorkflowCompoundCondition : A workflow transition compound condition rule.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WorkflowCompoundCondition {
17    /// The conditions operator.
18    #[serde(rename = "operator")]
19    pub operator: Operator,
20    /// The list of workflow conditions.
21    #[serde(rename = "conditions")]
22    pub conditions: Vec<models::WorkflowConditionBean>,
23    #[serde(rename = "nodeType")]
24    pub node_type: String,
25}
26
27impl WorkflowCompoundCondition {
28    /// A workflow transition compound condition rule.
29    pub fn new(operator: Operator, conditions: Vec<models::WorkflowConditionBean>, node_type: String) -> WorkflowCompoundCondition {
30        WorkflowCompoundCondition {
31            operator,
32            conditions,
33            node_type,
34        }
35    }
36}
37/// The conditions operator.
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
39pub enum Operator {
40    #[serde(rename = "AND")]
41    And,
42    #[serde(rename = "OR")]
43    Or,
44}
45
46impl Default for Operator {
47    fn default() -> Operator {
48        Self::And
49    }
50}
51