jira_v3_openapi 1.5.0

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetPlanResponseForPage {
    /// The plan ID.
    #[serde(rename = "id")]
    pub id: String,
    /// The issue sources included in the plan.
    #[serde(rename = "issueSources", skip_serializing_if = "Option::is_none")]
    pub issue_sources: Option<Vec<models::GetIssueSourceResponse>>,
    /// The plan name.
    #[serde(rename = "name")]
    pub name: String,
    /// Default scenario ID.
    #[serde(rename = "scenarioId")]
    pub scenario_id: String,
    /// The plan status. This is \"Active\", \"Trashed\" or \"Archived\".
    #[serde(rename = "status")]
    pub status: Status,
}

impl GetPlanResponseForPage {
    pub fn new(id: String, name: String, scenario_id: String, status: Status) -> GetPlanResponseForPage {
        GetPlanResponseForPage {
            id,
            issue_sources: None,
            name,
            scenario_id,
            status,
        }
    }
}
/// The plan status. This is \"Active\", \"Trashed\" or \"Archived\".
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "Active")]
    Active,
    #[serde(rename = "Trashed")]
    Trashed,
    #[serde(rename = "Archived")]
    Archived,
}

impl Default for Status {
    fn default() -> Status {
        Self::Active
    }
}