jira_api_v2/models/webhook_registration_details.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/// WebhookRegistrationDetails : Details of webhooks to register.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WebhookRegistrationDetails {
17 /// A list of webhooks.
18 #[serde(rename = "webhooks")]
19 pub webhooks: Vec<models::WebhookDetails>,
20 /// The URL that specifies where to send the webhooks. This URL must use the same base URL as the Connect app.
21 #[serde(rename = "url")]
22 pub url: String,
23}
24
25impl WebhookRegistrationDetails {
26 /// Details of webhooks to register.
27 pub fn new(webhooks: Vec<models::WebhookDetails>, url: String) -> WebhookRegistrationDetails {
28 WebhookRegistrationDetails {
29 webhooks,
30 url,
31 }
32 }
33}
34