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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#[derive(Debug, Deserialize, Serialize)]
pub struct EPPSecDNSData {
#[serde(
rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:maxSigLife",
skip_serializing_if = "Option::is_none"
)]
pub max_signature_life: Option<i64>,
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:dsData", default)]
pub ds_data: Vec<EPPSecDNSDSData>,
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:keyData", default)]
pub key_data: Vec<EPPSecDNSKeyData>,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct EPPSecDNSDSData {
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:keyTag")]
pub key_tag: u16,
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:alg")]
pub algorithm: u8,
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:digestType")]
pub digest_type: u8,
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:digest")]
pub digest: String,
#[serde(
rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:keyData",
skip_serializing_if = "Option::is_none",
default
)]
pub key_data: Option<EPPSecDNSKeyData>,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct EPPSecDNSKeyData {
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:flags")]
pub flags: u16,
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:protocol")]
pub protocol: u8,
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:alg")]
pub algorithm: u8,
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:pubKey")]
pub public_key: String,
}
#[derive(Debug, Serialize)]
pub struct EPPSecDNSUpdate {
#[serde(
rename = "$attr:urgent",
skip_serializing_if = "Option::is_none",
serialize_with = "super::serialize_opt_bool"
)]
pub urgent: Option<bool>,
#[serde(
rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:rem",
skip_serializing_if = "Option::is_none"
)]
pub remove: Option<EPPSecDNSUpdateRemove>,
#[serde(
rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:add",
skip_serializing_if = "Option::is_none"
)]
pub add: Option<EPPSecDNSUpdateAdd>,
#[serde(
rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:chg",
skip_serializing_if = "Option::is_none"
)]
pub change: Option<EPPSecDNSUpdateChange>,
}
#[derive(Debug, Serialize)]
pub struct EPPSecDNSUpdateAdd {
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:dsData")]
pub ds_data: Vec<EPPSecDNSDSData>,
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:keyData")]
pub key_data: Vec<EPPSecDNSKeyData>,
}
#[derive(Debug, Serialize)]
pub struct EPPSecDNSUpdateRemove {
#[serde(
rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:all",
skip_serializing_if = "Option::is_none",
serialize_with = "super::serialize_opt_bool"
)]
pub all: Option<bool>,
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:dsData")]
pub ds_data: Vec<EPPSecDNSDSData>,
#[serde(rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:keyData")]
pub key_data: Vec<EPPSecDNSKeyData>,
}
#[derive(Debug, Serialize)]
pub struct EPPSecDNSUpdateChange {
#[serde(
rename = "{urn:ietf:params:xml:ns:secDNS-1.1}secDNS:maxSigLife",
skip_serializing_if = "Option::is_none"
)]
pub max_signature_life: Option<i64>,
}