jira_api_v2/models/
hierarchy_level.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct HierarchyLevel {
16    /// The ID of the hierarchy level. This property is deprecated, see [Change notice: Removing hierarchy level IDs from next-gen APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/).
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<i64>,
19    /// The name of this hierarchy level.
20    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
21    pub name: Option<String>,
22    /// The ID of the level above this one in the hierarchy. This property is deprecated, see [Change notice: Removing hierarchy level IDs from next-gen APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/).
23    #[serde(rename = "aboveLevelId", skip_serializing_if = "Option::is_none")]
24    pub above_level_id: Option<i64>,
25    /// The ID of the level below this one in the hierarchy. This property is deprecated, see [Change notice: Removing hierarchy level IDs from next-gen APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/).
26    #[serde(rename = "belowLevelId", skip_serializing_if = "Option::is_none")]
27    pub below_level_id: Option<i64>,
28    /// The ID of the project configuration. This property is deprecated, see [Change oticen: Removing hierarchy level IDs from next-gen APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/).
29    #[serde(rename = "projectConfigurationId", skip_serializing_if = "Option::is_none")]
30    pub project_configuration_id: Option<i64>,
31    /// The level of this item in the hierarchy.
32    #[serde(rename = "level", skip_serializing_if = "Option::is_none")]
33    pub level: Option<i32>,
34    /// The issue types available in this hierarchy level.
35    #[serde(rename = "issueTypeIds", skip_serializing_if = "Option::is_none")]
36    pub issue_type_ids: Option<Vec<i64>>,
37    /// The external UUID of the hierarchy level. This property is deprecated, see [Change notice: Removing hierarchy level IDs from next-gen APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/).
38    #[serde(rename = "externalUuid", skip_serializing_if = "Option::is_none")]
39    pub external_uuid: Option<uuid::Uuid>,
40    #[serde(rename = "globalHierarchyLevel", skip_serializing_if = "Option::is_none")]
41    pub global_hierarchy_level: Option<GlobalHierarchyLevel>,
42}
43
44impl HierarchyLevel {
45    pub fn new() -> HierarchyLevel {
46        HierarchyLevel {
47            id: None,
48            name: None,
49            above_level_id: None,
50            below_level_id: None,
51            project_configuration_id: None,
52            level: None,
53            issue_type_ids: None,
54            external_uuid: None,
55            global_hierarchy_level: None,
56        }
57    }
58}
59/// 
60#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
61pub enum GlobalHierarchyLevel {
62    #[serde(rename = "SUBTASK")]
63    Subtask,
64    #[serde(rename = "BASE")]
65    Base,
66    #[serde(rename = "EPIC")]
67    Epic,
68}
69
70impl Default for GlobalHierarchyLevel {
71    fn default() -> GlobalHierarchyLevel {
72        Self::Subtask
73    }
74}
75