jira_api_v2/models/
project_input_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 ProjectInputBean {
16    /// Project keys must be unique and start with an uppercase letter followed by one or more uppercase alphanumeric characters. The maximum length is 10 characters. Required when creating a project. Optional when updating a project.
17    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
18    pub key: Option<String>,
19    /// The name of the project. Required when creating a project. Optional when updating a project.
20    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
21    pub name: Option<String>,
22    /// The [project type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes), which dictates the application-specific feature set. Required when creating a project. Not applicable for the Update project resource.
23    #[serde(rename = "projectTypeKey", skip_serializing_if = "Option::is_none")]
24    pub project_type_key: Option<ProjectTypeKey>,
25    /// A prebuilt configuration for a project. The type of the `projectTemplateKey` must match with the type of the `projectTypeKey`. Required when creating a project. Not applicable for the Update project resource.
26    #[serde(rename = "projectTemplateKey", skip_serializing_if = "Option::is_none")]
27    pub project_template_key: Option<ProjectTemplateKey>,
28    /// A brief description of the project.
29    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
30    pub description: Option<String>,
31    /// This parameter is deprecated because of privacy changes. Use `leadAccountId` instead. See the [migration guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. The user name of the project lead. Either `lead` or `leadAccountId` must be set when creating a project. Optional when updating a project. Cannot be provided with `leadAccountId`.
32    #[serde(rename = "lead", skip_serializing_if = "Option::is_none")]
33    pub lead: Option<String>,
34    /// The account ID of the project lead. Either `lead` or `leadAccountId` must be set when creating a project. Optional when updating a project. Cannot be provided with `lead`.
35    #[serde(rename = "leadAccountId", skip_serializing_if = "Option::is_none")]
36    pub lead_account_id: Option<String>,
37    /// A link to information about this project, such as project documentation
38    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
39    pub url: Option<String>,
40    /// The default assignee when creating issues for this project.
41    #[serde(rename = "assigneeType", skip_serializing_if = "Option::is_none")]
42    pub assignee_type: Option<AssigneeType>,
43    /// An integer value for the project's avatar.
44    #[serde(rename = "avatarId", skip_serializing_if = "Option::is_none")]
45    pub avatar_id: Option<i64>,
46    /// The ID of the issue security scheme for the project, which enables you to control who can and cannot view issues. Use the [Get issue security schemes](#api-rest-api-2-issuesecurityschemes-get) resource to get all issue security scheme IDs.
47    #[serde(rename = "issueSecurityScheme", skip_serializing_if = "Option::is_none")]
48    pub issue_security_scheme: Option<i64>,
49    /// The ID of the permission scheme for the project. Use the [Get all permission schemes](#api-rest-api-2-permissionscheme-get) resource to see a list of all permission scheme IDs.
50    #[serde(rename = "permissionScheme", skip_serializing_if = "Option::is_none")]
51    pub permission_scheme: Option<i64>,
52    /// The ID of the notification scheme for the project. Use the [Get notification schemes](#api-rest-api-2-notificationscheme-get) resource to get a list of notification scheme IDs.
53    #[serde(rename = "notificationScheme", skip_serializing_if = "Option::is_none")]
54    pub notification_scheme: Option<i64>,
55    /// The ID of the project's category. A complete list of category IDs is found using the [Get all project categories](#api-rest-api-2-projectCategory-get) operation.
56    #[serde(rename = "categoryId", skip_serializing_if = "Option::is_none")]
57    pub category_id: Option<i64>,
58}
59
60impl ProjectInputBean {
61    pub fn new() -> ProjectInputBean {
62        ProjectInputBean {
63            key: None,
64            name: None,
65            project_type_key: None,
66            project_template_key: None,
67            description: None,
68            lead: None,
69            lead_account_id: None,
70            url: None,
71            assignee_type: None,
72            avatar_id: None,
73            issue_security_scheme: None,
74            permission_scheme: None,
75            notification_scheme: None,
76            category_id: None,
77        }
78    }
79}
80/// The [project type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes), which dictates the application-specific feature set. Required when creating a project. Not applicable for the Update project resource.
81#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
82pub enum ProjectTypeKey {
83    #[serde(rename = "software")]
84    Software,
85    #[serde(rename = "service_desk")]
86    ServiceDesk,
87    #[serde(rename = "business")]
88    Business,
89}
90
91impl Default for ProjectTypeKey {
92    fn default() -> ProjectTypeKey {
93        Self::Software
94    }
95}
96/// A prebuilt configuration for a project. The type of the `projectTemplateKey` must match with the type of the `projectTypeKey`. Required when creating a project. Not applicable for the Update project resource.
97#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
98pub enum ProjectTemplateKey {
99    #[serde(rename = "com.pyxis.greenhopper.jira:gh-simplified-agility-kanban")]
100    ComPeriodPyxisPeriodGreenhopperPeriodJiraColonGhSimplifiedAgilityKanban,
101    #[serde(rename = "com.pyxis.greenhopper.jira:gh-simplified-agility-scrum")]
102    ComPeriodPyxisPeriodGreenhopperPeriodJiraColonGhSimplifiedAgilityScrum,
103    #[serde(rename = "com.pyxis.greenhopper.jira:gh-simplified-basic")]
104    ComPeriodPyxisPeriodGreenhopperPeriodJiraColonGhSimplifiedBasic,
105    #[serde(rename = "com.pyxis.greenhopper.jira:gh-simplified-kanban-classic")]
106    ComPeriodPyxisPeriodGreenhopperPeriodJiraColonGhSimplifiedKanbanClassic,
107    #[serde(rename = "com.pyxis.greenhopper.jira:gh-simplified-scrum-classic")]
108    ComPeriodPyxisPeriodGreenhopperPeriodJiraColonGhSimplifiedScrumClassic,
109    #[serde(rename = "com.atlassian.servicedesk:simplified-it-service-desk")]
110    ComPeriodAtlassianPeriodServicedeskColonSimplifiedItServiceDesk,
111    #[serde(rename = "com.atlassian.servicedesk:simplified-internal-service-desk")]
112    ComPeriodAtlassianPeriodServicedeskColonSimplifiedInternalServiceDesk,
113    #[serde(rename = "com.atlassian.servicedesk:simplified-external-service-desk")]
114    ComPeriodAtlassianPeriodServicedeskColonSimplifiedExternalServiceDesk,
115    #[serde(rename = "com.atlassian.servicedesk:simplified-hr-service-desk")]
116    ComPeriodAtlassianPeriodServicedeskColonSimplifiedHrServiceDesk,
117    #[serde(rename = "com.atlassian.servicedesk:simplified-facilities-service-desk")]
118    ComPeriodAtlassianPeriodServicedeskColonSimplifiedFacilitiesServiceDesk,
119    #[serde(rename = "com.atlassian.jira-core-project-templates:jira-core-simplified-content-management")]
120    ComPeriodAtlassianPeriodJiraCoreProjectTemplatesColonJiraCoreSimplifiedContentManagement,
121    #[serde(rename = "com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval")]
122    ComPeriodAtlassianPeriodJiraCoreProjectTemplatesColonJiraCoreSimplifiedDocumentApproval,
123    #[serde(rename = "com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking")]
124    ComPeriodAtlassianPeriodJiraCoreProjectTemplatesColonJiraCoreSimplifiedLeadTracking,
125    #[serde(rename = "com.atlassian.jira-core-project-templates:jira-core-simplified-process-control")]
126    ComPeriodAtlassianPeriodJiraCoreProjectTemplatesColonJiraCoreSimplifiedProcessControl,
127    #[serde(rename = "com.atlassian.jira-core-project-templates:jira-core-simplified-procurement")]
128    ComPeriodAtlassianPeriodJiraCoreProjectTemplatesColonJiraCoreSimplifiedProcurement,
129    #[serde(rename = "com.atlassian.jira-core-project-templates:jira-core-simplified-project-management")]
130    ComPeriodAtlassianPeriodJiraCoreProjectTemplatesColonJiraCoreSimplifiedProjectManagement,
131    #[serde(rename = "com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment")]
132    ComPeriodAtlassianPeriodJiraCoreProjectTemplatesColonJiraCoreSimplifiedRecruitment,
133    #[serde(rename = "com.atlassian.jira-core-project-templates:jira-core-simplified-task-")]
134    ComPeriodAtlassianPeriodJiraCoreProjectTemplatesColonJiraCoreSimplifiedTask,
135}
136
137impl Default for ProjectTemplateKey {
138    fn default() -> ProjectTemplateKey {
139        Self::ComPeriodPyxisPeriodGreenhopperPeriodJiraColonGhSimplifiedAgilityKanban
140    }
141}
142/// The default assignee when creating issues for this project.
143#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
144pub enum AssigneeType {
145    #[serde(rename = "PROJECT_LEAD")]
146    ProjectLead,
147    #[serde(rename = "UNASSIGNED")]
148    Unassigned,
149}
150
151impl Default for AssigneeType {
152    fn default() -> AssigneeType {
153        Self::ProjectLead
154    }
155}
156