jira_api_v2/models/
comment.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/// Comment : A comment.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Comment {
17    /// The URL of the comment.
18    #[serde(rename = "self", skip_serializing_if = "Option::is_none")]
19    pub param_self: Option<String>,
20    /// The ID of the comment.
21    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
22    pub id: Option<String>,
23    /// The ID of the user who created the comment.
24    #[serde(rename = "author", skip_serializing_if = "Option::is_none")]
25    pub author: Option<Box<models::UserDetails>>,
26    /// The comment text.
27    #[serde(rename = "body", skip_serializing_if = "Option::is_none")]
28    pub body: Option<String>,
29    /// The rendered version of the comment.
30    #[serde(rename = "renderedBody", skip_serializing_if = "Option::is_none")]
31    pub rendered_body: Option<String>,
32    /// The ID of the user who updated the comment last.
33    #[serde(rename = "updateAuthor", skip_serializing_if = "Option::is_none")]
34    pub update_author: Option<Box<models::UserDetails>>,
35    /// The date and time at which the comment was created.
36    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
37    pub created: Option<String>,
38    /// The date and time at which the comment was updated last.
39    #[serde(rename = "updated", skip_serializing_if = "Option::is_none")]
40    pub updated: Option<String>,
41    /// The group or role to which this comment is visible. Optional on create and update.
42    #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
43    pub visibility: Option<models::Visibility>,
44    /// Whether the comment is visible in Jira Service Desk. Defaults to true when comments are created in the Jira Cloud Platform. This includes when the site doesn't use Jira Service Desk or the project isn't a Jira Service Desk project and, therefore, there is no Jira Service Desk for the issue to be visible on. To create a comment with its visibility in Jira Service Desk set to false, use the Jira Service Desk REST API [Create request comment](https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-rest-servicedeskapi-request-issueIdOrKey-comment-post) operation.
45    #[serde(rename = "jsdPublic", skip_serializing_if = "Option::is_none")]
46    pub jsd_public: Option<bool>,
47    /// A list of comment properties. Optional on create and update.
48    #[serde(rename = "properties", skip_serializing_if = "Option::is_none")]
49    pub properties: Option<Vec<models::EntityProperty>>,
50}
51
52impl Comment {
53    /// A comment.
54    pub fn new() -> Comment {
55        Comment {
56            param_self: None,
57            id: None,
58            author: None,
59            body: None,
60            rendered_body: None,
61            update_author: None,
62            created: None,
63            updated: None,
64            visibility: None,
65            jsd_public: None,
66            properties: None,
67        }
68    }
69}
70