jira_api_v2/models/
visibility.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/// Visibility : The group or role to which this item is visible.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Visibility {
17    /// Whether visibility of this item is restricted to a group or role.
18    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
19    pub r#type: Option<Type>,
20    /// The name of the group or role to which visibility of this item is restricted.
21    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
22    pub value: Option<String>,
23}
24
25impl Visibility {
26    /// The group or role to which this item is visible.
27    pub fn new() -> Visibility {
28        Visibility {
29            r#type: None,
30            value: None,
31        }
32    }
33}
34/// Whether visibility of this item is restricted to a group or role.
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum Type {
37    #[serde(rename = "group")]
38    Group,
39    #[serde(rename = "role")]
40    Role,
41}
42
43impl Default for Type {
44    fn default() -> Type {
45        Self::Group
46    }
47}
48