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

/// BoardPayload : The payload for creating a board
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BoardPayload {
    /// Takes in a JQL string to create a new filter. If no value is provided, it'll default to a JQL filter for the project creating
    #[serde(rename = "boardFilterJQL", skip_serializing_if = "Option::is_none")]
    pub board_filter_jql: Option<String>,
    /// Card color settings of the board
    #[serde(rename = "cardColorStrategy", skip_serializing_if = "Option::is_none")]
    pub card_color_strategy: Option<CardColorStrategy>,
    #[serde(rename = "cardLayout", skip_serializing_if = "Option::is_none")]
    pub card_layout: Option<Box<models::CardLayout>>,
    /// Card layout settings of the board
    #[serde(rename = "cardLayouts", skip_serializing_if = "Option::is_none")]
    pub card_layouts: Option<Vec<models::CardLayoutField>>,
    /// The columns of the board
    #[serde(rename = "columns", skip_serializing_if = "Option::is_none")]
    pub columns: Option<Vec<models::BoardColumnPayload>>,
    /// Feature settings for the board
    #[serde(rename = "features", skip_serializing_if = "Option::is_none")]
    pub features: Option<Vec<models::BoardFeaturePayload>>,
    /// The name of the board
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "pcri", skip_serializing_if = "Option::is_none")]
    pub pcri: Option<Box<models::ProjectCreateResourceIdentifier>>,
    /// The quick filters for the board.
    #[serde(rename = "quickFilters", skip_serializing_if = "Option::is_none")]
    pub quick_filters: Option<Vec<models::QuickFilterPayload>>,
    /// Whether sprints are supported on the board
    #[serde(rename = "supportsSprint", skip_serializing_if = "Option::is_none")]
    pub supports_sprint: Option<bool>,
    #[serde(rename = "swimlanes", skip_serializing_if = "Option::is_none")]
    pub swimlanes: Option<Box<models::SwimlanesPayload>>,
    #[serde(rename = "workingDaysConfig", skip_serializing_if = "Option::is_none")]
    pub working_days_config: Option<Box<models::WorkingDaysConfig>>,
}

impl BoardPayload {
    /// The payload for creating a board
    pub fn new() -> BoardPayload {
        BoardPayload {
            board_filter_jql: None,
            card_color_strategy: None,
            card_layout: None,
            card_layouts: None,
            columns: None,
            features: None,
            name: None,
            pcri: None,
            quick_filters: None,
            supports_sprint: None,
            swimlanes: None,
            working_days_config: None,
        }
    }
}
/// Card color settings of the board
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CardColorStrategy {
    #[serde(rename = "ISSUE_TYPE")]
    IssueType,
    #[serde(rename = "REQUEST_TYPE")]
    RequestType,
    #[serde(rename = "ASSIGNEE")]
    Assignee,
    #[serde(rename = "PRIORITY")]
    Priority,
    #[serde(rename = "NONE")]
    None,
    #[serde(rename = "CUSTOM")]
    Custom,
}

impl Default for CardColorStrategy {
    fn default() -> CardColorStrategy {
        Self::IssueType
    }
}