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

/// BoardFeaturePayload : The payload for setting a board feature
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BoardFeaturePayload {
    /// The key of the feature
    #[serde(rename = "featureKey", skip_serializing_if = "Option::is_none")]
    pub feature_key: Option<FeatureKey>,
    /// Whether the feature should be turned on or off
    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
    pub state: Option<bool>,
}

impl BoardFeaturePayload {
    /// The payload for setting a board feature
    pub fn new() -> BoardFeaturePayload {
        BoardFeaturePayload {
            feature_key: None,
            state: None,
        }
    }
}
/// The key of the feature
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum FeatureKey {
    #[serde(rename = "ESTIMATION")]
    Estimation,
    #[serde(rename = "SPRINTS")]
    Sprints,
}

impl Default for FeatureKey {
    fn default() -> FeatureKey {
        Self::Estimation
    }
}