-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathWebhookModel.cs
More file actions
36 lines (35 loc) · 1.46 KB
/
Copy pathWebhookModel.cs
File metadata and controls
36 lines (35 loc) · 1.46 KB
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
using System.Collections.Generic;
using Newtonsoft.Json;
namespace Contentstack.Management.Core.Models
{
[JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]
public class WebhookModel
{
[JsonProperty(propertyName: "name")]
public string Name { get; set; }
[JsonProperty(propertyName: "destinations")]
public List<WebhookTarget> destinations { get; set; }
[JsonProperty(propertyName: "channels")]
public List<string> Channels { get; set; }
[JsonProperty(propertyName: "branches")]
public List<string> Branches { get; set; }
[JsonProperty(propertyName: "retry_policy")]
public string RetryPolicy { get; set; }
[JsonProperty(propertyName: "disabled")]
public bool Disabled { get; set; } = false;
[JsonProperty(propertyName: "concise_payload")]
public bool ConcisePayload { get; set; } = true;
}
[JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]
public class WebhookTarget
{
[JsonProperty(propertyName: "target_url")]
public string TargetUrl { get; set; }
[JsonProperty(propertyName: "http_basic_auth")]
public string HttpBasicAuth { get; set; }
[JsonProperty(propertyName: "http_basic_password")]
public string HttpBasicPassword { get; set; }
[JsonProperty(propertyName: "custom_header")]
public List<Dictionary<string, object>> CustomHeader { get; set; }
}
}