jirav2/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
11/// Workflow : Details about a workflow.
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct Workflow {
17    #[serde(rename = "id")]
18    pub id: crate::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<crate::models::Transition>>,
25    /// The statuses of the workflow.
26    #[serde(rename = "statuses", skip_serializing_if = "Option::is_none")]
27    pub statuses: Option<Vec<crate::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    /// The workflow schemes the workflow is assigned to.
32    #[serde(rename = "schemes", skip_serializing_if = "Option::is_none")]
33    pub schemes: Option<Vec<crate::models::WorkflowSchemeIdName>>,
34    /// The projects the workflow is assigned to, through workflow schemes.
35    #[serde(rename = "projects", skip_serializing_if = "Option::is_none")]
36    pub projects: Option<Vec<crate::models::ProjectDetails>>,
37    /// Whether the workflow has a draft version.
38    #[serde(rename = "hasDraftWorkflow", skip_serializing_if = "Option::is_none")]
39    pub has_draft_workflow: Option<bool>,
40    #[serde(rename = "operations", skip_serializing_if = "Option::is_none")]
41    pub operations: Option<crate::models::WorkflowOperations>,
42    /// The creation date of the workflow.
43    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
44    pub created: Option<String>,
45    /// The last edited date of the workflow.
46    #[serde(rename = "updated", skip_serializing_if = "Option::is_none")]
47    pub updated: Option<String>,
48}
49
50impl Workflow {
51    /// Details about a workflow.
52    pub fn new(id: crate::models::PublishedWorkflowId, description: String) -> Workflow {
53        Workflow {
54            id: (id),
55            description,
56            transitions: None,
57            statuses: None,
58            is_default: None,
59            schemes: None,
60            projects: None,
61            has_draft_workflow: None,
62            operations: None,
63            created: None,
64            updated: None,
65        }
66    }
67}
68
69