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
 */

#![cfg(feature = "version_api")]

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

/// VersionRelatedWork : Associated related work to a version
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct VersionRelatedWork {
    /// The category of the related work
    #[serde(rename = "category")]
    pub category: String,
    /// The ID of the issue associated with the related work (if there is one). Cannot be updated via the Rest API.
    #[serde(rename = "issueId", skip_serializing_if = "Option::is_none")]
    pub issue_id: Option<i64>,
    /// The id of the related work. For the native release note related work item, this will be null, and Rest API does not support updating it.
    #[serde(rename = "relatedWorkId", skip_serializing_if = "Option::is_none")]
    pub related_work_id: Option<String>,
    /// The title of the related work
    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    /// The URL of the related work. Will be null for the native release note related work item, but is otherwise required.
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
}

impl VersionRelatedWork {
    /// Associated related work to a version
    pub fn new(category: String) -> VersionRelatedWork {
        VersionRelatedWork {
            category,
            issue_id: None,
            related_work_id: None,
            title: None,
            url: None,
        }
    }
}