hi_jira2/models/
create_workflow_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
11/// CreateWorkflowCondition : A workflow transition condition.
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct CreateWorkflowCondition {
17    /// The compound condition operator.
18    #[serde(rename = "operator", skip_serializing_if = "Option::is_none")]
19    pub operator: Option<Operator>,
20    /// The list of workflow conditions.
21    #[serde(rename = "conditions", skip_serializing_if = "Option::is_none")]
22    pub conditions: Option<Vec<crate::models::CreateWorkflowCondition>>,
23    /// The type of the transition rule.
24    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
25    pub _type: Option<String>,
26    /// EXPERIMENTAL. The configuration of the transition rule.
27    #[serde(rename = "configuration", skip_serializing_if = "Option::is_none")]
28    pub configuration: Option<::std::collections::HashMap<String, serde_json::Value>>,
29}
30
31impl CreateWorkflowCondition {
32    /// A workflow transition condition.
33    pub fn new() -> CreateWorkflowCondition {
34        CreateWorkflowCondition {
35            operator: None,
36            conditions: None,
37            _type: None,
38            configuration: None,
39        }
40    }
41}
42
43/// The compound condition operator.
44#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
45pub enum Operator {
46    #[serde(rename = "AND")]
47    AND,
48    #[serde(rename = "OR")]
49    OR,
50}
51
52impl Default for Operator {
53    fn default() -> Operator {
54        Self::AND
55    }
56}
57