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};

/// ContentItem : Represents the content to redact
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContentItem {
    /// The ID of the content entity.   *  For redacting an issue field, this will be the field ID (e.g., summary, customfield\\_10000).  *  For redacting a comment, this will be the comment ID.  *  For redacting a worklog, this will be the worklog ID.
    #[serde(rename = "entityId")]
    pub entity_id: String,
    /// The type of the entity to redact; It will be one of the following:   *  **issuefieldvalue** \\- To redact in issue fields  *  **issue-comment** \\- To redact in issue comments.  *  **issue-worklog** \\- To redact in issue worklogs
    #[serde(rename = "entityType")]
    pub entity_type: EntityType,
    /// This would be the issue ID
    #[serde(rename = "id")]
    pub id: String,
}

impl ContentItem {
    /// Represents the content to redact
    pub fn new(entity_id: String, entity_type: EntityType, id: String) -> ContentItem {
        ContentItem {
            entity_id,
            entity_type,
            id,
        }
    }
}
/// The type of the entity to redact; It will be one of the following:   *  **issuefieldvalue** \\- To redact in issue fields  *  **issue-comment** \\- To redact in issue comments.  *  **issue-worklog** \\- To redact in issue worklogs
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum EntityType {
    #[serde(rename = "issuefieldvalue")]
    Issuefieldvalue,
    #[serde(rename = "issue-comment")]
    IssueComment,
    #[serde(rename = "issue-worklog")]
    IssueWorklog,
}

impl Default for EntityType {
    fn default() -> EntityType {
        Self::Issuefieldvalue
    }
}