jira_api_v2/models/
project_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 ProjectScopeBean {
16    /// The ID of the project that the option's behavior applies to.
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<i64>,
19    /// Defines the behavior of the option in the project.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.
20    #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")]
21    pub attributes: Option<std::collections::HashSet<Attributes>>,
22}
23
24impl ProjectScopeBean {
25    pub fn new() -> ProjectScopeBean {
26        ProjectScopeBean {
27            id: None,
28            attributes: None,
29        }
30    }
31}
32/// Defines the behavior of the option in the project.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.
33#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
34pub enum Attributes {
35    #[serde(rename = "notSelectable")]
36    NotSelectable,
37    #[serde(rename = "defaultValue")]
38    DefaultValue,
39}
40
41impl Default for Attributes {
42    fn default() -> Attributes {
43        Self::NotSelectable
44    }
45}
46