jira_api_v2/models/
connect_workflow_transition_rule.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/// ConnectWorkflowTransitionRule : A workflow transition rule.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ConnectWorkflowTransitionRule {
17    /// The ID of the transition rule.
18    #[serde(rename = "id")]
19    pub id: String,
20    /// The key of the rule, as defined in the Connect app descriptor.
21    #[serde(rename = "key")]
22    pub key: String,
23    #[serde(rename = "configuration")]
24    pub configuration: Box<models::RuleConfiguration>,
25    #[serde(rename = "transition", skip_serializing_if = "Option::is_none")]
26    pub transition: Option<Box<models::WorkflowTransition>>,
27}
28
29impl ConnectWorkflowTransitionRule {
30    /// A workflow transition rule.
31    pub fn new(id: String, key: String, configuration: models::RuleConfiguration) -> ConnectWorkflowTransitionRule {
32        ConnectWorkflowTransitionRule {
33            id,
34            key,
35            configuration: Box::new(configuration),
36            transition: None,
37        }
38    }
39}
40