-
Notifications
You must be signed in to change notification settings - Fork 18
/
HookData.cs
48 lines (36 loc) · 1.25 KB
/
HookData.cs
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
42
43
44
45
46
47
48
using System.Text.Json.Serialization;
namespace WebHookExample
{
public class Data
{
[JsonPropertyName("id")]
public string Id { get; set; } = null!;
[JsonPropertyName("from")]
public string From { get; set; } = null!;
[JsonPropertyName("to")]
public string To { get; set; } = null!;
[JsonPropertyName("ack")]
public string? Ack { get; set; }
[JsonPropertyName("type")]
public string Type { get; set; } = null!;
[JsonPropertyName("body")]
public string Body { get; set; } = null!;
[JsonPropertyName("media")]
public string? Media { get; set; }
[JsonPropertyName("fromMe")]
public bool FromMe { get; set; }
[JsonPropertyName("isForwarded")]
public bool IsForwarded { get; set; }
[JsonPropertyName("time")]
public long Time { get; set; }
}
public class HookData
{
[JsonPropertyName("event_type")]
public string EventType { get; set; } = null!;
[JsonPropertyName("instanceId")]
public string InstanceId { get; set; } = null!;
[JsonPropertyName("data")]
public Data? Data { get; set; }
}
}