jira_v3_openapi 1.5.2

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

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

/// IssueLayoutItemPayload : Defines the payload to configure the issue layout item for a project.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct IssueLayoutItemPayload {
    #[serde(rename = "itemKey", skip_serializing_if = "Option::is_none")]
    pub item_key: Option<Box<models::ProjectCreateResourceIdentifier>>,
    /// The item section type
    #[serde(rename = "sectionType", skip_serializing_if = "Option::is_none")]
    pub section_type: Option<SectionType>,
    /// The item type. Currently only support FIELD
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<Type>,
}

impl IssueLayoutItemPayload {
    /// Defines the payload to configure the issue layout item for a project.
    pub fn new() -> IssueLayoutItemPayload {
        IssueLayoutItemPayload {
            item_key: None,
            section_type: None,
            r#type: None,
        }
    }
}
/// The item section type
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SectionType {
    #[serde(rename = "content")]
    Content,
    #[serde(rename = "primaryContext")]
    PrimaryContext,
    #[serde(rename = "secondaryContext")]
    SecondaryContext,
}

impl Default for SectionType {
    fn default() -> SectionType {
        Self::Content
    }
}
/// The item type. Currently only support FIELD
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "FIELD")]
    Field,
}

impl Default for Type {
    fn default() -> Type {
        Self::Field
    }
}