jira_v3_openapi 1.6.1

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};

/// WorkflowPreviewRequest : The details of the preview workflow request.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WorkflowPreviewRequest {
    /// The list of issue type IDs. At most 25 issue type IDs can be specified.
    #[serde(rename = "issueTypeIds", skip_serializing_if = "Option::is_none")]
    pub issue_type_ids: Option<Vec<String>>,
    /// The projectId parameter is required and will be used for permission checks. In addition, you must supply at least one of the following lookup terms: *workflowNames*, *workflowIds*, or *issueTypeIds*. The specified workflows must be associated with the given project.
    #[serde(rename = "projectId")]
    pub project_id: String,
    /// The list of workflow IDs to be returned. At most 25 workflow IDs can be specified.
    #[serde(rename = "workflowIds", skip_serializing_if = "Option::is_none")]
    pub workflow_ids: Option<Vec<String>>,
    /// The list of workflow names to be returned. At most 25 workflow names can be specified.
    #[serde(rename = "workflowNames", skip_serializing_if = "Option::is_none")]
    pub workflow_names: Option<Vec<String>>,
}

impl WorkflowPreviewRequest {
    /// The details of the preview workflow request.
    pub fn new(project_id: String) -> WorkflowPreviewRequest {
        WorkflowPreviewRequest {
            issue_type_ids: None,
            project_id,
            workflow_ids: None,
            workflow_names: None,
        }
    }
}