jira_api_v2/models/
notification.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/// Notification : Details about a notification.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Notification {
17    /// The subject of the email notification for the issue. If this is not specified, then the subject is set to the issue key and summary.
18    #[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
19    pub subject: Option<String>,
20    /// The plain text body of the email notification for the issue.
21    #[serde(rename = "textBody", skip_serializing_if = "Option::is_none")]
22    pub text_body: Option<String>,
23    /// The HTML body of the email notification for the issue.
24    #[serde(rename = "htmlBody", skip_serializing_if = "Option::is_none")]
25    pub html_body: Option<String>,
26    /// The recipients of the email notification for the issue.
27    #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
28    pub to: Option<models::NotificationRecipients>,
29    /// Restricts the notifications to users with the specified permissions.
30    #[serde(rename = "restrict", skip_serializing_if = "Option::is_none")]
31    pub restrict: Option<Box<models::NotificationRecipientsRestrictions>>,
32}
33
34impl Notification {
35    /// Details about a notification.
36    pub fn new() -> Notification {
37        Notification {
38            subject: None,
39            text_body: None,
40            html_body: None,
41            to: None,
42            restrict: None,
43        }
44    }
45}
46