jira_api_v2/models/
workflow.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/// Workflow : Details about a workflow.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Workflow {
17    #[serde(rename = "id")]
18    pub id: Box<models::PublishedWorkflowId>,
19    /// The description of the workflow.
20    #[serde(rename = "description")]
21    pub description: String,
22    /// The transitions of the workflow.
23    #[serde(rename = "transitions", skip_serializing_if = "Option::is_none")]
24    pub transitions: Option<Vec<models::Transition>>,
25    /// The statuses of the workflow.
26    #[serde(rename = "statuses", skip_serializing_if = "Option::is_none")]
27    pub statuses: Option<Vec<models::WorkflowStatus>>,
28    /// Whether this is the default workflow.
29    #[serde(rename = "isDefault", skip_serializing_if = "Option::is_none")]
30    pub is_default: Option<bool>,
31}
32
33impl Workflow {
34    /// Details about a workflow.
35    pub fn new(id: models::PublishedWorkflowId, description: String) -> Workflow {
36        Workflow {
37            id: Box::new(id),
38            description,
39            transitions: None,
40            statuses: None,
41            is_default: None,
42        }
43    }
44}
45