use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BillingRecord {
#[serde(rename = "BillDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bill_date: Option<f64>,
#[serde(rename = "DomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "InvoiceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invoice_id: Option<String>,
#[serde(rename = "Operation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operation: Option<String>,
#[serde(rename = "Price")]
#[serde(skip_serializing_if = "Option::is_none")]
pub price: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CheckDomainAvailabilityRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "IdnLangCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub idn_lang_code: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CheckDomainAvailabilityResponse {
#[serde(rename = "Availability")]
pub availability: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CheckDomainTransferabilityRequest {
#[serde(rename = "AuthCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_code: Option<String>,
#[serde(rename = "DomainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CheckDomainTransferabilityResponse {
#[serde(rename = "Transferability")]
pub transferability: DomainTransferability,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ContactDetail {
#[serde(rename = "AddressLine1")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_line_1: Option<String>,
#[serde(rename = "AddressLine2")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_line_2: Option<String>,
#[serde(rename = "City")]
#[serde(skip_serializing_if = "Option::is_none")]
pub city: Option<String>,
#[serde(rename = "ContactType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub contact_type: Option<String>,
#[serde(rename = "CountryCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub country_code: Option<String>,
#[serde(rename = "Email")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "ExtraParams")]
#[serde(skip_serializing_if = "Option::is_none")]
pub extra_params: Option<Vec<ExtraParam>>,
#[serde(rename = "Fax")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fax: Option<String>,
#[serde(rename = "FirstName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub first_name: Option<String>,
#[serde(rename = "LastName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
#[serde(rename = "OrganizationName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub organization_name: Option<String>,
#[serde(rename = "PhoneNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub phone_number: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "ZipCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub zip_code: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteTagsForDomainRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "TagsToDelete")]
pub tags_to_delete: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteTagsForDomainResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisableDomainAutoRenewRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisableDomainAutoRenewResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisableDomainTransferLockRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisableDomainTransferLockResponse {
#[serde(rename = "OperationId")]
pub operation_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DomainSuggestion {
#[serde(rename = "Availability")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability: Option<String>,
#[serde(rename = "DomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DomainSummary {
#[serde(rename = "AutoRenew")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auto_renew: Option<bool>,
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "Expiry")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expiry: Option<f64>,
#[serde(rename = "TransferLock")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transfer_lock: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DomainTransferability {
#[serde(rename = "Transferable")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transferable: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct EnableDomainAutoRenewRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EnableDomainAutoRenewResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct EnableDomainTransferLockRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EnableDomainTransferLockResponse {
#[serde(rename = "OperationId")]
pub operation_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ExtraParam {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetContactReachabilityStatusRequest {
#[serde(rename = "domainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetContactReachabilityStatusResponse {
#[serde(rename = "domainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDomainDetailRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDomainDetailResponse {
#[serde(rename = "AbuseContactEmail")]
#[serde(skip_serializing_if = "Option::is_none")]
pub abuse_contact_email: Option<String>,
#[serde(rename = "AbuseContactPhone")]
#[serde(skip_serializing_if = "Option::is_none")]
pub abuse_contact_phone: Option<String>,
#[serde(rename = "AdminContact")]
pub admin_contact: ContactDetail,
#[serde(rename = "AdminPrivacy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub admin_privacy: Option<bool>,
#[serde(rename = "AutoRenew")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auto_renew: Option<bool>,
#[serde(rename = "CreationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "DnsSec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dns_sec: Option<String>,
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "ExpirationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expiration_date: Option<f64>,
#[serde(rename = "Nameservers")]
pub nameservers: Vec<Nameserver>,
#[serde(rename = "RegistrantContact")]
pub registrant_contact: ContactDetail,
#[serde(rename = "RegistrantPrivacy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registrant_privacy: Option<bool>,
#[serde(rename = "RegistrarName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registrar_name: Option<String>,
#[serde(rename = "RegistrarUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registrar_url: Option<String>,
#[serde(rename = "RegistryDomainId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registry_domain_id: Option<String>,
#[serde(rename = "Reseller")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reseller: Option<String>,
#[serde(rename = "StatusList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_list: Option<Vec<String>>,
#[serde(rename = "TechContact")]
pub tech_contact: ContactDetail,
#[serde(rename = "TechPrivacy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tech_privacy: Option<bool>,
#[serde(rename = "UpdatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_date: Option<f64>,
#[serde(rename = "WhoIsServer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub who_is_server: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDomainSuggestionsRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "OnlyAvailable")]
pub only_available: bool,
#[serde(rename = "SuggestionCount")]
pub suggestion_count: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDomainSuggestionsResponse {
#[serde(rename = "SuggestionsList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub suggestions_list: Option<Vec<DomainSuggestion>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetOperationDetailRequest {
#[serde(rename = "OperationId")]
pub operation_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetOperationDetailResponse {
#[serde(rename = "DomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "Message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "OperationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operation_id: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "SubmittedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub submitted_date: Option<f64>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDomainsRequest {
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "MaxItems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_items: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListDomainsResponse {
#[serde(rename = "Domains")]
pub domains: Vec<DomainSummary>,
#[serde(rename = "NextPageMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListOperationsRequest {
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "MaxItems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_items: Option<i64>,
#[serde(rename = "SubmittedSince")]
#[serde(skip_serializing_if = "Option::is_none")]
pub submitted_since: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListOperationsResponse {
#[serde(rename = "NextPageMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_marker: Option<String>,
#[serde(rename = "Operations")]
pub operations: Vec<OperationSummary>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTagsForDomainRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTagsForDomainResponse {
#[serde(rename = "TagList")]
pub tag_list: Vec<Tag>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Nameserver {
#[serde(rename = "GlueIps")]
#[serde(skip_serializing_if = "Option::is_none")]
pub glue_ips: Option<Vec<String>>,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct OperationSummary {
#[serde(rename = "OperationId")]
pub operation_id: String,
#[serde(rename = "Status")]
pub status: String,
#[serde(rename = "SubmittedDate")]
pub submitted_date: f64,
#[serde(rename = "Type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RegisterDomainRequest {
#[serde(rename = "AdminContact")]
pub admin_contact: ContactDetail,
#[serde(rename = "AutoRenew")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auto_renew: Option<bool>,
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "DurationInYears")]
pub duration_in_years: i64,
#[serde(rename = "IdnLangCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub idn_lang_code: Option<String>,
#[serde(rename = "PrivacyProtectAdminContact")]
#[serde(skip_serializing_if = "Option::is_none")]
pub privacy_protect_admin_contact: Option<bool>,
#[serde(rename = "PrivacyProtectRegistrantContact")]
#[serde(skip_serializing_if = "Option::is_none")]
pub privacy_protect_registrant_contact: Option<bool>,
#[serde(rename = "PrivacyProtectTechContact")]
#[serde(skip_serializing_if = "Option::is_none")]
pub privacy_protect_tech_contact: Option<bool>,
#[serde(rename = "RegistrantContact")]
pub registrant_contact: ContactDetail,
#[serde(rename = "TechContact")]
pub tech_contact: ContactDetail,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RegisterDomainResponse {
#[serde(rename = "OperationId")]
pub operation_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RenewDomainRequest {
#[serde(rename = "CurrentExpiryYear")]
pub current_expiry_year: i64,
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "DurationInYears")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration_in_years: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RenewDomainResponse {
#[serde(rename = "OperationId")]
pub operation_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ResendContactReachabilityEmailRequest {
#[serde(rename = "domainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResendContactReachabilityEmailResponse {
#[serde(rename = "domainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "emailAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub email_address: Option<String>,
#[serde(rename = "isAlreadyVerified")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_already_verified: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RetrieveDomainAuthCodeRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RetrieveDomainAuthCodeResponse {
#[serde(rename = "AuthCode")]
pub auth_code: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Tag {
#[serde(rename = "Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TransferDomainRequest {
#[serde(rename = "AdminContact")]
pub admin_contact: ContactDetail,
#[serde(rename = "AuthCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_code: Option<String>,
#[serde(rename = "AutoRenew")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auto_renew: Option<bool>,
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "DurationInYears")]
pub duration_in_years: i64,
#[serde(rename = "IdnLangCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub idn_lang_code: Option<String>,
#[serde(rename = "Nameservers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub nameservers: Option<Vec<Nameserver>>,
#[serde(rename = "PrivacyProtectAdminContact")]
#[serde(skip_serializing_if = "Option::is_none")]
pub privacy_protect_admin_contact: Option<bool>,
#[serde(rename = "PrivacyProtectRegistrantContact")]
#[serde(skip_serializing_if = "Option::is_none")]
pub privacy_protect_registrant_contact: Option<bool>,
#[serde(rename = "PrivacyProtectTechContact")]
#[serde(skip_serializing_if = "Option::is_none")]
pub privacy_protect_tech_contact: Option<bool>,
#[serde(rename = "RegistrantContact")]
pub registrant_contact: ContactDetail,
#[serde(rename = "TechContact")]
pub tech_contact: ContactDetail,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TransferDomainResponse {
#[serde(rename = "OperationId")]
pub operation_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDomainContactPrivacyRequest {
#[serde(rename = "AdminPrivacy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub admin_privacy: Option<bool>,
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "RegistrantPrivacy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registrant_privacy: Option<bool>,
#[serde(rename = "TechPrivacy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tech_privacy: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDomainContactPrivacyResponse {
#[serde(rename = "OperationId")]
pub operation_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDomainContactRequest {
#[serde(rename = "AdminContact")]
#[serde(skip_serializing_if = "Option::is_none")]
pub admin_contact: Option<ContactDetail>,
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "RegistrantContact")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registrant_contact: Option<ContactDetail>,
#[serde(rename = "TechContact")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tech_contact: Option<ContactDetail>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDomainContactResponse {
#[serde(rename = "OperationId")]
pub operation_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDomainNameserversRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "Nameservers")]
pub nameservers: Vec<Nameserver>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDomainNameserversResponse {
#[serde(rename = "OperationId")]
pub operation_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateTagsForDomainRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "TagsToUpdate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags_to_update: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateTagsForDomainResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ViewBillingRequest {
#[serde(rename = "End")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end: Option<f64>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "MaxItems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_items: Option<i64>,
#[serde(rename = "Start")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ViewBillingResponse {
#[serde(rename = "BillingRecords")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_records: Option<Vec<BillingRecord>>,
#[serde(rename = "NextPageMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_page_marker: Option<String>,
}
#[derive(Debug, PartialEq)]
pub enum CheckDomainAvailabilityError {
InvalidInput(String),
UnsupportedTLD(String),
}
impl CheckDomainAvailabilityError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CheckDomainAvailabilityError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(CheckDomainAvailabilityError::InvalidInput(
err.msg,
))
}
"UnsupportedTLD" => {
return RusotoError::Service(CheckDomainAvailabilityError::UnsupportedTLD(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CheckDomainAvailabilityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CheckDomainAvailabilityError {
fn description(&self) -> &str {
match *self {
CheckDomainAvailabilityError::InvalidInput(ref cause) => cause,
CheckDomainAvailabilityError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CheckDomainTransferabilityError {
InvalidInput(String),
UnsupportedTLD(String),
}
impl CheckDomainTransferabilityError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CheckDomainTransferabilityError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(CheckDomainTransferabilityError::InvalidInput(
err.msg,
))
}
"UnsupportedTLD" => {
return RusotoError::Service(CheckDomainTransferabilityError::UnsupportedTLD(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CheckDomainTransferabilityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CheckDomainTransferabilityError {
fn description(&self) -> &str {
match *self {
CheckDomainTransferabilityError::InvalidInput(ref cause) => cause,
CheckDomainTransferabilityError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTagsForDomainError {
InvalidInput(String),
OperationLimitExceeded(String),
UnsupportedTLD(String),
}
impl DeleteTagsForDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTagsForDomainError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(DeleteTagsForDomainError::InvalidInput(err.msg))
}
"OperationLimitExceeded" => {
return RusotoError::Service(DeleteTagsForDomainError::OperationLimitExceeded(
err.msg,
))
}
"UnsupportedTLD" => {
return RusotoError::Service(DeleteTagsForDomainError::UnsupportedTLD(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteTagsForDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTagsForDomainError {
fn description(&self) -> &str {
match *self {
DeleteTagsForDomainError::InvalidInput(ref cause) => cause,
DeleteTagsForDomainError::OperationLimitExceeded(ref cause) => cause,
DeleteTagsForDomainError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisableDomainAutoRenewError {
InvalidInput(String),
UnsupportedTLD(String),
}
impl DisableDomainAutoRenewError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisableDomainAutoRenewError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(DisableDomainAutoRenewError::InvalidInput(err.msg))
}
"UnsupportedTLD" => {
return RusotoError::Service(DisableDomainAutoRenewError::UnsupportedTLD(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisableDomainAutoRenewError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisableDomainAutoRenewError {
fn description(&self) -> &str {
match *self {
DisableDomainAutoRenewError::InvalidInput(ref cause) => cause,
DisableDomainAutoRenewError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisableDomainTransferLockError {
DuplicateRequest(String),
InvalidInput(String),
OperationLimitExceeded(String),
TLDRulesViolation(String),
UnsupportedTLD(String),
}
impl DisableDomainTransferLockError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisableDomainTransferLockError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DuplicateRequest" => {
return RusotoError::Service(DisableDomainTransferLockError::DuplicateRequest(
err.msg,
))
}
"InvalidInput" => {
return RusotoError::Service(DisableDomainTransferLockError::InvalidInput(
err.msg,
))
}
"OperationLimitExceeded" => {
return RusotoError::Service(
DisableDomainTransferLockError::OperationLimitExceeded(err.msg),
)
}
"TLDRulesViolation" => {
return RusotoError::Service(DisableDomainTransferLockError::TLDRulesViolation(
err.msg,
))
}
"UnsupportedTLD" => {
return RusotoError::Service(DisableDomainTransferLockError::UnsupportedTLD(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisableDomainTransferLockError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisableDomainTransferLockError {
fn description(&self) -> &str {
match *self {
DisableDomainTransferLockError::DuplicateRequest(ref cause) => cause,
DisableDomainTransferLockError::InvalidInput(ref cause) => cause,
DisableDomainTransferLockError::OperationLimitExceeded(ref cause) => cause,
DisableDomainTransferLockError::TLDRulesViolation(ref cause) => cause,
DisableDomainTransferLockError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum EnableDomainAutoRenewError {
InvalidInput(String),
TLDRulesViolation(String),
UnsupportedTLD(String),
}
impl EnableDomainAutoRenewError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EnableDomainAutoRenewError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(EnableDomainAutoRenewError::InvalidInput(err.msg))
}
"TLDRulesViolation" => {
return RusotoError::Service(EnableDomainAutoRenewError::TLDRulesViolation(
err.msg,
))
}
"UnsupportedTLD" => {
return RusotoError::Service(EnableDomainAutoRenewError::UnsupportedTLD(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for EnableDomainAutoRenewError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for EnableDomainAutoRenewError {
fn description(&self) -> &str {
match *self {
EnableDomainAutoRenewError::InvalidInput(ref cause) => cause,
EnableDomainAutoRenewError::TLDRulesViolation(ref cause) => cause,
EnableDomainAutoRenewError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum EnableDomainTransferLockError {
DuplicateRequest(String),
InvalidInput(String),
OperationLimitExceeded(String),
TLDRulesViolation(String),
UnsupportedTLD(String),
}
impl EnableDomainTransferLockError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EnableDomainTransferLockError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DuplicateRequest" => {
return RusotoError::Service(EnableDomainTransferLockError::DuplicateRequest(
err.msg,
))
}
"InvalidInput" => {
return RusotoError::Service(EnableDomainTransferLockError::InvalidInput(
err.msg,
))
}
"OperationLimitExceeded" => {
return RusotoError::Service(
EnableDomainTransferLockError::OperationLimitExceeded(err.msg),
)
}
"TLDRulesViolation" => {
return RusotoError::Service(EnableDomainTransferLockError::TLDRulesViolation(
err.msg,
))
}
"UnsupportedTLD" => {
return RusotoError::Service(EnableDomainTransferLockError::UnsupportedTLD(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for EnableDomainTransferLockError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for EnableDomainTransferLockError {
fn description(&self) -> &str {
match *self {
EnableDomainTransferLockError::DuplicateRequest(ref cause) => cause,
EnableDomainTransferLockError::InvalidInput(ref cause) => cause,
EnableDomainTransferLockError::OperationLimitExceeded(ref cause) => cause,
EnableDomainTransferLockError::TLDRulesViolation(ref cause) => cause,
EnableDomainTransferLockError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetContactReachabilityStatusError {
InvalidInput(String),
OperationLimitExceeded(String),
UnsupportedTLD(String),
}
impl GetContactReachabilityStatusError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetContactReachabilityStatusError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(GetContactReachabilityStatusError::InvalidInput(
err.msg,
))
}
"OperationLimitExceeded" => {
return RusotoError::Service(
GetContactReachabilityStatusError::OperationLimitExceeded(err.msg),
)
}
"UnsupportedTLD" => {
return RusotoError::Service(GetContactReachabilityStatusError::UnsupportedTLD(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetContactReachabilityStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetContactReachabilityStatusError {
fn description(&self) -> &str {
match *self {
GetContactReachabilityStatusError::InvalidInput(ref cause) => cause,
GetContactReachabilityStatusError::OperationLimitExceeded(ref cause) => cause,
GetContactReachabilityStatusError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDomainDetailError {
InvalidInput(String),
UnsupportedTLD(String),
}
impl GetDomainDetailError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDomainDetailError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(GetDomainDetailError::InvalidInput(err.msg))
}
"UnsupportedTLD" => {
return RusotoError::Service(GetDomainDetailError::UnsupportedTLD(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDomainDetailError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDomainDetailError {
fn description(&self) -> &str {
match *self {
GetDomainDetailError::InvalidInput(ref cause) => cause,
GetDomainDetailError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDomainSuggestionsError {
InvalidInput(String),
UnsupportedTLD(String),
}
impl GetDomainSuggestionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDomainSuggestionsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(GetDomainSuggestionsError::InvalidInput(err.msg))
}
"UnsupportedTLD" => {
return RusotoError::Service(GetDomainSuggestionsError::UnsupportedTLD(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDomainSuggestionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDomainSuggestionsError {
fn description(&self) -> &str {
match *self {
GetDomainSuggestionsError::InvalidInput(ref cause) => cause,
GetDomainSuggestionsError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetOperationDetailError {
InvalidInput(String),
}
impl GetOperationDetailError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetOperationDetailError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(GetOperationDetailError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetOperationDetailError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetOperationDetailError {
fn description(&self) -> &str {
match *self {
GetOperationDetailError::InvalidInput(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDomainsError {
InvalidInput(String),
}
impl ListDomainsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDomainsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(ListDomainsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListDomainsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDomainsError {
fn description(&self) -> &str {
match *self {
ListDomainsError::InvalidInput(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListOperationsError {
InvalidInput(String),
}
impl ListOperationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListOperationsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(ListOperationsError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListOperationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListOperationsError {
fn description(&self) -> &str {
match *self {
ListOperationsError::InvalidInput(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForDomainError {
InvalidInput(String),
OperationLimitExceeded(String),
UnsupportedTLD(String),
}
impl ListTagsForDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForDomainError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(ListTagsForDomainError::InvalidInput(err.msg))
}
"OperationLimitExceeded" => {
return RusotoError::Service(ListTagsForDomainError::OperationLimitExceeded(
err.msg,
))
}
"UnsupportedTLD" => {
return RusotoError::Service(ListTagsForDomainError::UnsupportedTLD(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTagsForDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForDomainError {
fn description(&self) -> &str {
match *self {
ListTagsForDomainError::InvalidInput(ref cause) => cause,
ListTagsForDomainError::OperationLimitExceeded(ref cause) => cause,
ListTagsForDomainError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RegisterDomainError {
DomainLimitExceeded(String),
DuplicateRequest(String),
InvalidInput(String),
OperationLimitExceeded(String),
TLDRulesViolation(String),
UnsupportedTLD(String),
}
impl RegisterDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RegisterDomainError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DomainLimitExceeded" => {
return RusotoError::Service(RegisterDomainError::DomainLimitExceeded(err.msg))
}
"DuplicateRequest" => {
return RusotoError::Service(RegisterDomainError::DuplicateRequest(err.msg))
}
"InvalidInput" => {
return RusotoError::Service(RegisterDomainError::InvalidInput(err.msg))
}
"OperationLimitExceeded" => {
return RusotoError::Service(RegisterDomainError::OperationLimitExceeded(
err.msg,
))
}
"TLDRulesViolation" => {
return RusotoError::Service(RegisterDomainError::TLDRulesViolation(err.msg))
}
"UnsupportedTLD" => {
return RusotoError::Service(RegisterDomainError::UnsupportedTLD(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RegisterDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RegisterDomainError {
fn description(&self) -> &str {
match *self {
RegisterDomainError::DomainLimitExceeded(ref cause) => cause,
RegisterDomainError::DuplicateRequest(ref cause) => cause,
RegisterDomainError::InvalidInput(ref cause) => cause,
RegisterDomainError::OperationLimitExceeded(ref cause) => cause,
RegisterDomainError::TLDRulesViolation(ref cause) => cause,
RegisterDomainError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RenewDomainError {
DuplicateRequest(String),
InvalidInput(String),
OperationLimitExceeded(String),
TLDRulesViolation(String),
UnsupportedTLD(String),
}
impl RenewDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RenewDomainError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DuplicateRequest" => {
return RusotoError::Service(RenewDomainError::DuplicateRequest(err.msg))
}
"InvalidInput" => {
return RusotoError::Service(RenewDomainError::InvalidInput(err.msg))
}
"OperationLimitExceeded" => {
return RusotoError::Service(RenewDomainError::OperationLimitExceeded(err.msg))
}
"TLDRulesViolation" => {
return RusotoError::Service(RenewDomainError::TLDRulesViolation(err.msg))
}
"UnsupportedTLD" => {
return RusotoError::Service(RenewDomainError::UnsupportedTLD(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RenewDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RenewDomainError {
fn description(&self) -> &str {
match *self {
RenewDomainError::DuplicateRequest(ref cause) => cause,
RenewDomainError::InvalidInput(ref cause) => cause,
RenewDomainError::OperationLimitExceeded(ref cause) => cause,
RenewDomainError::TLDRulesViolation(ref cause) => cause,
RenewDomainError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResendContactReachabilityEmailError {
InvalidInput(String),
OperationLimitExceeded(String),
UnsupportedTLD(String),
}
impl ResendContactReachabilityEmailError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ResendContactReachabilityEmailError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(ResendContactReachabilityEmailError::InvalidInput(
err.msg,
))
}
"OperationLimitExceeded" => {
return RusotoError::Service(
ResendContactReachabilityEmailError::OperationLimitExceeded(err.msg),
)
}
"UnsupportedTLD" => {
return RusotoError::Service(
ResendContactReachabilityEmailError::UnsupportedTLD(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ResendContactReachabilityEmailError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResendContactReachabilityEmailError {
fn description(&self) -> &str {
match *self {
ResendContactReachabilityEmailError::InvalidInput(ref cause) => cause,
ResendContactReachabilityEmailError::OperationLimitExceeded(ref cause) => cause,
ResendContactReachabilityEmailError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RetrieveDomainAuthCodeError {
InvalidInput(String),
UnsupportedTLD(String),
}
impl RetrieveDomainAuthCodeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RetrieveDomainAuthCodeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(RetrieveDomainAuthCodeError::InvalidInput(err.msg))
}
"UnsupportedTLD" => {
return RusotoError::Service(RetrieveDomainAuthCodeError::UnsupportedTLD(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RetrieveDomainAuthCodeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RetrieveDomainAuthCodeError {
fn description(&self) -> &str {
match *self {
RetrieveDomainAuthCodeError::InvalidInput(ref cause) => cause,
RetrieveDomainAuthCodeError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TransferDomainError {
DomainLimitExceeded(String),
DuplicateRequest(String),
InvalidInput(String),
OperationLimitExceeded(String),
TLDRulesViolation(String),
UnsupportedTLD(String),
}
impl TransferDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TransferDomainError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DomainLimitExceeded" => {
return RusotoError::Service(TransferDomainError::DomainLimitExceeded(err.msg))
}
"DuplicateRequest" => {
return RusotoError::Service(TransferDomainError::DuplicateRequest(err.msg))
}
"InvalidInput" => {
return RusotoError::Service(TransferDomainError::InvalidInput(err.msg))
}
"OperationLimitExceeded" => {
return RusotoError::Service(TransferDomainError::OperationLimitExceeded(
err.msg,
))
}
"TLDRulesViolation" => {
return RusotoError::Service(TransferDomainError::TLDRulesViolation(err.msg))
}
"UnsupportedTLD" => {
return RusotoError::Service(TransferDomainError::UnsupportedTLD(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TransferDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TransferDomainError {
fn description(&self) -> &str {
match *self {
TransferDomainError::DomainLimitExceeded(ref cause) => cause,
TransferDomainError::DuplicateRequest(ref cause) => cause,
TransferDomainError::InvalidInput(ref cause) => cause,
TransferDomainError::OperationLimitExceeded(ref cause) => cause,
TransferDomainError::TLDRulesViolation(ref cause) => cause,
TransferDomainError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDomainContactError {
DuplicateRequest(String),
InvalidInput(String),
OperationLimitExceeded(String),
TLDRulesViolation(String),
UnsupportedTLD(String),
}
impl UpdateDomainContactError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDomainContactError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DuplicateRequest" => {
return RusotoError::Service(UpdateDomainContactError::DuplicateRequest(
err.msg,
))
}
"InvalidInput" => {
return RusotoError::Service(UpdateDomainContactError::InvalidInput(err.msg))
}
"OperationLimitExceeded" => {
return RusotoError::Service(UpdateDomainContactError::OperationLimitExceeded(
err.msg,
))
}
"TLDRulesViolation" => {
return RusotoError::Service(UpdateDomainContactError::TLDRulesViolation(
err.msg,
))
}
"UnsupportedTLD" => {
return RusotoError::Service(UpdateDomainContactError::UnsupportedTLD(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDomainContactError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDomainContactError {
fn description(&self) -> &str {
match *self {
UpdateDomainContactError::DuplicateRequest(ref cause) => cause,
UpdateDomainContactError::InvalidInput(ref cause) => cause,
UpdateDomainContactError::OperationLimitExceeded(ref cause) => cause,
UpdateDomainContactError::TLDRulesViolation(ref cause) => cause,
UpdateDomainContactError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDomainContactPrivacyError {
DuplicateRequest(String),
InvalidInput(String),
OperationLimitExceeded(String),
TLDRulesViolation(String),
UnsupportedTLD(String),
}
impl UpdateDomainContactPrivacyError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateDomainContactPrivacyError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DuplicateRequest" => {
return RusotoError::Service(UpdateDomainContactPrivacyError::DuplicateRequest(
err.msg,
))
}
"InvalidInput" => {
return RusotoError::Service(UpdateDomainContactPrivacyError::InvalidInput(
err.msg,
))
}
"OperationLimitExceeded" => {
return RusotoError::Service(
UpdateDomainContactPrivacyError::OperationLimitExceeded(err.msg),
)
}
"TLDRulesViolation" => {
return RusotoError::Service(
UpdateDomainContactPrivacyError::TLDRulesViolation(err.msg),
)
}
"UnsupportedTLD" => {
return RusotoError::Service(UpdateDomainContactPrivacyError::UnsupportedTLD(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDomainContactPrivacyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDomainContactPrivacyError {
fn description(&self) -> &str {
match *self {
UpdateDomainContactPrivacyError::DuplicateRequest(ref cause) => cause,
UpdateDomainContactPrivacyError::InvalidInput(ref cause) => cause,
UpdateDomainContactPrivacyError::OperationLimitExceeded(ref cause) => cause,
UpdateDomainContactPrivacyError::TLDRulesViolation(ref cause) => cause,
UpdateDomainContactPrivacyError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDomainNameserversError {
DuplicateRequest(String),
InvalidInput(String),
OperationLimitExceeded(String),
TLDRulesViolation(String),
UnsupportedTLD(String),
}
impl UpdateDomainNameserversError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDomainNameserversError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DuplicateRequest" => {
return RusotoError::Service(UpdateDomainNameserversError::DuplicateRequest(
err.msg,
))
}
"InvalidInput" => {
return RusotoError::Service(UpdateDomainNameserversError::InvalidInput(
err.msg,
))
}
"OperationLimitExceeded" => {
return RusotoError::Service(
UpdateDomainNameserversError::OperationLimitExceeded(err.msg),
)
}
"TLDRulesViolation" => {
return RusotoError::Service(UpdateDomainNameserversError::TLDRulesViolation(
err.msg,
))
}
"UnsupportedTLD" => {
return RusotoError::Service(UpdateDomainNameserversError::UnsupportedTLD(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDomainNameserversError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDomainNameserversError {
fn description(&self) -> &str {
match *self {
UpdateDomainNameserversError::DuplicateRequest(ref cause) => cause,
UpdateDomainNameserversError::InvalidInput(ref cause) => cause,
UpdateDomainNameserversError::OperationLimitExceeded(ref cause) => cause,
UpdateDomainNameserversError::TLDRulesViolation(ref cause) => cause,
UpdateDomainNameserversError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateTagsForDomainError {
InvalidInput(String),
OperationLimitExceeded(String),
UnsupportedTLD(String),
}
impl UpdateTagsForDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateTagsForDomainError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(UpdateTagsForDomainError::InvalidInput(err.msg))
}
"OperationLimitExceeded" => {
return RusotoError::Service(UpdateTagsForDomainError::OperationLimitExceeded(
err.msg,
))
}
"UnsupportedTLD" => {
return RusotoError::Service(UpdateTagsForDomainError::UnsupportedTLD(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateTagsForDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateTagsForDomainError {
fn description(&self) -> &str {
match *self {
UpdateTagsForDomainError::InvalidInput(ref cause) => cause,
UpdateTagsForDomainError::OperationLimitExceeded(ref cause) => cause,
UpdateTagsForDomainError::UnsupportedTLD(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ViewBillingError {
InvalidInput(String),
}
impl ViewBillingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ViewBillingError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidInput" => {
return RusotoError::Service(ViewBillingError::InvalidInput(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ViewBillingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ViewBillingError {
fn description(&self) -> &str {
match *self {
ViewBillingError::InvalidInput(ref cause) => cause,
}
}
}
pub trait Route53Domains {
fn check_domain_availability(
&self,
input: CheckDomainAvailabilityRequest,
) -> RusotoFuture<CheckDomainAvailabilityResponse, CheckDomainAvailabilityError>;
fn check_domain_transferability(
&self,
input: CheckDomainTransferabilityRequest,
) -> RusotoFuture<CheckDomainTransferabilityResponse, CheckDomainTransferabilityError>;
fn delete_tags_for_domain(
&self,
input: DeleteTagsForDomainRequest,
) -> RusotoFuture<DeleteTagsForDomainResponse, DeleteTagsForDomainError>;
fn disable_domain_auto_renew(
&self,
input: DisableDomainAutoRenewRequest,
) -> RusotoFuture<DisableDomainAutoRenewResponse, DisableDomainAutoRenewError>;
fn disable_domain_transfer_lock(
&self,
input: DisableDomainTransferLockRequest,
) -> RusotoFuture<DisableDomainTransferLockResponse, DisableDomainTransferLockError>;
fn enable_domain_auto_renew(
&self,
input: EnableDomainAutoRenewRequest,
) -> RusotoFuture<EnableDomainAutoRenewResponse, EnableDomainAutoRenewError>;
fn enable_domain_transfer_lock(
&self,
input: EnableDomainTransferLockRequest,
) -> RusotoFuture<EnableDomainTransferLockResponse, EnableDomainTransferLockError>;
fn get_contact_reachability_status(
&self,
input: GetContactReachabilityStatusRequest,
) -> RusotoFuture<GetContactReachabilityStatusResponse, GetContactReachabilityStatusError>;
fn get_domain_detail(
&self,
input: GetDomainDetailRequest,
) -> RusotoFuture<GetDomainDetailResponse, GetDomainDetailError>;
fn get_domain_suggestions(
&self,
input: GetDomainSuggestionsRequest,
) -> RusotoFuture<GetDomainSuggestionsResponse, GetDomainSuggestionsError>;
fn get_operation_detail(
&self,
input: GetOperationDetailRequest,
) -> RusotoFuture<GetOperationDetailResponse, GetOperationDetailError>;
fn list_domains(
&self,
input: ListDomainsRequest,
) -> RusotoFuture<ListDomainsResponse, ListDomainsError>;
fn list_operations(
&self,
input: ListOperationsRequest,
) -> RusotoFuture<ListOperationsResponse, ListOperationsError>;
fn list_tags_for_domain(
&self,
input: ListTagsForDomainRequest,
) -> RusotoFuture<ListTagsForDomainResponse, ListTagsForDomainError>;
fn register_domain(
&self,
input: RegisterDomainRequest,
) -> RusotoFuture<RegisterDomainResponse, RegisterDomainError>;
fn renew_domain(
&self,
input: RenewDomainRequest,
) -> RusotoFuture<RenewDomainResponse, RenewDomainError>;
fn resend_contact_reachability_email(
&self,
input: ResendContactReachabilityEmailRequest,
) -> RusotoFuture<ResendContactReachabilityEmailResponse, ResendContactReachabilityEmailError>;
fn retrieve_domain_auth_code(
&self,
input: RetrieveDomainAuthCodeRequest,
) -> RusotoFuture<RetrieveDomainAuthCodeResponse, RetrieveDomainAuthCodeError>;
fn transfer_domain(
&self,
input: TransferDomainRequest,
) -> RusotoFuture<TransferDomainResponse, TransferDomainError>;
fn update_domain_contact(
&self,
input: UpdateDomainContactRequest,
) -> RusotoFuture<UpdateDomainContactResponse, UpdateDomainContactError>;
fn update_domain_contact_privacy(
&self,
input: UpdateDomainContactPrivacyRequest,
) -> RusotoFuture<UpdateDomainContactPrivacyResponse, UpdateDomainContactPrivacyError>;
fn update_domain_nameservers(
&self,
input: UpdateDomainNameserversRequest,
) -> RusotoFuture<UpdateDomainNameserversResponse, UpdateDomainNameserversError>;
fn update_tags_for_domain(
&self,
input: UpdateTagsForDomainRequest,
) -> RusotoFuture<UpdateTagsForDomainResponse, UpdateTagsForDomainError>;
fn view_billing(
&self,
input: ViewBillingRequest,
) -> RusotoFuture<ViewBillingResponse, ViewBillingError>;
}
#[derive(Clone)]
pub struct Route53DomainsClient {
client: Client,
region: region::Region,
}
impl Route53DomainsClient {
pub fn new(region: region::Region) -> Route53DomainsClient {
Route53DomainsClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> Route53DomainsClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
Route53DomainsClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl Route53Domains for Route53DomainsClient {
fn check_domain_availability(
&self,
input: CheckDomainAvailabilityRequest,
) -> RusotoFuture<CheckDomainAvailabilityResponse, CheckDomainAvailabilityError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.CheckDomainAvailability",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CheckDomainAvailabilityResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CheckDomainAvailabilityError::from_response(response))
}))
}
})
}
fn check_domain_transferability(
&self,
input: CheckDomainTransferabilityRequest,
) -> RusotoFuture<CheckDomainTransferabilityResponse, CheckDomainTransferabilityError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.CheckDomainTransferability",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CheckDomainTransferabilityResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CheckDomainTransferabilityError::from_response(response))
}))
}
})
}
fn delete_tags_for_domain(
&self,
input: DeleteTagsForDomainRequest,
) -> RusotoFuture<DeleteTagsForDomainResponse, DeleteTagsForDomainError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.DeleteTagsForDomain",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteTagsForDomainResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteTagsForDomainError::from_response(response))
}),
)
}
})
}
fn disable_domain_auto_renew(
&self,
input: DisableDomainAutoRenewRequest,
) -> RusotoFuture<DisableDomainAutoRenewResponse, DisableDomainAutoRenewError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.DisableDomainAutoRenew",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DisableDomainAutoRenewResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DisableDomainAutoRenewError::from_response(response))
}),
)
}
})
}
fn disable_domain_transfer_lock(
&self,
input: DisableDomainTransferLockRequest,
) -> RusotoFuture<DisableDomainTransferLockResponse, DisableDomainTransferLockError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.DisableDomainTransferLock",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DisableDomainTransferLockResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DisableDomainTransferLockError::from_response(response))
}))
}
})
}
fn enable_domain_auto_renew(
&self,
input: EnableDomainAutoRenewRequest,
) -> RusotoFuture<EnableDomainAutoRenewResponse, EnableDomainAutoRenewError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.EnableDomainAutoRenew",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<EnableDomainAutoRenewResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(EnableDomainAutoRenewError::from_response(response))
}),
)
}
})
}
fn enable_domain_transfer_lock(
&self,
input: EnableDomainTransferLockRequest,
) -> RusotoFuture<EnableDomainTransferLockResponse, EnableDomainTransferLockError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.EnableDomainTransferLock",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<EnableDomainTransferLockResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(EnableDomainTransferLockError::from_response(response))
}))
}
})
}
fn get_contact_reachability_status(
&self,
input: GetContactReachabilityStatusRequest,
) -> RusotoFuture<GetContactReachabilityStatusResponse, GetContactReachabilityStatusError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.GetContactReachabilityStatus",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetContactReachabilityStatusResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetContactReachabilityStatusError::from_response(response))
}))
}
})
}
fn get_domain_detail(
&self,
input: GetDomainDetailRequest,
) -> RusotoFuture<GetDomainDetailResponse, GetDomainDetailError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "Route53Domains_v20140515.GetDomainDetail");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetDomainDetailResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDomainDetailError::from_response(response))),
)
}
})
}
fn get_domain_suggestions(
&self,
input: GetDomainSuggestionsRequest,
) -> RusotoFuture<GetDomainSuggestionsResponse, GetDomainSuggestionsError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.GetDomainSuggestions",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetDomainSuggestionsResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetDomainSuggestionsError::from_response(response))
}),
)
}
})
}
fn get_operation_detail(
&self,
input: GetOperationDetailRequest,
) -> RusotoFuture<GetOperationDetailResponse, GetOperationDetailError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.GetOperationDetail",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetOperationDetailResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetOperationDetailError::from_response(response))),
)
}
})
}
fn list_domains(
&self,
input: ListDomainsRequest,
) -> RusotoFuture<ListDomainsResponse, ListDomainsError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "Route53Domains_v20140515.ListDomains");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListDomainsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListDomainsError::from_response(response))),
)
}
})
}
fn list_operations(
&self,
input: ListOperationsRequest,
) -> RusotoFuture<ListOperationsResponse, ListOperationsError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "Route53Domains_v20140515.ListOperations");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListOperationsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListOperationsError::from_response(response))),
)
}
})
}
fn list_tags_for_domain(
&self,
input: ListTagsForDomainRequest,
) -> RusotoFuture<ListTagsForDomainResponse, ListTagsForDomainError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "Route53Domains_v20140515.ListTagsForDomain");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListTagsForDomainResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListTagsForDomainError::from_response(response))),
)
}
})
}
fn register_domain(
&self,
input: RegisterDomainRequest,
) -> RusotoFuture<RegisterDomainResponse, RegisterDomainError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "Route53Domains_v20140515.RegisterDomain");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<RegisterDomainResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RegisterDomainError::from_response(response))),
)
}
})
}
fn renew_domain(
&self,
input: RenewDomainRequest,
) -> RusotoFuture<RenewDomainResponse, RenewDomainError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "Route53Domains_v20140515.RenewDomain");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<RenewDomainResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RenewDomainError::from_response(response))),
)
}
})
}
fn resend_contact_reachability_email(
&self,
input: ResendContactReachabilityEmailRequest,
) -> RusotoFuture<ResendContactReachabilityEmailResponse, ResendContactReachabilityEmailError>
{
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.ResendContactReachabilityEmail",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ResendContactReachabilityEmailResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ResendContactReachabilityEmailError::from_response(response))
}))
}
})
}
fn retrieve_domain_auth_code(
&self,
input: RetrieveDomainAuthCodeRequest,
) -> RusotoFuture<RetrieveDomainAuthCodeResponse, RetrieveDomainAuthCodeError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.RetrieveDomainAuthCode",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<RetrieveDomainAuthCodeResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(RetrieveDomainAuthCodeError::from_response(response))
}),
)
}
})
}
fn transfer_domain(
&self,
input: TransferDomainRequest,
) -> RusotoFuture<TransferDomainResponse, TransferDomainError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "Route53Domains_v20140515.TransferDomain");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<TransferDomainResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TransferDomainError::from_response(response))),
)
}
})
}
fn update_domain_contact(
&self,
input: UpdateDomainContactRequest,
) -> RusotoFuture<UpdateDomainContactResponse, UpdateDomainContactError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.UpdateDomainContact",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateDomainContactResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateDomainContactError::from_response(response))
}),
)
}
})
}
fn update_domain_contact_privacy(
&self,
input: UpdateDomainContactPrivacyRequest,
) -> RusotoFuture<UpdateDomainContactPrivacyResponse, UpdateDomainContactPrivacyError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.UpdateDomainContactPrivacy",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateDomainContactPrivacyResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateDomainContactPrivacyError::from_response(response))
}))
}
})
}
fn update_domain_nameservers(
&self,
input: UpdateDomainNameserversRequest,
) -> RusotoFuture<UpdateDomainNameserversResponse, UpdateDomainNameserversError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.UpdateDomainNameservers",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateDomainNameserversResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateDomainNameserversError::from_response(response))
}))
}
})
}
fn update_tags_for_domain(
&self,
input: UpdateTagsForDomainRequest,
) -> RusotoFuture<UpdateTagsForDomainResponse, UpdateTagsForDomainError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"Route53Domains_v20140515.UpdateTagsForDomain",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateTagsForDomainResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateTagsForDomainError::from_response(response))
}),
)
}
})
}
fn view_billing(
&self,
input: ViewBillingRequest,
) -> RusotoFuture<ViewBillingResponse, ViewBillingError> {
let mut request = SignedRequest::new("POST", "route53domains", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "Route53Domains_v20140515.ViewBilling");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ViewBillingResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ViewBillingError::from_response(response))),
)
}
})
}
}