Remove serde aliases from types that don't implement Deserialize

This commit is contained in:
Dirkjan Ochtman 2021-12-14 09:44:13 +01:00 committed by masalachai
parent 3935413b70
commit 5664276133
19 changed files with 100 additions and 100 deletions

View File

@ -14,10 +14,10 @@ impl Transaction<NoExtension> for ContactCheck {}
#[derive(Serialize, Debug)]
pub struct ContactList {
/// The XML namespace for the contact &lt;check&gt;
#[serde(rename = "xmlns:contact", alias = "xmlns")]
#[serde(rename = "xmlns:contact")]
xmlns: String,
/// The list of contact ids to check for availability
#[serde(rename = "contact:id", alias = "id")]
#[serde(rename = "contact:id")]
pub contact_ids: Vec<StringValue>,
}
@ -25,7 +25,7 @@ pub struct ContactList {
/// The &lt;command&gt; type for contact check command
pub struct ContactCheck {
/// The &lt;check&gt; tag for the contact check command
#[serde(rename = "contact:check", alias = "check")]
#[serde(rename = "contact:check")]
list: ContactList,
}

View File

@ -18,25 +18,25 @@ impl Command for ContactCreate {
#[derive(Serialize, Debug)]
pub struct Contact {
/// XML namespace for contact commands
#[serde(rename = "xmlns:contact", alias = "xmlns")]
#[serde(rename = "xmlns:contact")]
xmlns: String,
/// Contact &lt;id&gt; tag
#[serde(rename = "contact:id", alias = "id")]
#[serde(rename = "contact:id")]
id: StringValue,
/// Contact &lt;postalInfo&gt; tag
#[serde(rename = "contact:postalInfo", alias = "postalInfo")]
#[serde(rename = "contact:postalInfo")]
postal_info: PostalInfo,
/// Contact &lt;voice&gt; tag
#[serde(rename = "contact:voice", alias = "voice")]
#[serde(rename = "contact:voice")]
voice: Phone,
/// Contact &lt;fax&gt; tag,
#[serde(rename = "contact:fax", alias = "fax")]
#[serde(rename = "contact:fax")]
fax: Option<Phone>,
/// Contact &lt;email&gt; tag
#[serde(rename = "contact:email", alias = "email")]
#[serde(rename = "contact:email")]
email: StringValue,
/// Contact &lt;authInfo&gt; tag
#[serde(rename = "contact:authInfo", alias = "authInfo")]
#[serde(rename = "contact:authInfo")]
auth_info: ContactAuthInfo,
}
@ -44,7 +44,7 @@ pub struct Contact {
/// Type for EPP XML &lt;create&gt; command for contacts
pub struct ContactCreate {
/// Data for &lt;create&gt; command for contact
#[serde(rename = "contact:create", alias = "create")]
#[serde(rename = "contact:create")]
pub contact: Contact,
}

View File

@ -16,17 +16,17 @@ impl Command for ContactDelete {
#[derive(Serialize, Debug)]
pub struct ContactDeleteRequestData {
/// XML namespace for the &lt;delete&gt; command for contacts
#[serde(rename = "xmlns:contact", alias = "xmlns")]
#[serde(rename = "xmlns:contact")]
xmlns: String,
/// The id of the contact to be deleted
#[serde(rename = "contact:id", alias = "id")]
#[serde(rename = "contact:id")]
id: StringValue,
}
#[derive(Serialize, Debug)]
/// The &lt;delete&gt; type for the contact delete EPP command
pub struct ContactDelete {
#[serde(rename = "contact:delete", alias = "delete")]
#[serde(rename = "contact:delete")]
/// The data for the &lt;delete&gt; tag for a contact delete command
contact: ContactDeleteRequestData,
}

View File

@ -18,13 +18,13 @@ impl Command for ContactInfo {
#[derive(Serialize, Debug)]
pub struct ContactInfoRequestData {
/// XML namespace for contact commands
#[serde(rename = "xmlns:contact", alias = "contact")]
#[serde(rename = "xmlns:contact")]
xmlns: String,
/// The contact id for the info command
#[serde(rename = "contact:id", alias = "id")]
#[serde(rename = "contact:id")]
id: StringValue,
/// The &lt;authInfo&gt; data
#[serde(rename = "contact:authInfo", alias = "authInfo")]
#[serde(rename = "contact:authInfo")]
auth_info: ContactAuthInfo,
}
@ -32,7 +32,7 @@ pub struct ContactInfoRequestData {
/// Type for EPP XML &lt;info&gt; command for contacts
pub struct ContactInfo {
/// Data for &lt;info&gt; command for contact
#[serde(rename = "contact:info", alias = "info")]
#[serde(rename = "contact:info")]
info: ContactInfoRequestData,
}

View File

@ -63,37 +63,37 @@ impl ContactUpdate {
/// Type for elements under the &lt;chg&gt; tag for contact update request
#[derive(Serialize, Debug)]
pub struct ContactChangeInfo {
#[serde(rename = "contact:postalInfo", alias = "postalInfo")]
#[serde(rename = "contact:postalInfo")]
postal_info: Option<PostalInfo>,
#[serde(rename = "contact:voice", alias = "voice")]
#[serde(rename = "contact:voice")]
voice: Option<Phone>,
#[serde(rename = "contact:fax", alias = "fax")]
#[serde(rename = "contact:fax")]
fax: Option<Phone>,
#[serde(rename = "contact:email", alias = "email")]
#[serde(rename = "contact:email")]
email: Option<StringValue>,
#[serde(rename = "contact:authInfo", alias = "authInfo")]
#[serde(rename = "contact:authInfo")]
auth_info: Option<ContactAuthInfo>,
}
/// Type for list of elements of the &lt;status&gt; tag for contact update request
#[derive(Serialize, Debug)]
pub struct StatusList {
#[serde(rename = "contact:status", alias = "status")]
#[serde(rename = "contact:status")]
status: Vec<ObjectStatus>,
}
/// Type for elements under the contact &lt;update&gt; tag
#[derive(Serialize, Debug)]
pub struct ContactUpdateRequestData {
#[serde(rename = "xmlns:contact", alias = "xmlns")]
#[serde(rename = "xmlns:contact")]
xmlns: String,
#[serde(rename = "contact:id", alias = "id")]
#[serde(rename = "contact:id")]
id: StringValue,
#[serde(rename = "contact:add", alias = "add")]
#[serde(rename = "contact:add")]
add_statuses: Option<StatusList>,
#[serde(rename = "contact:rem", alias = "rem")]
#[serde(rename = "contact:rem")]
remove_statuses: Option<StatusList>,
#[serde(rename = "contact:chg", alias = "chg")]
#[serde(rename = "contact:chg")]
change_info: Option<ContactChangeInfo>,
}
@ -101,7 +101,7 @@ pub struct ContactUpdateRequestData {
/// Type for EPP XML &lt;update&gt; command for contacts
pub struct ContactUpdate {
/// The data under the &lt;update&gt; tag for the contact update
#[serde(rename = "contact:update", alias = "update")]
#[serde(rename = "contact:update")]
contact: ContactUpdateRequestData,
}

View File

@ -31,10 +31,10 @@ impl DomainCheck {
/// Type for &lt;name&gt; elements under the domain &lt;check&gt; tag
#[derive(Serialize, Debug)]
pub struct DomainList {
#[serde(rename = "xmlns:domain", alias = "xmlns")]
#[serde(rename = "xmlns:domain")]
/// XML namespace for domain commands
pub xmlns: String,
#[serde(rename = "domain:name", alias = "name")]
#[serde(rename = "domain:name")]
/// List of domains to be checked for availability
pub domains: Vec<StringValue>,
}
@ -43,7 +43,7 @@ pub struct DomainList {
/// Type for EPP XML &lt;check&gt; command for domains
pub struct DomainCheck {
/// The object holding the list of domains to be checked
#[serde(rename = "domain:check", alias = "check")]
#[serde(rename = "domain:check")]
list: DomainList,
}

View File

@ -19,26 +19,26 @@ impl Command for DomainCreate {
#[derive(Serialize, Debug)]
pub struct DomainCreateRequestData {
/// XML namespace for domain commands
#[serde(rename = "xmlns:domain", alias = "xmlns")]
#[serde(rename = "xmlns:domain")]
pub xmlns: String,
/// The domain name
#[serde(rename = "domain:name", alias = "name")]
#[serde(rename = "domain:name")]
pub name: StringValue,
/// The period of registration
#[serde(rename = "domain:period", alias = "period")]
#[serde(rename = "domain:period")]
pub period: Period,
/// The list of nameserver hosts
/// either of type `HostObjList` or `HostAttrList`
#[serde(rename = "domain:ns", alias = "ns")]
#[serde(rename = "domain:ns")]
pub ns: Option<HostList>,
/// The domain registrant
#[serde(rename = "domain:registrant", alias = "registrant")]
#[serde(rename = "domain:registrant")]
pub registrant: Option<StringValue>,
/// The list of contacts for the domain
#[serde(rename = "domain:contact", alias = "contact")]
#[serde(rename = "domain:contact")]
pub contacts: Option<Vec<DomainContact>>,
/// The auth info for the domain
#[serde(rename = "domain:authInfo", alias = "authInfo")]
#[serde(rename = "domain:authInfo")]
pub auth_info: DomainAuthInfo,
}
@ -48,7 +48,7 @@ pub struct DomainCreate {
/// The data for the domain to be created with
/// T being the type of nameserver list (`HostObjList` or `HostAttrList`)
/// to be supplied
#[serde(rename = "domain:create", alias = "create")]
#[serde(rename = "domain:create")]
pub domain: DomainCreateRequestData,
}

View File

@ -27,10 +27,10 @@ impl DomainDelete {
#[derive(Serialize, Debug)]
pub struct DomainDeleteRequestData {
/// XML namespace for domain commands
#[serde(rename = "xmlns:domain", alias = "xmlns")]
#[serde(rename = "xmlns:domain")]
xmlns: String,
/// The domain to be deleted
#[serde(rename = "domain:name", alias = "name")]
#[serde(rename = "domain:name")]
name: StringValue,
}
@ -38,7 +38,7 @@ pub struct DomainDeleteRequestData {
/// Type for EPP XML &lt;delete&gt; command for domains
pub struct DomainDelete {
/// The data under the &lt;delete&gt; tag for domain deletion
#[serde(rename = "domain:delete", alias = "delete")]
#[serde(rename = "domain:delete")]
domain: DomainDeleteRequestData,
}

View File

@ -45,13 +45,13 @@ pub struct Domain {
#[derive(Serialize, Debug)]
pub struct DomainInfoRequestData {
/// XML namespace for domain commands
#[serde(rename = "xmlns:domain", alias = "xmlns")]
#[serde(rename = "xmlns:domain")]
xmlns: String,
/// The data for the domain to be queried
#[serde(rename = "domain:name", alias = "name")]
#[serde(rename = "domain:name")]
domain: Domain,
/// The auth info for the domain
#[serde(rename = "domain:authInfo", alias = "authInfo")]
#[serde(rename = "domain:authInfo")]
auth_info: Option<DomainAuthInfo>,
}
@ -59,7 +59,7 @@ pub struct DomainInfoRequestData {
/// Type for EPP XML &lt;info&gt; command for domains
pub struct DomainInfo {
/// The data under the &lt;info&gt; tag for domain info
#[serde(rename = "domain:info", alias = "info")]
#[serde(rename = "domain:info")]
info: DomainInfoRequestData,
}

View File

@ -33,16 +33,16 @@ impl DomainRenew {
#[derive(Serialize, Debug)]
pub struct DomainRenewRequestData {
/// XML namespace for domain commands
#[serde(rename = "xmlns:domain", alias = "xmlns")]
#[serde(rename = "xmlns:domain")]
xmlns: String,
/// The name of the domain to be renewed
#[serde(rename = "domain:name", alias = "name")]
#[serde(rename = "domain:name")]
name: StringValue,
/// The current expiry date of the domain in 'Y-m-d' format
#[serde(rename = "domain:curExpDate", alias = "curExpDate")]
#[serde(rename = "domain:curExpDate")]
current_expiry_date: StringValue,
/// The period of renewal
#[serde(rename = "domain:period", alias = "period")]
#[serde(rename = "domain:period")]
period: Period,
}
@ -50,7 +50,7 @@ pub struct DomainRenewRequestData {
/// Type for EPP XML &lt;renew&gt; command for domains
pub struct DomainRenew {
/// The data under the &lt;renew&gt; tag for the domain renewal
#[serde(rename = "domain:renew", alias = "renew")]
#[serde(rename = "domain:renew")]
domain: DomainRenewRequestData,
}

View File

@ -48,10 +48,10 @@ impl DomainUpdate {
#[derive(Serialize, Debug)]
pub struct DomainChangeInfo {
/// The new registrant contact for the domain
#[serde(rename = "domain:registrant", alias = "update")]
#[serde(rename = "domain:registrant")]
pub registrant: Option<StringValue>,
/// The new auth info for the domain
#[serde(rename = "domain:authInfo", alias = "authInfo")]
#[serde(rename = "domain:authInfo")]
pub auth_info: Option<DomainAuthInfo>,
}
@ -60,13 +60,13 @@ pub struct DomainChangeInfo {
pub struct DomainAddRemove {
/// The list of nameservers to add or remove
/// Type T can be either a `HostObjList` or `HostAttrList`
#[serde(rename = "domain:ns", alias = "ns")]
#[serde(rename = "domain:ns")]
pub ns: Option<HostList>,
/// The list of contacts to add to or remove from the domain
#[serde(rename = "domain:contact", alias = "contact")]
#[serde(rename = "domain:contact")]
pub contacts: Option<Vec<DomainContact>>,
/// The list of statuses to add to or remove from the domain
#[serde(rename = "domain:status", alias = "status")]
#[serde(rename = "domain:status")]
pub statuses: Option<Vec<ObjectStatus>>,
}
@ -74,28 +74,28 @@ pub struct DomainAddRemove {
#[derive(Serialize, Debug)]
pub struct DomainUpdateRequestData {
/// XML namespace for domain commands
#[serde(rename = "xmlns:domain", alias = "xmlns")]
#[serde(rename = "xmlns:domain")]
pub xmlns: String,
/// The name of the domain to update
#[serde(rename = "domain:name", alias = "name")]
#[serde(rename = "domain:name")]
pub name: StringValue,
/// `DomainAddRemove` Object containing the list of elements to be added
/// to the domain
#[serde(rename = "domain:add", alias = "add")]
#[serde(rename = "domain:add")]
pub add: Option<DomainAddRemove>,
/// `DomainAddRemove` Object containing the list of elements to be removed
/// from the domain
#[serde(rename = "domain:rem", alias = "rem")]
#[serde(rename = "domain:rem")]
pub remove: Option<DomainAddRemove>,
/// The data under the &lt;chg&gt; tag for domain update
#[serde(rename = "domain:chg", alias = "chg")]
#[serde(rename = "domain:chg")]
pub change_info: Option<DomainChangeInfo>,
}
#[derive(Serialize, Debug)]
/// Type for EPP XML &lt;update&gt; command for domains
pub struct DomainUpdate {
#[serde(rename = "domain:update", alias = "update")]
#[serde(rename = "domain:update")]
pub domain: DomainUpdateRequestData,
}

View File

@ -80,10 +80,10 @@ pub struct Update {
/// Type for EPP XML &lt;consolidate&gt; extension
pub struct UpdateData {
/// XML namespace for the consolidate extension
#[serde(rename = "xmlns:sync", alias = "xmlns")]
#[serde(rename = "xmlns:sync")]
pub xmlns: String,
/// The expiry date of the domain
#[serde(rename = "sync:expMonthDay", alias = "sync")]
#[serde(rename = "sync:expMonthDay")]
pub exp: StringValue,
}

View File

@ -53,25 +53,25 @@ impl Extension for Update<RgpRestoreReport> {
#[derive(Serialize, Debug)]
pub struct RgpRestoreReportSectionData {
/// The pre-delete registration date
#[serde(rename = "rgp:preData", alias = "preData")]
#[serde(rename = "rgp:preData")]
pre_data: StringValue,
/// The post-delete registration date
#[serde(rename = "rgp:postData", alias = "postData")]
#[serde(rename = "rgp:postData")]
post_data: StringValue,
/// The domain deletion date
#[serde(rename = "rgp:delTime", alias = "delTime")]
#[serde(rename = "rgp:delTime")]
deleted_at: StringValue,
/// The domain restore request date
#[serde(rename = "rgp:resTime", alias = "resTime")]
#[serde(rename = "rgp:resTime")]
restored_at: StringValue,
/// The reason for domain restoration
#[serde(rename = "rgp:resReason", alias = "resReason")]
#[serde(rename = "rgp:resReason")]
restore_reason: StringValue,
/// The registrar's statements on the domain restoration
#[serde(rename = "rgp:statement", alias = "statement")]
#[serde(rename = "rgp:statement")]
statements: Vec<StringValue>,
/// Other remarks for domain restoration
#[serde(rename = "rgp:other", alias = "other")]
#[serde(rename = "rgp:other")]
other: StringValue,
}
@ -81,7 +81,7 @@ pub struct RgpRestoreReportSection {
/// The value of the op attribute for the &lt;restore&gt; tag
op: String,
/// Data for the &lt;report&gt; tag
#[serde(rename = "rgp:report", alias = "report")]
#[serde(rename = "rgp:report")]
report: RgpRestoreReportSectionData,
}
@ -89,10 +89,10 @@ pub struct RgpRestoreReportSection {
/// Type for EPP XML &lt;check&gt; command for domains
pub struct RgpRestoreReport {
/// XML namespace for the RGP restore extension
#[serde(rename = "xmlns:rgp", alias = "xmlns")]
#[serde(rename = "xmlns:rgp")]
xmlns: String,
/// The object holding the list of domains to be checked
#[serde(rename = "rgp:restore", alias = "restore")]
#[serde(rename = "rgp:restore")]
restore: RgpRestoreReportSection,
}

View File

@ -30,10 +30,10 @@ pub struct RgpRestoreRequestData {
/// Type for EPP XML &lt;check&gt; command for domains
pub struct RgpRestoreRequest {
/// XML namespace for the RGP restore extension
#[serde(rename = "xmlns:rgp", alias = "xmlns")]
#[serde(rename = "xmlns:rgp")]
xmlns: String,
/// The object holding the list of domains to be checked
#[serde(rename = "rgp:restore", alias = "restore")]
#[serde(rename = "rgp:restore")]
restore: RgpRestoreRequestData,
}

View File

@ -33,10 +33,10 @@ impl HostCheck {
#[derive(Serialize, Debug)]
pub struct HostList {
/// XML namespace for host commands
#[serde(rename = "xmlns:host", alias = "xmlns")]
#[serde(rename = "xmlns:host")]
xmlns: String,
/// List of hosts to be checked for availability
#[serde(rename = "host:name", alias = "name")]
#[serde(rename = "host:name")]
pub hosts: Vec<StringValue>,
}
@ -44,7 +44,7 @@ pub struct HostList {
/// Type for EPP XML &lt;check&gt; command for hosts
pub struct HostCheck {
/// The instance holding the list of hosts to be checked
#[serde(rename = "host:check", alias = "check")]
#[serde(rename = "host:check")]
list: HostList,
}

View File

@ -30,13 +30,13 @@ impl HostCreate {
#[derive(Serialize, Debug)]
pub struct HostCreateRequestData {
/// XML namespace for host commands
#[serde(rename = "xmlns:host", alias = "xmlns")]
#[serde(rename = "xmlns:host")]
xmlns: String,
/// The name of the host to be created
#[serde(rename = "host:name", alias = "name")]
#[serde(rename = "host:name")]
pub name: StringValue,
/// The list of IP addresses for the host
#[serde(rename = "host:addr", alias = "addr")]
#[serde(rename = "host:addr")]
pub addresses: Option<Vec<HostAddr>>,
}
@ -44,7 +44,7 @@ pub struct HostCreateRequestData {
/// Type for EPP XML &lt;create&gt; command for hosts
pub struct HostCreate {
/// The instance holding the data for the host to be created
#[serde(rename = "host:create", alias = "create")]
#[serde(rename = "host:create")]
host: HostCreateRequestData,
}

View File

@ -27,10 +27,10 @@ impl HostDelete {
#[derive(Serialize, Debug)]
pub struct HostDeleteRequestData {
/// XML namespace for host commands
#[serde(rename = "xmlns:host", alias = "xmlns")]
#[serde(rename = "xmlns:host")]
xmlns: String,
/// The host to be deleted
#[serde(rename = "host:name", alias = "name")]
#[serde(rename = "host:name")]
name: StringValue,
}
@ -38,7 +38,7 @@ pub struct HostDeleteRequestData {
/// Type for EPP XML &lt;delete&gt; command for hosts
pub struct HostDelete {
/// The instance holding the data for the host to be deleted
#[serde(rename = "host:delete", alias = "delete")]
#[serde(rename = "host:delete")]
host: HostDeleteRequestData,
}

View File

@ -29,10 +29,10 @@ impl HostInfo {
#[derive(Serialize, Debug)]
pub struct HostInfoRequestData {
/// XML namespace for host commands
#[serde(rename = "xmlns:host", alias = "xmlns")]
#[serde(rename = "xmlns:host")]
xmlns: String,
/// The name of the host to be queried
#[serde(rename = "host:name", alias = "name")]
#[serde(rename = "host:name")]
name: StringValue,
}
@ -40,7 +40,7 @@ pub struct HostInfoRequestData {
/// Type for EPP XML &lt;info&gt; command for hosts
pub struct HostInfo {
/// The instance holding the data for the host query
#[serde(rename = "host:info", alias = "info")]
#[serde(rename = "host:info")]
info: HostInfoRequestData,
}

View File

@ -45,7 +45,7 @@ impl HostUpdate {
#[derive(Serialize, Debug)]
pub struct HostChangeInfo {
/// The new name for the host
#[serde(rename = "host:name", alias = "name")]
#[serde(rename = "host:name")]
pub name: StringValue,
}
@ -53,10 +53,10 @@ pub struct HostChangeInfo {
#[derive(Serialize, Debug)]
pub struct HostAddRemove {
/// The IP addresses to be added to or removed from the host
#[serde(rename = "host:addr", alias = "addr")]
#[serde(rename = "host:addr")]
pub addresses: Option<Vec<HostAddr>>,
/// The statuses to be added to or removed from the host
#[serde(rename = "host:status", alias = "status")]
#[serde(rename = "host:status")]
pub statuses: Option<Vec<ObjectStatus>>,
}
@ -64,19 +64,19 @@ pub struct HostAddRemove {
#[derive(Serialize, Debug)]
pub struct HostUpdateRequestData {
/// XML namespace for host commands
#[serde(rename = "xmlns:host", alias = "xmlns")]
#[serde(rename = "xmlns:host")]
xmlns: String,
/// The name of the host
#[serde(rename = "host:name", alias = "name")]
#[serde(rename = "host:name")]
name: StringValue,
/// The IP addresses and statuses to be added to the host
#[serde(rename = "host:add", alias = "add")]
#[serde(rename = "host:add")]
add: Option<HostAddRemove>,
/// The IP addresses and statuses to be removed from the host
#[serde(rename = "host:rem", alias = "rem")]
#[serde(rename = "host:rem")]
remove: Option<HostAddRemove>,
/// The host details that need to be updated
#[serde(rename = "host:chg", alias = "chg")]
#[serde(rename = "host:chg")]
change_info: Option<HostChangeInfo>,
}
@ -84,7 +84,7 @@ pub struct HostUpdateRequestData {
/// Type for EPP XML &lt;update&gt; command for hosts
pub struct HostUpdate {
/// The instance holding the data for the host to be updated
#[serde(rename = "host:update", alias = "update")]
#[serde(rename = "host:update")]
host: HostUpdateRequestData,
}