jira_api_v2/models/global_scope_bean.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 GlobalScopeBean {
16 /// Defines the behavior of the option in the global context.If notSelectable is set, the option cannot be set as the field's value. This is useful for archiving an option that has previously been selected but shouldn't be used anymore.If defaultValue is set, the option is selected by default.
17 #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")]
18 pub attributes: Option<std::collections::HashSet<Attributes>>,
19}
20
21impl GlobalScopeBean {
22 pub fn new() -> GlobalScopeBean {
23 GlobalScopeBean {
24 attributes: None,
25 }
26 }
27}
28/// Defines the behavior of the option in the global context.If notSelectable is set, the option cannot be set as the field's value. This is useful for archiving an option that has previously been selected but shouldn't be used anymore.If defaultValue is set, the option is selected by default.
29#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
30pub enum Attributes {
31 #[serde(rename = "notSelectable")]
32 NotSelectable,
33 #[serde(rename = "defaultValue")]
34 DefaultValue,
35}
36
37impl Default for Attributes {
38 fn default() -> Attributes {
39 Self::NotSelectable
40 }
41}
42