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
use chrono::prelude::*;
#[derive(Debug, Deserialize)]
pub struct EPPRGPData {
#[serde(rename = "{urn:ietf:params:xml:ns:rgp-1.0}rgpStatus", default)]
pub state: Vec<EPPRGPStatus>,
}
#[derive(Debug, Deserialize)]
pub struct EPPRGPStatus {
#[serde(rename = "$attr:s")]
pub state: EPPRGPState,
}
#[derive(Debug, Deserialize, Serialize)]
pub enum EPPRGPState {
#[serde(rename = "addPeriod")]
AddPeriod,
#[serde(rename = "autoRenewPeriod")]
AutoRenewPeriod,
#[serde(rename = "renewPeriod")]
RenewPeriod,
#[serde(rename = "transferPeriod")]
TransferPeriod,
#[serde(rename = "redemptionPeriod")]
RedemptionPeriod,
#[serde(rename = "pendingRestore")]
PendingRestore,
#[serde(rename = "pendingDelete")]
PendingDelete,
}
#[derive(Debug, Serialize)]
pub struct EPPRGPUpdate {
#[serde(rename = "{urn:ietf:params:xml:ns:rgp-1.0}rgp:restore")]
pub restore: EPPRGPRestore,
}
#[derive(Debug, Serialize)]
pub struct EPPRGPRestore {
#[serde(rename = "$attr:op")]
pub operation: EPPRGPRestoreOperation,
#[serde(
rename = "{urn:ietf:params:xml:ns:rgp-1.0}rgp:report",
skip_serializing_if = "Option::is_none"
)]
pub report: Option<EPPRGPReport>,
}
#[derive(Debug, Serialize)]
pub enum EPPRGPRestoreOperation {
#[serde(rename = "request")]
Request,
#[serde(rename = "report")]
#[allow(dead_code)]
Report,
}
#[derive(Debug, Serialize)]
pub struct EPPRGPReport {
#[serde(rename = "{urn:ietf:params:xml:ns:rgp-1.0}rgp:preData")]
pub pre_data: String,
#[serde(rename = "{urn:ietf:params:xml:ns:rgp-1.0}rgp:postData")]
pub post_data: String,
#[serde(rename = "{urn:ietf:params:xml:ns:rgp-1.0}rgp:delTime")]
pub delete_time: DateTime<Utc>,
#[serde(rename = "{urn:ietf:params:xml:ns:rgp-1.0}rgp:resTime")]
pub restore_time: DateTime<Utc>,
#[serde(rename = "{urn:ietf:params:xml:ns:rgp-1.0}rgp:resReason")]
pub restore_reason: String,
#[serde(rename = "{urn:ietf:params:xml:ns:rgp-1.0}rgp:statement")]
pub statement: Vec<String>,
#[serde(
rename = "{urn:ietf:params:xml:ns:rgp-1.0}rgp:other",
skip_serializing_if = "Option::is_none"
)]
pub other: Option<String>,
}