-
Notifications
You must be signed in to change notification settings - Fork 2
/
DNSEntity.cs
49 lines (33 loc) · 1.32 KB
/
DNSEntity.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
49
using System.Text.Json.Serialization;
namespace ArashiDNS.Aha
{
public class Answer
{
[JsonPropertyName("name")] public string Name { get; set; }
[JsonPropertyName("TTL")] public int TTL { get; set; }
[JsonPropertyName("type")] public int Type { get; set; }
[JsonPropertyName("data")] public string Data { get; set; }
}
public class Question
{
[JsonPropertyName("name")] public string Name { get; set; }
[JsonPropertyName("type")] public int Type { get; set; }
}
public class DNSEntity
{
[JsonPropertyName("Status")] public int? Status { get; set; }
[JsonPropertyName("TC")] public bool? TC { get; set; }
[JsonPropertyName("RD")] public bool? RD { get; set; }
[JsonPropertyName("RA")] public bool? RA { get; set; }
[JsonPropertyName("AD")] public bool? AD { get; set; }
[JsonPropertyName("CD")] public bool? CD { get; set; }
[JsonPropertyName("Question")] public Question? Question { get; set; }
[JsonPropertyName("Answer")] public List<Answer>? Answer { get; set; }
}
[JsonSerializable(typeof(DNSEntity))]
[JsonSerializable(typeof(Answer))]
[JsonSerializable(typeof(Question))]
internal partial class SourceGenerationContext : JsonSerializerContext
{
}
}