jira_api_v2/models/
group_label.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/// GroupLabel : A group label.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GroupLabel {
17    /// The group label name.
18    #[serde(rename = "text", skip_serializing_if = "Option::is_none")]
19    pub text: Option<String>,
20    /// The title of the group label.
21    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
22    pub title: Option<String>,
23    /// The type of the group label.
24    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
25    pub r#type: Option<Type>,
26}
27
28impl GroupLabel {
29    /// A group label.
30    pub fn new() -> GroupLabel {
31        GroupLabel {
32            text: None,
33            title: None,
34            r#type: None,
35        }
36    }
37}
38/// The type of the group label.
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Type {
41    #[serde(rename = "ADMIN")]
42    Admin,
43    #[serde(rename = "SINGLE")]
44    Single,
45    #[serde(rename = "MULTIPLE")]
46    Multiple,
47}
48
49impl Default for Type {
50    fn default() -> Type {
51        Self::Admin
52    }
53}
54