jira_v3_openapi 1.6.0

Jira Cloud platform REST API lib (OpenAPI document version: 1001.0.0-SNAPSHOT-af42c50d50804c2f1b8ad4bb80d52c53890867e2)
Documentation
/*
 * The Jira Cloud platform REST API
 *
 * Jira Cloud platform REST API documentation
 *
 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT-af42c50d50804c2f1b8ad4bb80d52c53890867e2
 * Contact: ecosystem@atlassian.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// WorkflowCreate : The details of the workflows to create.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WorkflowCreate {
    /// The description of the workflow to create.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "loopedTransitionContainerLayout", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub looped_transition_container_layout: Option<Option<Box<models::WorkflowLayout>>>,
    /// The name of the workflow to create.
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "startPointLayout", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub start_point_layout: Option<Option<Box<models::WorkflowLayout>>>,
    /// The statuses associated with this workflow.
    #[serde(rename = "statuses")]
    pub statuses: Vec<models::StatusLayoutUpdate>,
    /// The transitions of this workflow.
    #[serde(rename = "transitions")]
    pub transitions: Vec<models::TransitionUpdateDto>,
}

impl WorkflowCreate {
    /// The details of the workflows to create.
    pub fn new(name: String, statuses: Vec<models::StatusLayoutUpdate>, transitions: Vec<models::TransitionUpdateDto>) -> WorkflowCreate {
        WorkflowCreate {
            description: None,
            looped_transition_container_layout: None,
            name,
            start_point_layout: None,
            statuses,
            transitions,
        }
    }
}