1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* Linkbreakers API
*
* This is a documentation of all the APIs of Linkbreakers
*
* The version of the OpenAPI document: 1.49.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateWebhookRequest {
#[serde(rename = "endpointUrl")]
pub endpoint_url: String,
/// Filter webhook notifications by a specific link ID. Only events from this link will trigger webhook notifications. If empty, all links in the workspace will trigger notifications.
#[serde(rename = "linkId", skip_serializing_if = "Option::is_none")]
pub link_id: Option<String>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<models::WebhookSource>,
/// Filter webhook notifications by workflow step kinds. Only workflow steps matching these kinds will trigger webhook notifications. If empty, all workflow step kinds will trigger notifications.
#[serde(rename = "triggers", skip_serializing_if = "Option::is_none")]
pub triggers: Option<Vec<models::WorkflowStepKind>>,
}
impl CreateWebhookRequest {
pub fn new(endpoint_url: String, name: String) -> CreateWebhookRequest {
CreateWebhookRequest {
endpoint_url,
link_id: None,
name,
source: None,
triggers: None,
}
}
}