jira_api_v2/models/
project_feature.rs

1/*
2 * The Jira Cloud platform REST API
3 *
4 * Jira Cloud platform REST API documentation
5 *
6 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT
7 * Contact: ecosystem@atlassian.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ProjectFeature : Project feature.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProjectFeature {
17    /// Project ID.
18    #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")]
19    pub project_id: Option<i64>,
20    /// State of the feature.
21    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
22    pub state: Option<State>,
23    /// Determines whether a feature can be toggled or not.
24    #[serde(rename = "toggleLocked", skip_serializing_if = "Option::is_none")]
25    pub toggle_locked: Option<bool>,
26    /// Feature's key.
27    #[serde(rename = "feature", skip_serializing_if = "Option::is_none")]
28    pub feature: Option<String>,
29    /// Feature's category.
30    #[serde(rename = "featureCategory", skip_serializing_if = "Option::is_none")]
31    pub feature_category: Option<String>,
32    /// List of the keys of features required as prerequisites to enable this feature.
33    #[serde(rename = "prerequisites", skip_serializing_if = "Option::is_none")]
34    pub prerequisites: Option<Vec<String>>,
35    /// Name to display for this feature, localised.
36    #[serde(rename = "localisedName", skip_serializing_if = "Option::is_none")]
37    pub localised_name: Option<String>,
38    /// Description to display for this feature, localised.
39    #[serde(rename = "localisedDescription", skip_serializing_if = "Option::is_none")]
40    pub localised_description: Option<String>,
41    /// Uri to the image that should be used to display this feature.
42    #[serde(rename = "imageUri", skip_serializing_if = "Option::is_none")]
43    pub image_uri: Option<String>,
44}
45
46impl ProjectFeature {
47    /// Project feature.
48    pub fn new() -> ProjectFeature {
49        ProjectFeature {
50            project_id: None,
51            state: None,
52            toggle_locked: None,
53            feature: None,
54            feature_category: None,
55            prerequisites: None,
56            localised_name: None,
57            localised_description: None,
58            image_uri: None,
59        }
60    }
61}
62/// State of the feature.
63#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
64pub enum State {
65    #[serde(rename = "ENABLED")]
66    Enabled,
67    #[serde(rename = "DISABLED")]
68    Disabled,
69    #[serde(rename = "COMING_SOON")]
70    ComingSoon,
71}
72
73impl Default for State {
74    fn default() -> State {
75        Self::Enabled
76    }
77}
78