jira_v3_openapi 1.5.2

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

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

/// StatusPayload : The payload for creating a status
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StatusPayload {
    /// The description of the status
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// The name of the status
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// The conflict strategy for the status already exists. FAIL - Fail execution, this always needs to be unique; USE - Use the existing entity and ignore new entity parameters; NEW - Create a new entity
    #[serde(rename = "onConflict", skip_serializing_if = "Option::is_none")]
    pub on_conflict: Option<OnConflict>,
    #[serde(rename = "pcri", skip_serializing_if = "Option::is_none")]
    pub pcri: Option<Box<models::ProjectCreateResourceIdentifier>>,
    /// The status category of the status. The value is case-sensitive.
    #[serde(rename = "statusCategory", skip_serializing_if = "Option::is_none")]
    pub status_category: Option<StatusCategory>,
}

impl StatusPayload {
    /// The payload for creating a status
    pub fn new() -> StatusPayload {
        StatusPayload {
            description: None,
            name: None,
            on_conflict: None,
            pcri: None,
            status_category: None,
        }
    }
}
/// The conflict strategy for the status already exists. FAIL - Fail execution, this always needs to be unique; USE - Use the existing entity and ignore new entity parameters; NEW - Create a new entity
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OnConflict {
    #[serde(rename = "FAIL")]
    Fail,
    #[serde(rename = "USE")]
    Use,
    #[serde(rename = "NEW")]
    New,
}

impl Default for OnConflict {
    fn default() -> OnConflict {
        Self::Fail
    }
}
/// The status category of the status. The value is case-sensitive.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum StatusCategory {
    #[serde(rename = "TODO")]
    Todo,
    #[serde(rename = "IN_PROGRESS")]
    InProgress,
    #[serde(rename = "DONE")]
    Done,
}

impl Default for StatusCategory {
    fn default() -> StatusCategory {
        Self::Todo
    }
}