jira_api_v2/models/failed_webhook.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/// FailedWebhook : Details about a failed webhook.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FailedWebhook {
17 /// The webhook ID, as sent in the `X-Atlassian-Webhook-Identifier` header with the webhook.
18 #[serde(rename = "id")]
19 pub id: String,
20 /// The webhook body.
21 #[serde(rename = "body", skip_serializing_if = "Option::is_none")]
22 pub body: Option<String>,
23 /// The original webhook destination.
24 #[serde(rename = "url")]
25 pub url: String,
26 /// The time the webhook was added to the list of failed webhooks (that is, the time of the last failed retry).
27 #[serde(rename = "failureTime")]
28 pub failure_time: i64,
29}
30
31impl FailedWebhook {
32 /// Details about a failed webhook.
33 pub fn new(id: String, url: String, failure_time: i64) -> FailedWebhook {
34 FailedWebhook {
35 id,
36 body: None,
37 url,
38 failure_time,
39 }
40 }
41}
42