jira_v3_openapi 1.6.0

Jira Cloud platform REST API lib (OpenAPI document version: 1001.0.0-SNAPSHOT-af42c50d50804c2f1b8ad4bb80d52c53890867e2)
Documentation
/*
 * The Jira Cloud platform REST API
 *
 * Jira Cloud platform REST API documentation
 *
 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT-af42c50d50804c2f1b8ad4bb80d52c53890867e2
 * Contact: ecosystem@atlassian.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// CustomTemplatesProjectDetails : Project Details
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CustomTemplatesProjectDetails {
    /// The access level of the project. Only used by team-managed project
    #[serde(rename = "accessLevel", skip_serializing_if = "Option::is_none")]
    pub access_level: Option<AccessLevel>,
    /// Additional properties of the project
    #[serde(rename = "additionalProperties", skip_serializing_if = "Option::is_none")]
    pub additional_properties: Option<std::collections::HashMap<String, String>>,
    /// The default assignee when creating issues in the project
    #[serde(rename = "assigneeType", skip_serializing_if = "Option::is_none")]
    pub assignee_type: Option<AssigneeType>,
    /// The ID of the project's avatar. Use the \\[Get project avatars\\](\\#api-rest-api-3-project-projectIdOrKey-avatar-get) operation to list the available avatars in a project.
    #[serde(rename = "avatarId", skip_serializing_if = "Option::is_none")]
    pub avatar_id: Option<i64>,
    /// The ID of the project's category. A complete list of category IDs is found using the [Get all project categories](#api-rest-api-3-projectCategory-get) operation.
    #[serde(rename = "categoryId", skip_serializing_if = "Option::is_none")]
    pub category_id: Option<i64>,
    /// Brief description of the project
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Whether components are enabled for the project. Only used by company-managed project
    #[serde(rename = "enableComponents", skip_serializing_if = "Option::is_none")]
    pub enable_components: Option<bool>,
    /// 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.
    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
    pub key: Option<String>,
    /// The default language for the project
    #[serde(rename = "language", skip_serializing_if = "Option::is_none")]
    pub language: Option<String>,
    /// The account ID of the project lead. Either `lead` or `leadAccountId` must be set when creating a project. Cannot be provided with `lead`.
    #[serde(rename = "leadAccountId", skip_serializing_if = "Option::is_none")]
    pub lead_account_id: Option<String>,
    /// Name of the project
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// A link to information about this project, such as project documentation
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
}

impl CustomTemplatesProjectDetails {
    /// Project Details
    pub fn new() -> CustomTemplatesProjectDetails {
        CustomTemplatesProjectDetails {
            access_level: None,
            additional_properties: None,
            assignee_type: None,
            avatar_id: None,
            category_id: None,
            description: None,
            enable_components: None,
            key: None,
            language: None,
            lead_account_id: None,
            name: None,
            url: None,
        }
    }
}
/// The access level of the project. Only used by team-managed project
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AccessLevel {
    #[serde(rename = "open")]
    Open,
    #[serde(rename = "limited")]
    Limited,
    #[serde(rename = "private")]
    Private,
    #[serde(rename = "free")]
    Free,
}

impl Default for AccessLevel {
    fn default() -> AccessLevel {
        Self::Open
    }
}
/// The default assignee when creating issues in the project
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AssigneeType {
    #[serde(rename = "PROJECT_DEFAULT")]
    ProjectDefault,
    #[serde(rename = "COMPONENT_LEAD")]
    ComponentLead,
    #[serde(rename = "PROJECT_LEAD")]
    ProjectLead,
    #[serde(rename = "UNASSIGNED")]
    Unassigned,
}

impl Default for AssigneeType {
    fn default() -> AssigneeType {
        Self::ProjectDefault
    }
}