jira_api_v2/models/
project_for_scope.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/// ProjectForScope : Details about a next-gen project.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProjectForScope {
17    /// The URL of the project details.
18    #[serde(rename = "self", skip_serializing_if = "Option::is_none")]
19    pub param_self: Option<String>,
20    /// The ID of the project.
21    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
22    pub id: Option<String>,
23    /// The key of the project.
24    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
25    pub key: Option<String>,
26    /// The name of the project.
27    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
28    pub name: Option<String>,
29    /// The [project type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes) of the project.
30    #[serde(rename = "projectTypeKey", skip_serializing_if = "Option::is_none")]
31    pub project_type_key: Option<ProjectTypeKey>,
32    /// Whether or not the project is simplified.
33    #[serde(rename = "simplified", skip_serializing_if = "Option::is_none")]
34    pub simplified: Option<bool>,
35    /// The URLs of the project's avatars.
36    #[serde(rename = "avatarUrls", skip_serializing_if = "Option::is_none")]
37    pub avatar_urls: Option<Box<models::AvatarUrlsBean>>,
38    /// The category the project belongs to.
39    #[serde(rename = "projectCategory", skip_serializing_if = "Option::is_none")]
40    pub project_category: Option<Box<models::UpdatedProjectCategory>>,
41}
42
43impl ProjectForScope {
44    /// Details about a next-gen project.
45    pub fn new() -> ProjectForScope {
46        ProjectForScope {
47            param_self: None,
48            id: None,
49            key: None,
50            name: None,
51            project_type_key: None,
52            simplified: None,
53            avatar_urls: None,
54            project_category: None,
55        }
56    }
57}
58/// The [project type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes) of the project.
59#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
60pub enum ProjectTypeKey {
61    #[serde(rename = "software")]
62    Software,
63    #[serde(rename = "service_desk")]
64    ServiceDesk,
65    #[serde(rename = "business")]
66    Business,
67}
68
69impl Default for ProjectTypeKey {
70    fn default() -> ProjectTypeKey {
71        Self::Software
72    }
73}
74