jira_api_v2/models/
workflow_compound_condition.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WorkflowCompoundCondition {
17 #[serde(rename = "operator")]
19 pub operator: Operator,
20 #[serde(rename = "conditions")]
22 pub conditions: Vec<models::WorkflowConditionBean>,
23 #[serde(rename = "nodeType")]
24 pub node_type: String,
25}
26
27impl WorkflowCompoundCondition {
28 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#[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