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::param::{Params, ServiceParams};
use rusoto_core::proto::xml::error::*;
use rusoto_core::proto::xml::util::{
characters, deserialize_elements, end_element, find_start_element, peek_at_name, skip_tree,
start_element,
};
use rusoto_core::proto::xml::util::{Next, Peek, XmlParseError, XmlResponse};
use rusoto_core::signature::SignedRequest;
use std::io::Write;
use std::str::FromStr;
use xml;
use xml::reader::ParserConfig;
use xml::EventReader;
use xml::EventWriter;
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AccountLimit {
pub type_: String,
pub value: i64,
}
struct AccountLimitDeserializer;
impl AccountLimitDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AccountLimit, XmlParseError> {
deserialize_elements::<_, AccountLimit, _>(tag_name, stack, |name, stack, obj| {
match name {
"Type" => {
obj.type_ = AccountLimitTypeDeserializer::deserialize("Type", stack)?;
}
"Value" => {
obj.value = LimitValueDeserializer::deserialize("Value", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct AccountLimitTypeDeserializer;
impl AccountLimitTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct AccountLimitTypeSerializer;
impl AccountLimitTypeSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AlarmIdentifier {
pub name: String,
pub region: String,
}
struct AlarmIdentifierDeserializer;
impl AlarmIdentifierDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AlarmIdentifier, XmlParseError> {
deserialize_elements::<_, AlarmIdentifier, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = AlarmNameDeserializer::deserialize("Name", stack)?;
}
"Region" => {
obj.region = CloudWatchRegionDeserializer::deserialize("Region", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
pub struct AlarmIdentifierSerializer;
impl AlarmIdentifierSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &AlarmIdentifier,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::start_element("Name"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.name
)))?;
writer.write(xml::writer::XmlEvent::end_element())?;
writer.write(xml::writer::XmlEvent::start_element("Region"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.region
)))?;
writer.write(xml::writer::XmlEvent::end_element())?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct AlarmNameDeserializer;
impl AlarmNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct AlarmNameSerializer;
impl AlarmNameSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct AliasHealthEnabledDeserializer;
impl AliasHealthEnabledDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct AliasHealthEnabledSerializer;
impl AliasHealthEnabledSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &bool,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AliasTarget {
pub dns_name: String,
pub evaluate_target_health: bool,
pub hosted_zone_id: String,
}
struct AliasTargetDeserializer;
impl AliasTargetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AliasTarget, XmlParseError> {
deserialize_elements::<_, AliasTarget, _>(tag_name, stack, |name, stack, obj| {
match name {
"DNSName" => {
obj.dns_name = DNSNameDeserializer::deserialize("DNSName", stack)?;
}
"EvaluateTargetHealth" => {
obj.evaluate_target_health =
AliasHealthEnabledDeserializer::deserialize("EvaluateTargetHealth", stack)?;
}
"HostedZoneId" => {
obj.hosted_zone_id =
ResourceIdDeserializer::deserialize("HostedZoneId", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
pub struct AliasTargetSerializer;
impl AliasTargetSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &AliasTarget,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::start_element("DNSName"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.dns_name
)))?;
writer.write(xml::writer::XmlEvent::end_element())?;
writer.write(xml::writer::XmlEvent::start_element("EvaluateTargetHealth"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.evaluate_target_health
)))?;
writer.write(xml::writer::XmlEvent::end_element())?;
writer.write(xml::writer::XmlEvent::start_element("HostedZoneId"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.hosted_zone_id
)))?;
writer.write(xml::writer::XmlEvent::end_element())?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
pub struct AssociateVPCCommentSerializer;
impl AssociateVPCCommentSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AssociateVPCWithHostedZoneRequest {
pub comment: Option<String>,
pub hosted_zone_id: String,
pub vpc: VPC,
}
pub struct AssociateVPCWithHostedZoneRequestSerializer;
impl AssociateVPCWithHostedZoneRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &AssociateVPCWithHostedZoneRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
if let Some(ref value) = obj.comment {
&AssociateVPCCommentSerializer::serialize(&mut writer, "Comment", value)?;
}
VPCSerializer::serialize(&mut writer, "VPC", &obj.vpc)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct AssociateVPCWithHostedZoneResponse {
pub change_info: ChangeInfo,
}
struct AssociateVPCWithHostedZoneResponseDeserializer;
impl AssociateVPCWithHostedZoneResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<AssociateVPCWithHostedZoneResponse, XmlParseError> {
deserialize_elements::<_, AssociateVPCWithHostedZoneResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ChangeInfo" => {
obj.change_info = ChangeInfoDeserializer::deserialize("ChangeInfo", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Change {
pub action: String,
pub resource_record_set: ResourceRecordSet,
}
pub struct ChangeSerializer;
impl ChangeSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &Change,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::start_element("Action"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.action
)))?;
writer.write(xml::writer::XmlEvent::end_element())?;
ResourceRecordSetSerializer::serialize(
&mut writer,
"ResourceRecordSet",
&obj.resource_record_set,
)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
pub struct ChangeActionSerializer;
impl ChangeActionSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ChangeBatch {
pub changes: Vec<Change>,
pub comment: Option<String>,
}
pub struct ChangeBatchSerializer;
impl ChangeBatchSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &ChangeBatch,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
ChangesSerializer::serialize(&mut writer, "Changes", &obj.changes)?;
if let Some(ref value) = obj.comment {
writer.write(xml::writer::XmlEvent::start_element("Comment"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ChangeInfo {
pub comment: Option<String>,
pub id: String,
pub status: String,
pub submitted_at: String,
}
struct ChangeInfoDeserializer;
impl ChangeInfoDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ChangeInfo, XmlParseError> {
deserialize_elements::<_, ChangeInfo, _>(tag_name, stack, |name, stack, obj| {
match name {
"Comment" => {
obj.comment = Some(ResourceDescriptionDeserializer::deserialize(
"Comment", stack,
)?);
}
"Id" => {
obj.id = ResourceIdDeserializer::deserialize("Id", stack)?;
}
"Status" => {
obj.status = ChangeStatusDeserializer::deserialize("Status", stack)?;
}
"SubmittedAt" => {
obj.submitted_at = TimeStampDeserializer::deserialize("SubmittedAt", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ChangeResourceRecordSetsRequest {
pub change_batch: ChangeBatch,
pub hosted_zone_id: String,
}
pub struct ChangeResourceRecordSetsRequestSerializer;
impl ChangeResourceRecordSetsRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &ChangeResourceRecordSetsRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
ChangeBatchSerializer::serialize(&mut writer, "ChangeBatch", &obj.change_batch)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ChangeResourceRecordSetsResponse {
pub change_info: ChangeInfo,
}
struct ChangeResourceRecordSetsResponseDeserializer;
impl ChangeResourceRecordSetsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ChangeResourceRecordSetsResponse, XmlParseError> {
deserialize_elements::<_, ChangeResourceRecordSetsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ChangeInfo" => {
obj.change_info = ChangeInfoDeserializer::deserialize("ChangeInfo", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ChangeStatusDeserializer;
impl ChangeStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ChangeTagsForResourceRequest {
pub add_tags: Option<Vec<Tag>>,
pub remove_tag_keys: Option<Vec<String>>,
pub resource_id: String,
pub resource_type: String,
}
pub struct ChangeTagsForResourceRequestSerializer;
impl ChangeTagsForResourceRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &ChangeTagsForResourceRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
if let Some(ref value) = obj.add_tags {
&TagListSerializer::serialize(&mut writer, "AddTags", value)?;
}
if let Some(ref value) = obj.remove_tag_keys {
&TagKeyListSerializer::serialize(&mut writer, "RemoveTagKeys", value)?;
}
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ChangeTagsForResourceResponse {}
struct ChangeTagsForResourceResponseDeserializer;
impl ChangeTagsForResourceResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ChangeTagsForResourceResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = ChangeTagsForResourceResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct ChangesSerializer;
impl ChangesSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &Vec<Change>,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
for element in obj {
ChangeSerializer::serialize(writer, "Change", element)?;
}
writer.write(xml::writer::XmlEvent::end_element())?;
Ok(())
}
}
struct CheckerIpRangesDeserializer;
impl CheckerIpRangesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "member" {
obj.push(IPAddressCidrDeserializer::deserialize("member", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ChildHealthCheckListDeserializer;
impl ChildHealthCheckListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ChildHealthCheck" {
obj.push(HealthCheckIdDeserializer::deserialize(
"ChildHealthCheck",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
pub struct ChildHealthCheckListSerializer;
impl ChildHealthCheckListSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &Vec<String>,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
for element in obj {
HealthCheckIdSerializer::serialize(writer, "ChildHealthCheck", element)?;
}
writer.write(xml::writer::XmlEvent::end_element())?;
Ok(())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CloudWatchAlarmConfiguration {
pub comparison_operator: String,
pub dimensions: Option<Vec<Dimension>>,
pub evaluation_periods: i64,
pub metric_name: String,
pub namespace: String,
pub period: i64,
pub statistic: String,
pub threshold: f64,
}
struct CloudWatchAlarmConfigurationDeserializer;
impl CloudWatchAlarmConfigurationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CloudWatchAlarmConfiguration, XmlParseError> {
deserialize_elements::<_, CloudWatchAlarmConfiguration, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ComparisonOperator" => {
obj.comparison_operator = ComparisonOperatorDeserializer::deserialize(
"ComparisonOperator",
stack,
)?;
}
"Dimensions" => {
obj.dimensions
.get_or_insert(vec![])
.extend(DimensionListDeserializer::deserialize("Dimensions", stack)?);
}
"EvaluationPeriods" => {
obj.evaluation_periods =
EvaluationPeriodsDeserializer::deserialize("EvaluationPeriods", stack)?;
}
"MetricName" => {
obj.metric_name = MetricNameDeserializer::deserialize("MetricName", stack)?;
}
"Namespace" => {
obj.namespace = NamespaceDeserializer::deserialize("Namespace", stack)?;
}
"Period" => {
obj.period = PeriodDeserializer::deserialize("Period", stack)?;
}
"Statistic" => {
obj.statistic = StatisticDeserializer::deserialize("Statistic", stack)?;
}
"Threshold" => {
obj.threshold = ThresholdDeserializer::deserialize("Threshold", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct CloudWatchLogsLogGroupArnDeserializer;
impl CloudWatchLogsLogGroupArnDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct CloudWatchLogsLogGroupArnSerializer;
impl CloudWatchLogsLogGroupArnSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct CloudWatchRegionDeserializer;
impl CloudWatchRegionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct CloudWatchRegionSerializer;
impl CloudWatchRegionSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct ComparisonOperatorDeserializer;
impl ComparisonOperatorDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateHealthCheckRequest {
pub caller_reference: String,
pub health_check_config: HealthCheckConfig,
}
pub struct CreateHealthCheckRequestSerializer;
impl CreateHealthCheckRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &CreateHealthCheckRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
HealthCheckNonceSerializer::serialize(
&mut writer,
"CallerReference",
&obj.caller_reference,
)?;
HealthCheckConfigSerializer::serialize(
&mut writer,
"HealthCheckConfig",
&obj.health_check_config,
)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateHealthCheckResponse {
pub health_check: HealthCheck,
pub location: String,
}
struct CreateHealthCheckResponseDeserializer;
impl CreateHealthCheckResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateHealthCheckResponse, XmlParseError> {
deserialize_elements::<_, CreateHealthCheckResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HealthCheck" => {
obj.health_check =
HealthCheckDeserializer::deserialize("HealthCheck", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateHostedZoneRequest {
pub caller_reference: String,
pub delegation_set_id: Option<String>,
pub hosted_zone_config: Option<HostedZoneConfig>,
pub name: String,
pub vpc: Option<VPC>,
}
pub struct CreateHostedZoneRequestSerializer;
impl CreateHostedZoneRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &CreateHostedZoneRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
NonceSerializer::serialize(&mut writer, "CallerReference", &obj.caller_reference)?;
if let Some(ref value) = obj.delegation_set_id {
&ResourceIdSerializer::serialize(&mut writer, "DelegationSetId", value)?;
}
if let Some(ref value) = obj.hosted_zone_config {
&HostedZoneConfigSerializer::serialize(&mut writer, "HostedZoneConfig", value)?;
}
DNSNameSerializer::serialize(&mut writer, "Name", &obj.name)?;
if let Some(ref value) = obj.vpc {
&VPCSerializer::serialize(&mut writer, "VPC", value)?;
}
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateHostedZoneResponse {
pub change_info: ChangeInfo,
pub delegation_set: DelegationSet,
pub hosted_zone: HostedZone,
pub location: String,
pub vpc: Option<VPC>,
}
struct CreateHostedZoneResponseDeserializer;
impl CreateHostedZoneResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateHostedZoneResponse, XmlParseError> {
deserialize_elements::<_, CreateHostedZoneResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ChangeInfo" => {
obj.change_info = ChangeInfoDeserializer::deserialize("ChangeInfo", stack)?;
}
"DelegationSet" => {
obj.delegation_set =
DelegationSetDeserializer::deserialize("DelegationSet", stack)?;
}
"HostedZone" => {
obj.hosted_zone = HostedZoneDeserializer::deserialize("HostedZone", stack)?;
}
"VPC" => {
obj.vpc = Some(VPCDeserializer::deserialize("VPC", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateQueryLoggingConfigRequest {
pub cloud_watch_logs_log_group_arn: String,
pub hosted_zone_id: String,
}
pub struct CreateQueryLoggingConfigRequestSerializer;
impl CreateQueryLoggingConfigRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &CreateQueryLoggingConfigRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
CloudWatchLogsLogGroupArnSerializer::serialize(
&mut writer,
"CloudWatchLogsLogGroupArn",
&obj.cloud_watch_logs_log_group_arn,
)?;
ResourceIdSerializer::serialize(&mut writer, "HostedZoneId", &obj.hosted_zone_id)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateQueryLoggingConfigResponse {
pub location: String,
pub query_logging_config: QueryLoggingConfig,
}
struct CreateQueryLoggingConfigResponseDeserializer;
impl CreateQueryLoggingConfigResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateQueryLoggingConfigResponse, XmlParseError> {
deserialize_elements::<_, CreateQueryLoggingConfigResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"QueryLoggingConfig" => {
obj.query_logging_config = QueryLoggingConfigDeserializer::deserialize(
"QueryLoggingConfig",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateReusableDelegationSetRequest {
pub caller_reference: String,
pub hosted_zone_id: Option<String>,
}
pub struct CreateReusableDelegationSetRequestSerializer;
impl CreateReusableDelegationSetRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &CreateReusableDelegationSetRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
NonceSerializer::serialize(&mut writer, "CallerReference", &obj.caller_reference)?;
if let Some(ref value) = obj.hosted_zone_id {
&ResourceIdSerializer::serialize(&mut writer, "HostedZoneId", value)?;
}
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateReusableDelegationSetResponse {
pub delegation_set: DelegationSet,
pub location: String,
}
struct CreateReusableDelegationSetResponseDeserializer;
impl CreateReusableDelegationSetResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateReusableDelegationSetResponse, XmlParseError> {
deserialize_elements::<_, CreateReusableDelegationSetResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DelegationSet" => {
obj.delegation_set =
DelegationSetDeserializer::deserialize("DelegationSet", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateTrafficPolicyInstanceRequest {
pub hosted_zone_id: String,
pub name: String,
pub ttl: i64,
pub traffic_policy_id: String,
pub traffic_policy_version: i64,
}
pub struct CreateTrafficPolicyInstanceRequestSerializer;
impl CreateTrafficPolicyInstanceRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &CreateTrafficPolicyInstanceRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
ResourceIdSerializer::serialize(&mut writer, "HostedZoneId", &obj.hosted_zone_id)?;
DNSNameSerializer::serialize(&mut writer, "Name", &obj.name)?;
TTLSerializer::serialize(&mut writer, "TTL", &obj.ttl)?;
TrafficPolicyIdSerializer::serialize(
&mut writer,
"TrafficPolicyId",
&obj.traffic_policy_id,
)?;
TrafficPolicyVersionSerializer::serialize(
&mut writer,
"TrafficPolicyVersion",
&obj.traffic_policy_version,
)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateTrafficPolicyInstanceResponse {
pub location: String,
pub traffic_policy_instance: TrafficPolicyInstance,
}
struct CreateTrafficPolicyInstanceResponseDeserializer;
impl CreateTrafficPolicyInstanceResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateTrafficPolicyInstanceResponse, XmlParseError> {
deserialize_elements::<_, CreateTrafficPolicyInstanceResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"TrafficPolicyInstance" => {
obj.traffic_policy_instance =
TrafficPolicyInstanceDeserializer::deserialize(
"TrafficPolicyInstance",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateTrafficPolicyRequest {
pub comment: Option<String>,
pub document: String,
pub name: String,
}
pub struct CreateTrafficPolicyRequestSerializer;
impl CreateTrafficPolicyRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &CreateTrafficPolicyRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
if let Some(ref value) = obj.comment {
&TrafficPolicyCommentSerializer::serialize(&mut writer, "Comment", value)?;
}
TrafficPolicyDocumentSerializer::serialize(&mut writer, "Document", &obj.document)?;
TrafficPolicyNameSerializer::serialize(&mut writer, "Name", &obj.name)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateTrafficPolicyResponse {
pub location: String,
pub traffic_policy: TrafficPolicy,
}
struct CreateTrafficPolicyResponseDeserializer;
impl CreateTrafficPolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateTrafficPolicyResponse, XmlParseError> {
deserialize_elements::<_, CreateTrafficPolicyResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"TrafficPolicy" => {
obj.traffic_policy =
TrafficPolicyDeserializer::deserialize("TrafficPolicy", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateTrafficPolicyVersionRequest {
pub comment: Option<String>,
pub document: String,
pub id: String,
}
pub struct CreateTrafficPolicyVersionRequestSerializer;
impl CreateTrafficPolicyVersionRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &CreateTrafficPolicyVersionRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
if let Some(ref value) = obj.comment {
&TrafficPolicyCommentSerializer::serialize(&mut writer, "Comment", value)?;
}
TrafficPolicyDocumentSerializer::serialize(&mut writer, "Document", &obj.document)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateTrafficPolicyVersionResponse {
pub location: String,
pub traffic_policy: TrafficPolicy,
}
struct CreateTrafficPolicyVersionResponseDeserializer;
impl CreateTrafficPolicyVersionResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateTrafficPolicyVersionResponse, XmlParseError> {
deserialize_elements::<_, CreateTrafficPolicyVersionResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"TrafficPolicy" => {
obj.traffic_policy =
TrafficPolicyDeserializer::deserialize("TrafficPolicy", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateVPCAssociationAuthorizationRequest {
pub hosted_zone_id: String,
pub vpc: VPC,
}
pub struct CreateVPCAssociationAuthorizationRequestSerializer;
impl CreateVPCAssociationAuthorizationRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &CreateVPCAssociationAuthorizationRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
VPCSerializer::serialize(&mut writer, "VPC", &obj.vpc)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct CreateVPCAssociationAuthorizationResponse {
pub hosted_zone_id: String,
pub vpc: VPC,
}
struct CreateVPCAssociationAuthorizationResponseDeserializer;
impl CreateVPCAssociationAuthorizationResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<CreateVPCAssociationAuthorizationResponse, XmlParseError> {
deserialize_elements::<_, CreateVPCAssociationAuthorizationResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HostedZoneId" => {
obj.hosted_zone_id =
ResourceIdDeserializer::deserialize("HostedZoneId", stack)?;
}
"VPC" => {
obj.vpc = VPCDeserializer::deserialize("VPC", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct DNSNameDeserializer;
impl DNSNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct DNSNameSerializer;
impl DNSNameSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct DNSRCodeDeserializer;
impl DNSRCodeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DelegationSet {
pub caller_reference: Option<String>,
pub id: Option<String>,
pub name_servers: Vec<String>,
}
struct DelegationSetDeserializer;
impl DelegationSetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DelegationSet, XmlParseError> {
deserialize_elements::<_, DelegationSet, _>(tag_name, stack, |name, stack, obj| {
match name {
"CallerReference" => {
obj.caller_reference =
Some(NonceDeserializer::deserialize("CallerReference", stack)?);
}
"Id" => {
obj.id = Some(ResourceIdDeserializer::deserialize("Id", stack)?);
}
"NameServers" => {
obj.name_servers
.extend(DelegationSetNameServersDeserializer::deserialize(
"NameServers",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DelegationSetNameServersDeserializer;
impl DelegationSetNameServersDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "NameServer" {
obj.push(DNSNameDeserializer::deserialize("NameServer", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct DelegationSetsDeserializer;
impl DelegationSetsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<DelegationSet>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "DelegationSet" {
obj.push(DelegationSetDeserializer::deserialize(
"DelegationSet",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteHealthCheckRequest {
pub health_check_id: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteHealthCheckResponse {}
struct DeleteHealthCheckResponseDeserializer;
impl DeleteHealthCheckResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteHealthCheckResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteHealthCheckResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteHostedZoneRequest {
pub id: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteHostedZoneResponse {
pub change_info: ChangeInfo,
}
struct DeleteHostedZoneResponseDeserializer;
impl DeleteHostedZoneResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteHostedZoneResponse, XmlParseError> {
deserialize_elements::<_, DeleteHostedZoneResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ChangeInfo" => {
obj.change_info = ChangeInfoDeserializer::deserialize("ChangeInfo", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteQueryLoggingConfigRequest {
pub id: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteQueryLoggingConfigResponse {}
struct DeleteQueryLoggingConfigResponseDeserializer;
impl DeleteQueryLoggingConfigResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteQueryLoggingConfigResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteQueryLoggingConfigResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteReusableDelegationSetRequest {
pub id: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteReusableDelegationSetResponse {}
struct DeleteReusableDelegationSetResponseDeserializer;
impl DeleteReusableDelegationSetResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteReusableDelegationSetResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteReusableDelegationSetResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteTrafficPolicyInstanceRequest {
pub id: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteTrafficPolicyInstanceResponse {}
struct DeleteTrafficPolicyInstanceResponseDeserializer;
impl DeleteTrafficPolicyInstanceResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteTrafficPolicyInstanceResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteTrafficPolicyInstanceResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteTrafficPolicyRequest {
pub id: String,
pub version: i64,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteTrafficPolicyResponse {}
struct DeleteTrafficPolicyResponseDeserializer;
impl DeleteTrafficPolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteTrafficPolicyResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteTrafficPolicyResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteVPCAssociationAuthorizationRequest {
pub hosted_zone_id: String,
pub vpc: VPC,
}
pub struct DeleteVPCAssociationAuthorizationRequestSerializer;
impl DeleteVPCAssociationAuthorizationRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &DeleteVPCAssociationAuthorizationRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
VPCSerializer::serialize(&mut writer, "VPC", &obj.vpc)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DeleteVPCAssociationAuthorizationResponse {}
struct DeleteVPCAssociationAuthorizationResponseDeserializer;
impl DeleteVPCAssociationAuthorizationResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DeleteVPCAssociationAuthorizationResponse, XmlParseError> {
start_element(tag_name, stack)?;
let obj = DeleteVPCAssociationAuthorizationResponse::default();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Dimension {
pub name: String,
pub value: String,
}
struct DimensionDeserializer;
impl DimensionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Dimension, XmlParseError> {
deserialize_elements::<_, Dimension, _>(tag_name, stack, |name, stack, obj| {
match name {
"Name" => {
obj.name = DimensionFieldDeserializer::deserialize("Name", stack)?;
}
"Value" => {
obj.value = DimensionFieldDeserializer::deserialize("Value", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct DimensionFieldDeserializer;
impl DimensionFieldDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct DimensionListDeserializer;
impl DimensionListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Dimension>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Dimension" {
obj.push(DimensionDeserializer::deserialize("Dimension", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct DisabledDeserializer;
impl DisabledDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct DisabledSerializer;
impl DisabledSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &bool,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
pub struct DisassociateVPCCommentSerializer;
impl DisassociateVPCCommentSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DisassociateVPCFromHostedZoneRequest {
pub comment: Option<String>,
pub hosted_zone_id: String,
pub vpc: VPC,
}
pub struct DisassociateVPCFromHostedZoneRequestSerializer;
impl DisassociateVPCFromHostedZoneRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &DisassociateVPCFromHostedZoneRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
if let Some(ref value) = obj.comment {
&DisassociateVPCCommentSerializer::serialize(&mut writer, "Comment", value)?;
}
VPCSerializer::serialize(&mut writer, "VPC", &obj.vpc)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct DisassociateVPCFromHostedZoneResponse {
pub change_info: ChangeInfo,
}
struct DisassociateVPCFromHostedZoneResponseDeserializer;
impl DisassociateVPCFromHostedZoneResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<DisassociateVPCFromHostedZoneResponse, XmlParseError> {
deserialize_elements::<_, DisassociateVPCFromHostedZoneResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ChangeInfo" => {
obj.change_info = ChangeInfoDeserializer::deserialize("ChangeInfo", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct EnableSNIDeserializer;
impl EnableSNIDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct EnableSNISerializer;
impl EnableSNISerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &bool,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct EvaluationPeriodsDeserializer;
impl EvaluationPeriodsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct FailureThresholdDeserializer;
impl FailureThresholdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct FailureThresholdSerializer;
impl FailureThresholdSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &i64,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct FullyQualifiedDomainNameDeserializer;
impl FullyQualifiedDomainNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct FullyQualifiedDomainNameSerializer;
impl FullyQualifiedDomainNameSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GeoLocation {
pub continent_code: Option<String>,
pub country_code: Option<String>,
pub subdivision_code: Option<String>,
}
struct GeoLocationDeserializer;
impl GeoLocationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GeoLocation, XmlParseError> {
deserialize_elements::<_, GeoLocation, _>(tag_name, stack, |name, stack, obj| {
match name {
"ContinentCode" => {
obj.continent_code = Some(GeoLocationContinentCodeDeserializer::deserialize(
"ContinentCode",
stack,
)?);
}
"CountryCode" => {
obj.country_code = Some(GeoLocationCountryCodeDeserializer::deserialize(
"CountryCode",
stack,
)?);
}
"SubdivisionCode" => {
obj.subdivision_code =
Some(GeoLocationSubdivisionCodeDeserializer::deserialize(
"SubdivisionCode",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
pub struct GeoLocationSerializer;
impl GeoLocationSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &GeoLocation,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
if let Some(ref value) = obj.continent_code {
writer.write(xml::writer::XmlEvent::start_element("ContinentCode"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.country_code {
writer.write(xml::writer::XmlEvent::start_element("CountryCode"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.subdivision_code {
writer.write(xml::writer::XmlEvent::start_element("SubdivisionCode"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct GeoLocationContinentCodeDeserializer;
impl GeoLocationContinentCodeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct GeoLocationContinentCodeSerializer;
impl GeoLocationContinentCodeSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct GeoLocationContinentNameDeserializer;
impl GeoLocationContinentNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct GeoLocationCountryCodeDeserializer;
impl GeoLocationCountryCodeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct GeoLocationCountryCodeSerializer;
impl GeoLocationCountryCodeSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct GeoLocationCountryNameDeserializer;
impl GeoLocationCountryNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GeoLocationDetails {
pub continent_code: Option<String>,
pub continent_name: Option<String>,
pub country_code: Option<String>,
pub country_name: Option<String>,
pub subdivision_code: Option<String>,
pub subdivision_name: Option<String>,
}
struct GeoLocationDetailsDeserializer;
impl GeoLocationDetailsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GeoLocationDetails, XmlParseError> {
deserialize_elements::<_, GeoLocationDetails, _>(tag_name, stack, |name, stack, obj| {
match name {
"ContinentCode" => {
obj.continent_code = Some(GeoLocationContinentCodeDeserializer::deserialize(
"ContinentCode",
stack,
)?);
}
"ContinentName" => {
obj.continent_name = Some(GeoLocationContinentNameDeserializer::deserialize(
"ContinentName",
stack,
)?);
}
"CountryCode" => {
obj.country_code = Some(GeoLocationCountryCodeDeserializer::deserialize(
"CountryCode",
stack,
)?);
}
"CountryName" => {
obj.country_name = Some(GeoLocationCountryNameDeserializer::deserialize(
"CountryName",
stack,
)?);
}
"SubdivisionCode" => {
obj.subdivision_code =
Some(GeoLocationSubdivisionCodeDeserializer::deserialize(
"SubdivisionCode",
stack,
)?);
}
"SubdivisionName" => {
obj.subdivision_name =
Some(GeoLocationSubdivisionNameDeserializer::deserialize(
"SubdivisionName",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct GeoLocationDetailsListDeserializer;
impl GeoLocationDetailsListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<GeoLocationDetails>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "GeoLocationDetails" {
obj.push(GeoLocationDetailsDeserializer::deserialize(
"GeoLocationDetails",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct GeoLocationSubdivisionCodeDeserializer;
impl GeoLocationSubdivisionCodeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct GeoLocationSubdivisionCodeSerializer;
impl GeoLocationSubdivisionCodeSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct GeoLocationSubdivisionNameDeserializer;
impl GeoLocationSubdivisionNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetAccountLimitRequest {
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetAccountLimitResponse {
pub count: i64,
pub limit: AccountLimit,
}
struct GetAccountLimitResponseDeserializer;
impl GetAccountLimitResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetAccountLimitResponse, XmlParseError> {
deserialize_elements::<_, GetAccountLimitResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Count" => {
obj.count = UsageCountDeserializer::deserialize("Count", stack)?;
}
"Limit" => {
obj.limit = AccountLimitDeserializer::deserialize("Limit", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetChangeRequest {
pub id: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetChangeResponse {
pub change_info: ChangeInfo,
}
struct GetChangeResponseDeserializer;
impl GetChangeResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetChangeResponse, XmlParseError> {
deserialize_elements::<_, GetChangeResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"ChangeInfo" => {
obj.change_info = ChangeInfoDeserializer::deserialize("ChangeInfo", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetCheckerIpRangesRequest {}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetCheckerIpRangesResponse {
pub checker_ip_ranges: Vec<String>,
}
struct GetCheckerIpRangesResponseDeserializer;
impl GetCheckerIpRangesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetCheckerIpRangesResponse, XmlParseError> {
deserialize_elements::<_, GetCheckerIpRangesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"CheckerIpRanges" => {
obj.checker_ip_ranges
.extend(CheckerIpRangesDeserializer::deserialize(
"CheckerIpRanges",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetGeoLocationRequest {
pub continent_code: Option<String>,
pub country_code: Option<String>,
pub subdivision_code: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetGeoLocationResponse {
pub geo_location_details: GeoLocationDetails,
}
struct GetGeoLocationResponseDeserializer;
impl GetGeoLocationResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetGeoLocationResponse, XmlParseError> {
deserialize_elements::<_, GetGeoLocationResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"GeoLocationDetails" => {
obj.geo_location_details =
GeoLocationDetailsDeserializer::deserialize("GeoLocationDetails", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHealthCheckCountRequest {}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHealthCheckCountResponse {
pub health_check_count: i64,
}
struct GetHealthCheckCountResponseDeserializer;
impl GetHealthCheckCountResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetHealthCheckCountResponse, XmlParseError> {
deserialize_elements::<_, GetHealthCheckCountResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HealthCheckCount" => {
obj.health_check_count =
HealthCheckCountDeserializer::deserialize("HealthCheckCount", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHealthCheckLastFailureReasonRequest {
pub health_check_id: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHealthCheckLastFailureReasonResponse {
pub health_check_observations: Vec<HealthCheckObservation>,
}
struct GetHealthCheckLastFailureReasonResponseDeserializer;
impl GetHealthCheckLastFailureReasonResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetHealthCheckLastFailureReasonResponse, XmlParseError> {
deserialize_elements::<_, GetHealthCheckLastFailureReasonResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HealthCheckObservations" => {
obj.health_check_observations.extend(
HealthCheckObservationsDeserializer::deserialize(
"HealthCheckObservations",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHealthCheckRequest {
pub health_check_id: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHealthCheckResponse {
pub health_check: HealthCheck,
}
struct GetHealthCheckResponseDeserializer;
impl GetHealthCheckResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetHealthCheckResponse, XmlParseError> {
deserialize_elements::<_, GetHealthCheckResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"HealthCheck" => {
obj.health_check = HealthCheckDeserializer::deserialize("HealthCheck", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHealthCheckStatusRequest {
pub health_check_id: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHealthCheckStatusResponse {
pub health_check_observations: Vec<HealthCheckObservation>,
}
struct GetHealthCheckStatusResponseDeserializer;
impl GetHealthCheckStatusResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetHealthCheckStatusResponse, XmlParseError> {
deserialize_elements::<_, GetHealthCheckStatusResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HealthCheckObservations" => {
obj.health_check_observations.extend(
HealthCheckObservationsDeserializer::deserialize(
"HealthCheckObservations",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHostedZoneCountRequest {}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHostedZoneCountResponse {
pub hosted_zone_count: i64,
}
struct GetHostedZoneCountResponseDeserializer;
impl GetHostedZoneCountResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetHostedZoneCountResponse, XmlParseError> {
deserialize_elements::<_, GetHostedZoneCountResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HostedZoneCount" => {
obj.hosted_zone_count =
HostedZoneCountDeserializer::deserialize("HostedZoneCount", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHostedZoneLimitRequest {
pub hosted_zone_id: String,
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHostedZoneLimitResponse {
pub count: i64,
pub limit: HostedZoneLimit,
}
struct GetHostedZoneLimitResponseDeserializer;
impl GetHostedZoneLimitResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetHostedZoneLimitResponse, XmlParseError> {
deserialize_elements::<_, GetHostedZoneLimitResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Count" => {
obj.count = UsageCountDeserializer::deserialize("Count", stack)?;
}
"Limit" => {
obj.limit = HostedZoneLimitDeserializer::deserialize("Limit", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHostedZoneRequest {
pub id: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetHostedZoneResponse {
pub delegation_set: Option<DelegationSet>,
pub hosted_zone: HostedZone,
pub vp_cs: Option<Vec<VPC>>,
}
struct GetHostedZoneResponseDeserializer;
impl GetHostedZoneResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetHostedZoneResponse, XmlParseError> {
deserialize_elements::<_, GetHostedZoneResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"DelegationSet" => {
obj.delegation_set = Some(DelegationSetDeserializer::deserialize(
"DelegationSet",
stack,
)?);
}
"HostedZone" => {
obj.hosted_zone = HostedZoneDeserializer::deserialize("HostedZone", stack)?;
}
"VPCs" => {
obj.vp_cs
.get_or_insert(vec![])
.extend(VPCsDeserializer::deserialize("VPCs", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetQueryLoggingConfigRequest {
pub id: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetQueryLoggingConfigResponse {
pub query_logging_config: QueryLoggingConfig,
}
struct GetQueryLoggingConfigResponseDeserializer;
impl GetQueryLoggingConfigResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetQueryLoggingConfigResponse, XmlParseError> {
deserialize_elements::<_, GetQueryLoggingConfigResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"QueryLoggingConfig" => {
obj.query_logging_config = QueryLoggingConfigDeserializer::deserialize(
"QueryLoggingConfig",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetReusableDelegationSetLimitRequest {
pub delegation_set_id: String,
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetReusableDelegationSetLimitResponse {
pub count: i64,
pub limit: ReusableDelegationSetLimit,
}
struct GetReusableDelegationSetLimitResponseDeserializer;
impl GetReusableDelegationSetLimitResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetReusableDelegationSetLimitResponse, XmlParseError> {
deserialize_elements::<_, GetReusableDelegationSetLimitResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Count" => {
obj.count = UsageCountDeserializer::deserialize("Count", stack)?;
}
"Limit" => {
obj.limit =
ReusableDelegationSetLimitDeserializer::deserialize("Limit", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetReusableDelegationSetRequest {
pub id: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetReusableDelegationSetResponse {
pub delegation_set: DelegationSet,
}
struct GetReusableDelegationSetResponseDeserializer;
impl GetReusableDelegationSetResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetReusableDelegationSetResponse, XmlParseError> {
deserialize_elements::<_, GetReusableDelegationSetResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DelegationSet" => {
obj.delegation_set =
DelegationSetDeserializer::deserialize("DelegationSet", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetTrafficPolicyInstanceCountRequest {}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetTrafficPolicyInstanceCountResponse {
pub traffic_policy_instance_count: i64,
}
struct GetTrafficPolicyInstanceCountResponseDeserializer;
impl GetTrafficPolicyInstanceCountResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetTrafficPolicyInstanceCountResponse, XmlParseError> {
deserialize_elements::<_, GetTrafficPolicyInstanceCountResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"TrafficPolicyInstanceCount" => {
obj.traffic_policy_instance_count =
TrafficPolicyInstanceCountDeserializer::deserialize(
"TrafficPolicyInstanceCount",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetTrafficPolicyInstanceRequest {
pub id: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetTrafficPolicyInstanceResponse {
pub traffic_policy_instance: TrafficPolicyInstance,
}
struct GetTrafficPolicyInstanceResponseDeserializer;
impl GetTrafficPolicyInstanceResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetTrafficPolicyInstanceResponse, XmlParseError> {
deserialize_elements::<_, GetTrafficPolicyInstanceResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"TrafficPolicyInstance" => {
obj.traffic_policy_instance =
TrafficPolicyInstanceDeserializer::deserialize(
"TrafficPolicyInstance",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetTrafficPolicyRequest {
pub id: String,
pub version: i64,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct GetTrafficPolicyResponse {
pub traffic_policy: TrafficPolicy,
}
struct GetTrafficPolicyResponseDeserializer;
impl GetTrafficPolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<GetTrafficPolicyResponse, XmlParseError> {
deserialize_elements::<_, GetTrafficPolicyResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"TrafficPolicy" => {
obj.traffic_policy =
TrafficPolicyDeserializer::deserialize("TrafficPolicy", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct HealthCheck {
pub caller_reference: String,
pub cloud_watch_alarm_configuration: Option<CloudWatchAlarmConfiguration>,
pub health_check_config: HealthCheckConfig,
pub health_check_version: i64,
pub id: String,
pub linked_service: Option<LinkedService>,
}
struct HealthCheckDeserializer;
impl HealthCheckDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HealthCheck, XmlParseError> {
deserialize_elements::<_, HealthCheck, _>(tag_name, stack, |name, stack, obj| {
match name {
"CallerReference" => {
obj.caller_reference =
HealthCheckNonceDeserializer::deserialize("CallerReference", stack)?;
}
"CloudWatchAlarmConfiguration" => {
obj.cloud_watch_alarm_configuration =
Some(CloudWatchAlarmConfigurationDeserializer::deserialize(
"CloudWatchAlarmConfiguration",
stack,
)?);
}
"HealthCheckConfig" => {
obj.health_check_config =
HealthCheckConfigDeserializer::deserialize("HealthCheckConfig", stack)?;
}
"HealthCheckVersion" => {
obj.health_check_version =
HealthCheckVersionDeserializer::deserialize("HealthCheckVersion", stack)?;
}
"Id" => {
obj.id = HealthCheckIdDeserializer::deserialize("Id", stack)?;
}
"LinkedService" => {
obj.linked_service = Some(LinkedServiceDeserializer::deserialize(
"LinkedService",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct HealthCheckConfig {
pub alarm_identifier: Option<AlarmIdentifier>,
pub child_health_checks: Option<Vec<String>>,
pub disabled: Option<bool>,
pub enable_sni: Option<bool>,
pub failure_threshold: Option<i64>,
pub fully_qualified_domain_name: Option<String>,
pub health_threshold: Option<i64>,
pub ip_address: Option<String>,
pub insufficient_data_health_status: Option<String>,
pub inverted: Option<bool>,
pub measure_latency: Option<bool>,
pub port: Option<i64>,
pub regions: Option<Vec<String>>,
pub request_interval: Option<i64>,
pub resource_path: Option<String>,
pub search_string: Option<String>,
pub type_: String,
}
struct HealthCheckConfigDeserializer;
impl HealthCheckConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HealthCheckConfig, XmlParseError> {
deserialize_elements::<_, HealthCheckConfig, _>(tag_name, stack, |name, stack, obj| {
match name {
"AlarmIdentifier" => {
obj.alarm_identifier = Some(AlarmIdentifierDeserializer::deserialize(
"AlarmIdentifier",
stack,
)?);
}
"ChildHealthChecks" => {
obj.child_health_checks.get_or_insert(vec![]).extend(
ChildHealthCheckListDeserializer::deserialize("ChildHealthChecks", stack)?,
);
}
"Disabled" => {
obj.disabled = Some(DisabledDeserializer::deserialize("Disabled", stack)?);
}
"EnableSNI" => {
obj.enable_sni = Some(EnableSNIDeserializer::deserialize("EnableSNI", stack)?);
}
"FailureThreshold" => {
obj.failure_threshold = Some(FailureThresholdDeserializer::deserialize(
"FailureThreshold",
stack,
)?);
}
"FullyQualifiedDomainName" => {
obj.fully_qualified_domain_name =
Some(FullyQualifiedDomainNameDeserializer::deserialize(
"FullyQualifiedDomainName",
stack,
)?);
}
"HealthThreshold" => {
obj.health_threshold = Some(HealthThresholdDeserializer::deserialize(
"HealthThreshold",
stack,
)?);
}
"IPAddress" => {
obj.ip_address = Some(IPAddressDeserializer::deserialize("IPAddress", stack)?);
}
"InsufficientDataHealthStatus" => {
obj.insufficient_data_health_status =
Some(InsufficientDataHealthStatusDeserializer::deserialize(
"InsufficientDataHealthStatus",
stack,
)?);
}
"Inverted" => {
obj.inverted = Some(InvertedDeserializer::deserialize("Inverted", stack)?);
}
"MeasureLatency" => {
obj.measure_latency = Some(MeasureLatencyDeserializer::deserialize(
"MeasureLatency",
stack,
)?);
}
"Port" => {
obj.port = Some(PortDeserializer::deserialize("Port", stack)?);
}
"Regions" => {
obj.regions.get_or_insert(vec![]).extend(
HealthCheckRegionListDeserializer::deserialize("Regions", stack)?,
);
}
"RequestInterval" => {
obj.request_interval = Some(RequestIntervalDeserializer::deserialize(
"RequestInterval",
stack,
)?);
}
"ResourcePath" => {
obj.resource_path = Some(ResourcePathDeserializer::deserialize(
"ResourcePath",
stack,
)?);
}
"SearchString" => {
obj.search_string = Some(SearchStringDeserializer::deserialize(
"SearchString",
stack,
)?);
}
"Type" => {
obj.type_ = HealthCheckTypeDeserializer::deserialize("Type", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
pub struct HealthCheckConfigSerializer;
impl HealthCheckConfigSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &HealthCheckConfig,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
if let Some(ref value) = obj.alarm_identifier {
&AlarmIdentifierSerializer::serialize(&mut writer, "AlarmIdentifier", value)?;
}
if let Some(ref value) = obj.child_health_checks {
&ChildHealthCheckListSerializer::serialize(&mut writer, "ChildHealthChecks", value)?;
}
if let Some(ref value) = obj.disabled {
writer.write(xml::writer::XmlEvent::start_element("Disabled"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.enable_sni {
writer.write(xml::writer::XmlEvent::start_element("EnableSNI"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.failure_threshold {
writer.write(xml::writer::XmlEvent::start_element("FailureThreshold"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.fully_qualified_domain_name {
writer.write(xml::writer::XmlEvent::start_element(
"FullyQualifiedDomainName",
))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.health_threshold {
writer.write(xml::writer::XmlEvent::start_element("HealthThreshold"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.ip_address {
writer.write(xml::writer::XmlEvent::start_element("IPAddress"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.insufficient_data_health_status {
writer.write(xml::writer::XmlEvent::start_element(
"InsufficientDataHealthStatus",
))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.inverted {
writer.write(xml::writer::XmlEvent::start_element("Inverted"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.measure_latency {
writer.write(xml::writer::XmlEvent::start_element("MeasureLatency"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.port {
writer.write(xml::writer::XmlEvent::start_element("Port"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.regions {
&HealthCheckRegionListSerializer::serialize(&mut writer, "Regions", value)?;
}
if let Some(ref value) = obj.request_interval {
writer.write(xml::writer::XmlEvent::start_element("RequestInterval"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.resource_path {
writer.write(xml::writer::XmlEvent::start_element("ResourcePath"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.search_string {
writer.write(xml::writer::XmlEvent::start_element("SearchString"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
writer.write(xml::writer::XmlEvent::start_element("Type"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.type_
)))?;
writer.write(xml::writer::XmlEvent::end_element())?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct HealthCheckCountDeserializer;
impl HealthCheckCountDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct HealthCheckIdDeserializer;
impl HealthCheckIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct HealthCheckIdSerializer;
impl HealthCheckIdSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct HealthCheckNonceDeserializer;
impl HealthCheckNonceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct HealthCheckNonceSerializer;
impl HealthCheckNonceSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct HealthCheckObservation {
pub ip_address: Option<String>,
pub region: Option<String>,
pub status_report: Option<StatusReport>,
}
struct HealthCheckObservationDeserializer;
impl HealthCheckObservationDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HealthCheckObservation, XmlParseError> {
deserialize_elements::<_, HealthCheckObservation, _>(tag_name, stack, |name, stack, obj| {
match name {
"IPAddress" => {
obj.ip_address = Some(IPAddressDeserializer::deserialize("IPAddress", stack)?);
}
"Region" => {
obj.region = Some(HealthCheckRegionDeserializer::deserialize("Region", stack)?);
}
"StatusReport" => {
obj.status_report = Some(StatusReportDeserializer::deserialize(
"StatusReport",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct HealthCheckObservationsDeserializer;
impl HealthCheckObservationsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<HealthCheckObservation>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "HealthCheckObservation" {
obj.push(HealthCheckObservationDeserializer::deserialize(
"HealthCheckObservation",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct HealthCheckRegionDeserializer;
impl HealthCheckRegionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct HealthCheckRegionSerializer;
impl HealthCheckRegionSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct HealthCheckRegionListDeserializer;
impl HealthCheckRegionListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Region" {
obj.push(HealthCheckRegionDeserializer::deserialize("Region", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
pub struct HealthCheckRegionListSerializer;
impl HealthCheckRegionListSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &Vec<String>,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
for element in obj {
HealthCheckRegionSerializer::serialize(writer, "Region", element)?;
}
writer.write(xml::writer::XmlEvent::end_element())?;
Ok(())
}
}
struct HealthCheckTypeDeserializer;
impl HealthCheckTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct HealthCheckTypeSerializer;
impl HealthCheckTypeSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct HealthCheckVersionDeserializer;
impl HealthCheckVersionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct HealthCheckVersionSerializer;
impl HealthCheckVersionSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &i64,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct HealthChecksDeserializer;
impl HealthChecksDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<HealthCheck>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "HealthCheck" {
obj.push(HealthCheckDeserializer::deserialize("HealthCheck", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct HealthThresholdDeserializer;
impl HealthThresholdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct HealthThresholdSerializer;
impl HealthThresholdSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &i64,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct HostedZone {
pub caller_reference: String,
pub config: Option<HostedZoneConfig>,
pub id: String,
pub linked_service: Option<LinkedService>,
pub name: String,
pub resource_record_set_count: Option<i64>,
}
struct HostedZoneDeserializer;
impl HostedZoneDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HostedZone, XmlParseError> {
deserialize_elements::<_, HostedZone, _>(tag_name, stack, |name, stack, obj| {
match name {
"CallerReference" => {
obj.caller_reference =
NonceDeserializer::deserialize("CallerReference", stack)?;
}
"Config" => {
obj.config = Some(HostedZoneConfigDeserializer::deserialize("Config", stack)?);
}
"Id" => {
obj.id = ResourceIdDeserializer::deserialize("Id", stack)?;
}
"LinkedService" => {
obj.linked_service = Some(LinkedServiceDeserializer::deserialize(
"LinkedService",
stack,
)?);
}
"Name" => {
obj.name = DNSNameDeserializer::deserialize("Name", stack)?;
}
"ResourceRecordSetCount" => {
obj.resource_record_set_count =
Some(HostedZoneRRSetCountDeserializer::deserialize(
"ResourceRecordSetCount",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct HostedZoneConfig {
pub comment: Option<String>,
pub private_zone: Option<bool>,
}
struct HostedZoneConfigDeserializer;
impl HostedZoneConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HostedZoneConfig, XmlParseError> {
deserialize_elements::<_, HostedZoneConfig, _>(tag_name, stack, |name, stack, obj| {
match name {
"Comment" => {
obj.comment = Some(ResourceDescriptionDeserializer::deserialize(
"Comment", stack,
)?);
}
"PrivateZone" => {
obj.private_zone = Some(IsPrivateZoneDeserializer::deserialize(
"PrivateZone",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
pub struct HostedZoneConfigSerializer;
impl HostedZoneConfigSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &HostedZoneConfig,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
if let Some(ref value) = obj.comment {
writer.write(xml::writer::XmlEvent::start_element("Comment"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.private_zone {
writer.write(xml::writer::XmlEvent::start_element("PrivateZone"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct HostedZoneCountDeserializer;
impl HostedZoneCountDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct HostedZoneLimit {
pub type_: String,
pub value: i64,
}
struct HostedZoneLimitDeserializer;
impl HostedZoneLimitDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<HostedZoneLimit, XmlParseError> {
deserialize_elements::<_, HostedZoneLimit, _>(tag_name, stack, |name, stack, obj| {
match name {
"Type" => {
obj.type_ = HostedZoneLimitTypeDeserializer::deserialize("Type", stack)?;
}
"Value" => {
obj.value = LimitValueDeserializer::deserialize("Value", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct HostedZoneLimitTypeDeserializer;
impl HostedZoneLimitTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct HostedZoneLimitTypeSerializer;
impl HostedZoneLimitTypeSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct HostedZoneRRSetCountDeserializer;
impl HostedZoneRRSetCountDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct HostedZonesDeserializer;
impl HostedZonesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<HostedZone>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "HostedZone" {
obj.push(HostedZoneDeserializer::deserialize("HostedZone", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct IPAddressDeserializer;
impl IPAddressDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct IPAddressSerializer;
impl IPAddressSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct IPAddressCidrDeserializer;
impl IPAddressCidrDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct InsufficientDataHealthStatusDeserializer;
impl InsufficientDataHealthStatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct InsufficientDataHealthStatusSerializer;
impl InsufficientDataHealthStatusSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct InvertedDeserializer;
impl InvertedDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct InvertedSerializer;
impl InvertedSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &bool,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct IsPrivateZoneDeserializer;
impl IsPrivateZoneDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct IsPrivateZoneSerializer;
impl IsPrivateZoneSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &bool,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct LimitValueDeserializer;
impl LimitValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct LinkedService {
pub description: Option<String>,
pub service_principal: Option<String>,
}
struct LinkedServiceDeserializer;
impl LinkedServiceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<LinkedService, XmlParseError> {
deserialize_elements::<_, LinkedService, _>(tag_name, stack, |name, stack, obj| {
match name {
"Description" => {
obj.description = Some(ResourceDescriptionDeserializer::deserialize(
"Description",
stack,
)?);
}
"ServicePrincipal" => {
obj.service_principal = Some(ServicePrincipalDeserializer::deserialize(
"ServicePrincipal",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListGeoLocationsRequest {
pub max_items: Option<String>,
pub start_continent_code: Option<String>,
pub start_country_code: Option<String>,
pub start_subdivision_code: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListGeoLocationsResponse {
pub geo_location_details_list: Vec<GeoLocationDetails>,
pub is_truncated: bool,
pub max_items: String,
pub next_continent_code: Option<String>,
pub next_country_code: Option<String>,
pub next_subdivision_code: Option<String>,
}
struct ListGeoLocationsResponseDeserializer;
impl ListGeoLocationsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListGeoLocationsResponse, XmlParseError> {
deserialize_elements::<_, ListGeoLocationsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"GeoLocationDetailsList" => {
obj.geo_location_details_list.extend(
GeoLocationDetailsListDeserializer::deserialize(
"GeoLocationDetailsList",
stack,
)?,
);
}
"IsTruncated" => {
obj.is_truncated =
PageTruncatedDeserializer::deserialize("IsTruncated", stack)?;
}
"MaxItems" => {
obj.max_items = PageMaxItemsDeserializer::deserialize("MaxItems", stack)?;
}
"NextContinentCode" => {
obj.next_continent_code =
Some(GeoLocationContinentCodeDeserializer::deserialize(
"NextContinentCode",
stack,
)?);
}
"NextCountryCode" => {
obj.next_country_code =
Some(GeoLocationCountryCodeDeserializer::deserialize(
"NextCountryCode",
stack,
)?);
}
"NextSubdivisionCode" => {
obj.next_subdivision_code =
Some(GeoLocationSubdivisionCodeDeserializer::deserialize(
"NextSubdivisionCode",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListHealthChecksRequest {
pub marker: Option<String>,
pub max_items: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListHealthChecksResponse {
pub health_checks: Vec<HealthCheck>,
pub is_truncated: bool,
pub marker: String,
pub max_items: String,
pub next_marker: Option<String>,
}
struct ListHealthChecksResponseDeserializer;
impl ListHealthChecksResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListHealthChecksResponse, XmlParseError> {
deserialize_elements::<_, ListHealthChecksResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HealthChecks" => {
obj.health_checks
.extend(HealthChecksDeserializer::deserialize(
"HealthChecks",
stack,
)?);
}
"IsTruncated" => {
obj.is_truncated =
PageTruncatedDeserializer::deserialize("IsTruncated", stack)?;
}
"Marker" => {
obj.marker = PageMarkerDeserializer::deserialize("Marker", stack)?;
}
"MaxItems" => {
obj.max_items = PageMaxItemsDeserializer::deserialize("MaxItems", stack)?;
}
"NextMarker" => {
obj.next_marker =
Some(PageMarkerDeserializer::deserialize("NextMarker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListHostedZonesByNameRequest {
pub dns_name: Option<String>,
pub hosted_zone_id: Option<String>,
pub max_items: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListHostedZonesByNameResponse {
pub dns_name: Option<String>,
pub hosted_zone_id: Option<String>,
pub hosted_zones: Vec<HostedZone>,
pub is_truncated: bool,
pub max_items: String,
pub next_dns_name: Option<String>,
pub next_hosted_zone_id: Option<String>,
}
struct ListHostedZonesByNameResponseDeserializer;
impl ListHostedZonesByNameResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListHostedZonesByNameResponse, XmlParseError> {
deserialize_elements::<_, ListHostedZonesByNameResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DNSName" => {
obj.dns_name = Some(DNSNameDeserializer::deserialize("DNSName", stack)?);
}
"HostedZoneId" => {
obj.hosted_zone_id =
Some(ResourceIdDeserializer::deserialize("HostedZoneId", stack)?);
}
"HostedZones" => {
obj.hosted_zones
.extend(HostedZonesDeserializer::deserialize("HostedZones", stack)?);
}
"IsTruncated" => {
obj.is_truncated =
PageTruncatedDeserializer::deserialize("IsTruncated", stack)?;
}
"MaxItems" => {
obj.max_items = PageMaxItemsDeserializer::deserialize("MaxItems", stack)?;
}
"NextDNSName" => {
obj.next_dns_name =
Some(DNSNameDeserializer::deserialize("NextDNSName", stack)?);
}
"NextHostedZoneId" => {
obj.next_hosted_zone_id = Some(ResourceIdDeserializer::deserialize(
"NextHostedZoneId",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListHostedZonesRequest {
pub delegation_set_id: Option<String>,
pub marker: Option<String>,
pub max_items: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListHostedZonesResponse {
pub hosted_zones: Vec<HostedZone>,
pub is_truncated: bool,
pub marker: String,
pub max_items: String,
pub next_marker: Option<String>,
}
struct ListHostedZonesResponseDeserializer;
impl ListHostedZonesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListHostedZonesResponse, XmlParseError> {
deserialize_elements::<_, ListHostedZonesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HostedZones" => {
obj.hosted_zones
.extend(HostedZonesDeserializer::deserialize("HostedZones", stack)?);
}
"IsTruncated" => {
obj.is_truncated =
PageTruncatedDeserializer::deserialize("IsTruncated", stack)?;
}
"Marker" => {
obj.marker = PageMarkerDeserializer::deserialize("Marker", stack)?;
}
"MaxItems" => {
obj.max_items = PageMaxItemsDeserializer::deserialize("MaxItems", stack)?;
}
"NextMarker" => {
obj.next_marker =
Some(PageMarkerDeserializer::deserialize("NextMarker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListQueryLoggingConfigsRequest {
pub hosted_zone_id: Option<String>,
pub max_results: Option<String>,
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListQueryLoggingConfigsResponse {
pub next_token: Option<String>,
pub query_logging_configs: Vec<QueryLoggingConfig>,
}
struct ListQueryLoggingConfigsResponseDeserializer;
impl ListQueryLoggingConfigsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListQueryLoggingConfigsResponse, XmlParseError> {
deserialize_elements::<_, ListQueryLoggingConfigsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"NextToken" => {
obj.next_token = Some(PaginationTokenDeserializer::deserialize(
"NextToken",
stack,
)?);
}
"QueryLoggingConfigs" => {
obj.query_logging_configs.extend(
QueryLoggingConfigsDeserializer::deserialize(
"QueryLoggingConfigs",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListResourceRecordSetsRequest {
pub hosted_zone_id: String,
pub max_items: Option<String>,
pub start_record_identifier: Option<String>,
pub start_record_name: Option<String>,
pub start_record_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListResourceRecordSetsResponse {
pub is_truncated: bool,
pub max_items: String,
pub next_record_identifier: Option<String>,
pub next_record_name: Option<String>,
pub next_record_type: Option<String>,
pub resource_record_sets: Vec<ResourceRecordSet>,
}
struct ListResourceRecordSetsResponseDeserializer;
impl ListResourceRecordSetsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListResourceRecordSetsResponse, XmlParseError> {
deserialize_elements::<_, ListResourceRecordSetsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
PageTruncatedDeserializer::deserialize("IsTruncated", stack)?;
}
"MaxItems" => {
obj.max_items = PageMaxItemsDeserializer::deserialize("MaxItems", stack)?;
}
"NextRecordIdentifier" => {
obj.next_record_identifier =
Some(ResourceRecordSetIdentifierDeserializer::deserialize(
"NextRecordIdentifier",
stack,
)?);
}
"NextRecordName" => {
obj.next_record_name =
Some(DNSNameDeserializer::deserialize("NextRecordName", stack)?);
}
"NextRecordType" => {
obj.next_record_type =
Some(RRTypeDeserializer::deserialize("NextRecordType", stack)?);
}
"ResourceRecordSets" => {
obj.resource_record_sets.extend(
ResourceRecordSetsDeserializer::deserialize(
"ResourceRecordSets",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListReusableDelegationSetsRequest {
pub marker: Option<String>,
pub max_items: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListReusableDelegationSetsResponse {
pub delegation_sets: Vec<DelegationSet>,
pub is_truncated: bool,
pub marker: String,
pub max_items: String,
pub next_marker: Option<String>,
}
struct ListReusableDelegationSetsResponseDeserializer;
impl ListReusableDelegationSetsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListReusableDelegationSetsResponse, XmlParseError> {
deserialize_elements::<_, ListReusableDelegationSetsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"DelegationSets" => {
obj.delegation_sets
.extend(DelegationSetsDeserializer::deserialize(
"DelegationSets",
stack,
)?);
}
"IsTruncated" => {
obj.is_truncated =
PageTruncatedDeserializer::deserialize("IsTruncated", stack)?;
}
"Marker" => {
obj.marker = PageMarkerDeserializer::deserialize("Marker", stack)?;
}
"MaxItems" => {
obj.max_items = PageMaxItemsDeserializer::deserialize("MaxItems", stack)?;
}
"NextMarker" => {
obj.next_marker =
Some(PageMarkerDeserializer::deserialize("NextMarker", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTagsForResourceRequest {
pub resource_id: String,
pub resource_type: String,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTagsForResourceResponse {
pub resource_tag_set: ResourceTagSet,
}
struct ListTagsForResourceResponseDeserializer;
impl ListTagsForResourceResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListTagsForResourceResponse, XmlParseError> {
deserialize_elements::<_, ListTagsForResourceResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ResourceTagSet" => {
obj.resource_tag_set =
ResourceTagSetDeserializer::deserialize("ResourceTagSet", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTagsForResourcesRequest {
pub resource_ids: Vec<String>,
pub resource_type: String,
}
pub struct ListTagsForResourcesRequestSerializer;
impl ListTagsForResourcesRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &ListTagsForResourcesRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
TagResourceIdListSerializer::serialize(&mut writer, "ResourceIds", &obj.resource_ids)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTagsForResourcesResponse {
pub resource_tag_sets: Vec<ResourceTagSet>,
}
struct ListTagsForResourcesResponseDeserializer;
impl ListTagsForResourcesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListTagsForResourcesResponse, XmlParseError> {
deserialize_elements::<_, ListTagsForResourcesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"ResourceTagSets" => {
obj.resource_tag_sets
.extend(ResourceTagSetListDeserializer::deserialize(
"ResourceTagSets",
stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTrafficPoliciesRequest {
pub max_items: Option<String>,
pub traffic_policy_id_marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTrafficPoliciesResponse {
pub is_truncated: bool,
pub max_items: String,
pub traffic_policy_id_marker: String,
pub traffic_policy_summaries: Vec<TrafficPolicySummary>,
}
struct ListTrafficPoliciesResponseDeserializer;
impl ListTrafficPoliciesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListTrafficPoliciesResponse, XmlParseError> {
deserialize_elements::<_, ListTrafficPoliciesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
PageTruncatedDeserializer::deserialize("IsTruncated", stack)?;
}
"MaxItems" => {
obj.max_items = PageMaxItemsDeserializer::deserialize("MaxItems", stack)?;
}
"TrafficPolicyIdMarker" => {
obj.traffic_policy_id_marker = TrafficPolicyIdDeserializer::deserialize(
"TrafficPolicyIdMarker",
stack,
)?;
}
"TrafficPolicySummaries" => {
obj.traffic_policy_summaries.extend(
TrafficPolicySummariesDeserializer::deserialize(
"TrafficPolicySummaries",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTrafficPolicyInstancesByHostedZoneRequest {
pub hosted_zone_id: String,
pub max_items: Option<String>,
pub traffic_policy_instance_name_marker: Option<String>,
pub traffic_policy_instance_type_marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTrafficPolicyInstancesByHostedZoneResponse {
pub is_truncated: bool,
pub max_items: String,
pub traffic_policy_instance_name_marker: Option<String>,
pub traffic_policy_instance_type_marker: Option<String>,
pub traffic_policy_instances: Vec<TrafficPolicyInstance>,
}
struct ListTrafficPolicyInstancesByHostedZoneResponseDeserializer;
impl ListTrafficPolicyInstancesByHostedZoneResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListTrafficPolicyInstancesByHostedZoneResponse, XmlParseError> {
deserialize_elements::<_, ListTrafficPolicyInstancesByHostedZoneResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
PageTruncatedDeserializer::deserialize("IsTruncated", stack)?;
}
"MaxItems" => {
obj.max_items = PageMaxItemsDeserializer::deserialize("MaxItems", stack)?;
}
"TrafficPolicyInstanceNameMarker" => {
obj.traffic_policy_instance_name_marker =
Some(DNSNameDeserializer::deserialize(
"TrafficPolicyInstanceNameMarker",
stack,
)?);
}
"TrafficPolicyInstanceTypeMarker" => {
obj.traffic_policy_instance_type_marker =
Some(RRTypeDeserializer::deserialize(
"TrafficPolicyInstanceTypeMarker",
stack,
)?);
}
"TrafficPolicyInstances" => {
obj.traffic_policy_instances.extend(
TrafficPolicyInstancesDeserializer::deserialize(
"TrafficPolicyInstances",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTrafficPolicyInstancesByPolicyRequest {
pub hosted_zone_id_marker: Option<String>,
pub max_items: Option<String>,
pub traffic_policy_id: String,
pub traffic_policy_instance_name_marker: Option<String>,
pub traffic_policy_instance_type_marker: Option<String>,
pub traffic_policy_version: i64,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTrafficPolicyInstancesByPolicyResponse {
pub hosted_zone_id_marker: Option<String>,
pub is_truncated: bool,
pub max_items: String,
pub traffic_policy_instance_name_marker: Option<String>,
pub traffic_policy_instance_type_marker: Option<String>,
pub traffic_policy_instances: Vec<TrafficPolicyInstance>,
}
struct ListTrafficPolicyInstancesByPolicyResponseDeserializer;
impl ListTrafficPolicyInstancesByPolicyResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListTrafficPolicyInstancesByPolicyResponse, XmlParseError> {
deserialize_elements::<_, ListTrafficPolicyInstancesByPolicyResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HostedZoneIdMarker" => {
obj.hosted_zone_id_marker = Some(ResourceIdDeserializer::deserialize(
"HostedZoneIdMarker",
stack,
)?);
}
"IsTruncated" => {
obj.is_truncated =
PageTruncatedDeserializer::deserialize("IsTruncated", stack)?;
}
"MaxItems" => {
obj.max_items = PageMaxItemsDeserializer::deserialize("MaxItems", stack)?;
}
"TrafficPolicyInstanceNameMarker" => {
obj.traffic_policy_instance_name_marker =
Some(DNSNameDeserializer::deserialize(
"TrafficPolicyInstanceNameMarker",
stack,
)?);
}
"TrafficPolicyInstanceTypeMarker" => {
obj.traffic_policy_instance_type_marker =
Some(RRTypeDeserializer::deserialize(
"TrafficPolicyInstanceTypeMarker",
stack,
)?);
}
"TrafficPolicyInstances" => {
obj.traffic_policy_instances.extend(
TrafficPolicyInstancesDeserializer::deserialize(
"TrafficPolicyInstances",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTrafficPolicyInstancesRequest {
pub hosted_zone_id_marker: Option<String>,
pub max_items: Option<String>,
pub traffic_policy_instance_name_marker: Option<String>,
pub traffic_policy_instance_type_marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTrafficPolicyInstancesResponse {
pub hosted_zone_id_marker: Option<String>,
pub is_truncated: bool,
pub max_items: String,
pub traffic_policy_instance_name_marker: Option<String>,
pub traffic_policy_instance_type_marker: Option<String>,
pub traffic_policy_instances: Vec<TrafficPolicyInstance>,
}
struct ListTrafficPolicyInstancesResponseDeserializer;
impl ListTrafficPolicyInstancesResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListTrafficPolicyInstancesResponse, XmlParseError> {
deserialize_elements::<_, ListTrafficPolicyInstancesResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HostedZoneIdMarker" => {
obj.hosted_zone_id_marker = Some(ResourceIdDeserializer::deserialize(
"HostedZoneIdMarker",
stack,
)?);
}
"IsTruncated" => {
obj.is_truncated =
PageTruncatedDeserializer::deserialize("IsTruncated", stack)?;
}
"MaxItems" => {
obj.max_items = PageMaxItemsDeserializer::deserialize("MaxItems", stack)?;
}
"TrafficPolicyInstanceNameMarker" => {
obj.traffic_policy_instance_name_marker =
Some(DNSNameDeserializer::deserialize(
"TrafficPolicyInstanceNameMarker",
stack,
)?);
}
"TrafficPolicyInstanceTypeMarker" => {
obj.traffic_policy_instance_type_marker =
Some(RRTypeDeserializer::deserialize(
"TrafficPolicyInstanceTypeMarker",
stack,
)?);
}
"TrafficPolicyInstances" => {
obj.traffic_policy_instances.extend(
TrafficPolicyInstancesDeserializer::deserialize(
"TrafficPolicyInstances",
stack,
)?,
);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTrafficPolicyVersionsRequest {
pub id: String,
pub max_items: Option<String>,
pub traffic_policy_version_marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListTrafficPolicyVersionsResponse {
pub is_truncated: bool,
pub max_items: String,
pub traffic_policies: Vec<TrafficPolicy>,
pub traffic_policy_version_marker: String,
}
struct ListTrafficPolicyVersionsResponseDeserializer;
impl ListTrafficPolicyVersionsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListTrafficPolicyVersionsResponse, XmlParseError> {
deserialize_elements::<_, ListTrafficPolicyVersionsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"IsTruncated" => {
obj.is_truncated =
PageTruncatedDeserializer::deserialize("IsTruncated", stack)?;
}
"MaxItems" => {
obj.max_items = PageMaxItemsDeserializer::deserialize("MaxItems", stack)?;
}
"TrafficPolicies" => {
obj.traffic_policies
.extend(TrafficPoliciesDeserializer::deserialize(
"TrafficPolicies",
stack,
)?);
}
"TrafficPolicyVersionMarker" => {
obj.traffic_policy_version_marker =
TrafficPolicyVersionMarkerDeserializer::deserialize(
"TrafficPolicyVersionMarker",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListVPCAssociationAuthorizationsRequest {
pub hosted_zone_id: String,
pub max_results: Option<String>,
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ListVPCAssociationAuthorizationsResponse {
pub hosted_zone_id: String,
pub next_token: Option<String>,
pub vp_cs: Vec<VPC>,
}
struct ListVPCAssociationAuthorizationsResponseDeserializer;
impl ListVPCAssociationAuthorizationsResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ListVPCAssociationAuthorizationsResponse, XmlParseError> {
deserialize_elements::<_, ListVPCAssociationAuthorizationsResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HostedZoneId" => {
obj.hosted_zone_id =
ResourceIdDeserializer::deserialize("HostedZoneId", stack)?;
}
"NextToken" => {
obj.next_token = Some(PaginationTokenDeserializer::deserialize(
"NextToken",
stack,
)?);
}
"VPCs" => {
obj.vp_cs
.extend(VPCsDeserializer::deserialize("VPCs", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
pub struct MaxResultsSerializer;
impl MaxResultsSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct MeasureLatencyDeserializer;
impl MeasureLatencyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct MeasureLatencySerializer;
impl MeasureLatencySerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &bool,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct MessageDeserializer;
impl MessageDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct MetricNameDeserializer;
impl MetricNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct NameserverDeserializer;
impl NameserverDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct NamespaceDeserializer;
impl NamespaceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct NonceDeserializer;
impl NonceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct NonceSerializer;
impl NonceSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct PageMarkerDeserializer;
impl PageMarkerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct PageMarkerSerializer;
impl PageMarkerSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct PageMaxItemsDeserializer;
impl PageMaxItemsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct PageMaxItemsSerializer;
impl PageMaxItemsSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct PageTruncatedDeserializer;
impl PageTruncatedDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct PaginationTokenDeserializer;
impl PaginationTokenDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct PaginationTokenSerializer;
impl PaginationTokenSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct PeriodDeserializer;
impl PeriodDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct PortDeserializer;
impl PortDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct PortSerializer;
impl PortSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &i64,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct QueryLoggingConfig {
pub cloud_watch_logs_log_group_arn: String,
pub hosted_zone_id: String,
pub id: String,
}
struct QueryLoggingConfigDeserializer;
impl QueryLoggingConfigDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<QueryLoggingConfig, XmlParseError> {
deserialize_elements::<_, QueryLoggingConfig, _>(tag_name, stack, |name, stack, obj| {
match name {
"CloudWatchLogsLogGroupArn" => {
obj.cloud_watch_logs_log_group_arn =
CloudWatchLogsLogGroupArnDeserializer::deserialize(
"CloudWatchLogsLogGroupArn",
stack,
)?;
}
"HostedZoneId" => {
obj.hosted_zone_id =
ResourceIdDeserializer::deserialize("HostedZoneId", stack)?;
}
"Id" => {
obj.id = QueryLoggingConfigIdDeserializer::deserialize("Id", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct QueryLoggingConfigIdDeserializer;
impl QueryLoggingConfigIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct QueryLoggingConfigIdSerializer;
impl QueryLoggingConfigIdSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct QueryLoggingConfigsDeserializer;
impl QueryLoggingConfigsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<QueryLoggingConfig>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "QueryLoggingConfig" {
obj.push(QueryLoggingConfigDeserializer::deserialize(
"QueryLoggingConfig",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct RDataDeserializer;
impl RDataDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct RDataSerializer;
impl RDataSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct RRTypeDeserializer;
impl RRTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct RRTypeSerializer;
impl RRTypeSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct RecordDataDeserializer;
impl RecordDataDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<String>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "RecordDataEntry" {
obj.push(RecordDataEntryDeserializer::deserialize(
"RecordDataEntry",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct RecordDataEntryDeserializer;
impl RecordDataEntryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct RequestIntervalDeserializer;
impl RequestIntervalDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct RequestIntervalSerializer;
impl RequestIntervalSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &i64,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
pub struct ResettableElementNameSerializer;
impl ResettableElementNameSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
pub struct ResettableElementNameListSerializer;
impl ResettableElementNameListSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &Vec<String>,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
for element in obj {
ResettableElementNameSerializer::serialize(writer, "ResettableElementName", element)?;
}
writer.write(xml::writer::XmlEvent::end_element())?;
Ok(())
}
}
struct ResourceDescriptionDeserializer;
impl ResourceDescriptionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct ResourceDescriptionSerializer;
impl ResourceDescriptionSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct ResourceIdDeserializer;
impl ResourceIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct ResourceIdSerializer;
impl ResourceIdSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct ResourcePathDeserializer;
impl ResourcePathDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct ResourcePathSerializer;
impl ResourcePathSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResourceRecord {
pub value: String,
}
struct ResourceRecordDeserializer;
impl ResourceRecordDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourceRecord, XmlParseError> {
deserialize_elements::<_, ResourceRecord, _>(tag_name, stack, |name, stack, obj| {
match name {
"Value" => {
obj.value = RDataDeserializer::deserialize("Value", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
pub struct ResourceRecordSerializer;
impl ResourceRecordSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &ResourceRecord,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::start_element("Value"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.value
)))?;
writer.write(xml::writer::XmlEvent::end_element())?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResourceRecordSet {
pub alias_target: Option<AliasTarget>,
pub failover: Option<String>,
pub geo_location: Option<GeoLocation>,
pub health_check_id: Option<String>,
pub multi_value_answer: Option<bool>,
pub name: String,
pub region: Option<String>,
pub resource_records: Option<Vec<ResourceRecord>>,
pub set_identifier: Option<String>,
pub ttl: Option<i64>,
pub traffic_policy_instance_id: Option<String>,
pub type_: String,
pub weight: Option<i64>,
}
struct ResourceRecordSetDeserializer;
impl ResourceRecordSetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourceRecordSet, XmlParseError> {
deserialize_elements::<_, ResourceRecordSet, _>(tag_name, stack, |name, stack, obj| {
match name {
"AliasTarget" => {
obj.alias_target =
Some(AliasTargetDeserializer::deserialize("AliasTarget", stack)?);
}
"Failover" => {
obj.failover = Some(ResourceRecordSetFailoverDeserializer::deserialize(
"Failover", stack,
)?);
}
"GeoLocation" => {
obj.geo_location =
Some(GeoLocationDeserializer::deserialize("GeoLocation", stack)?);
}
"HealthCheckId" => {
obj.health_check_id = Some(HealthCheckIdDeserializer::deserialize(
"HealthCheckId",
stack,
)?);
}
"MultiValueAnswer" => {
obj.multi_value_answer =
Some(ResourceRecordSetMultiValueAnswerDeserializer::deserialize(
"MultiValueAnswer",
stack,
)?);
}
"Name" => {
obj.name = DNSNameDeserializer::deserialize("Name", stack)?;
}
"Region" => {
obj.region = Some(ResourceRecordSetRegionDeserializer::deserialize(
"Region", stack,
)?);
}
"ResourceRecords" => {
obj.resource_records.get_or_insert(vec![]).extend(
ResourceRecordsDeserializer::deserialize("ResourceRecords", stack)?,
);
}
"SetIdentifier" => {
obj.set_identifier =
Some(ResourceRecordSetIdentifierDeserializer::deserialize(
"SetIdentifier",
stack,
)?);
}
"TTL" => {
obj.ttl = Some(TTLDeserializer::deserialize("TTL", stack)?);
}
"TrafficPolicyInstanceId" => {
obj.traffic_policy_instance_id =
Some(TrafficPolicyInstanceIdDeserializer::deserialize(
"TrafficPolicyInstanceId",
stack,
)?);
}
"Type" => {
obj.type_ = RRTypeDeserializer::deserialize("Type", stack)?;
}
"Weight" => {
obj.weight = Some(ResourceRecordSetWeightDeserializer::deserialize(
"Weight", stack,
)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
pub struct ResourceRecordSetSerializer;
impl ResourceRecordSetSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &ResourceRecordSet,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
if let Some(ref value) = obj.alias_target {
&AliasTargetSerializer::serialize(&mut writer, "AliasTarget", value)?;
}
if let Some(ref value) = obj.failover {
writer.write(xml::writer::XmlEvent::start_element("Failover"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.geo_location {
&GeoLocationSerializer::serialize(&mut writer, "GeoLocation", value)?;
}
if let Some(ref value) = obj.health_check_id {
writer.write(xml::writer::XmlEvent::start_element("HealthCheckId"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.multi_value_answer {
writer.write(xml::writer::XmlEvent::start_element("MultiValueAnswer"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
writer.write(xml::writer::XmlEvent::start_element("Name"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.name
)))?;
writer.write(xml::writer::XmlEvent::end_element())?;
if let Some(ref value) = obj.region {
writer.write(xml::writer::XmlEvent::start_element("Region"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.resource_records {
&ResourceRecordsSerializer::serialize(&mut writer, "ResourceRecords", value)?;
}
if let Some(ref value) = obj.set_identifier {
writer.write(xml::writer::XmlEvent::start_element("SetIdentifier"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.ttl {
writer.write(xml::writer::XmlEvent::start_element("TTL"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.traffic_policy_instance_id {
writer.write(xml::writer::XmlEvent::start_element(
"TrafficPolicyInstanceId",
))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
writer.write(xml::writer::XmlEvent::start_element("Type"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.type_
)))?;
writer.write(xml::writer::XmlEvent::end_element())?;
if let Some(ref value) = obj.weight {
writer.write(xml::writer::XmlEvent::start_element("Weight"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct ResourceRecordSetFailoverDeserializer;
impl ResourceRecordSetFailoverDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct ResourceRecordSetFailoverSerializer;
impl ResourceRecordSetFailoverSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct ResourceRecordSetIdentifierDeserializer;
impl ResourceRecordSetIdentifierDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct ResourceRecordSetIdentifierSerializer;
impl ResourceRecordSetIdentifierSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct ResourceRecordSetMultiValueAnswerDeserializer;
impl ResourceRecordSetMultiValueAnswerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<bool, XmlParseError> {
start_element(tag_name, stack)?;
let obj = bool::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct ResourceRecordSetMultiValueAnswerSerializer;
impl ResourceRecordSetMultiValueAnswerSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &bool,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct ResourceRecordSetRegionDeserializer;
impl ResourceRecordSetRegionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct ResourceRecordSetRegionSerializer;
impl ResourceRecordSetRegionSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct ResourceRecordSetWeightDeserializer;
impl ResourceRecordSetWeightDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct ResourceRecordSetWeightSerializer;
impl ResourceRecordSetWeightSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &i64,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct ResourceRecordSetsDeserializer;
impl ResourceRecordSetsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ResourceRecordSet>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ResourceRecordSet" {
obj.push(ResourceRecordSetDeserializer::deserialize(
"ResourceRecordSet",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct ResourceRecordsDeserializer;
impl ResourceRecordsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ResourceRecord>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ResourceRecord" {
obj.push(ResourceRecordDeserializer::deserialize(
"ResourceRecord",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
pub struct ResourceRecordsSerializer;
impl ResourceRecordsSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &Vec<ResourceRecord>,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
for element in obj {
ResourceRecordSerializer::serialize(writer, "ResourceRecord", element)?;
}
writer.write(xml::writer::XmlEvent::end_element())?;
Ok(())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ResourceTagSet {
pub resource_id: Option<String>,
pub resource_type: Option<String>,
pub tags: Option<Vec<Tag>>,
}
struct ResourceTagSetDeserializer;
impl ResourceTagSetDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ResourceTagSet, XmlParseError> {
deserialize_elements::<_, ResourceTagSet, _>(tag_name, stack, |name, stack, obj| {
match name {
"ResourceId" => {
obj.resource_id =
Some(TagResourceIdDeserializer::deserialize("ResourceId", stack)?);
}
"ResourceType" => {
obj.resource_type = Some(TagResourceTypeDeserializer::deserialize(
"ResourceType",
stack,
)?);
}
"Tags" => {
obj.tags
.get_or_insert(vec![])
.extend(TagListDeserializer::deserialize("Tags", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ResourceTagSetListDeserializer;
impl ResourceTagSetListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<ResourceTagSet>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "ResourceTagSet" {
obj.push(ResourceTagSetDeserializer::deserialize(
"ResourceTagSet",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ReusableDelegationSetLimit {
pub type_: String,
pub value: i64,
}
struct ReusableDelegationSetLimitDeserializer;
impl ReusableDelegationSetLimitDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<ReusableDelegationSetLimit, XmlParseError> {
deserialize_elements::<_, ReusableDelegationSetLimit, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"Type" => {
obj.type_ =
ReusableDelegationSetLimitTypeDeserializer::deserialize("Type", stack)?;
}
"Value" => {
obj.value = LimitValueDeserializer::deserialize("Value", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct ReusableDelegationSetLimitTypeDeserializer;
impl ReusableDelegationSetLimitTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct ReusableDelegationSetLimitTypeSerializer;
impl ReusableDelegationSetLimitTypeSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct SearchStringDeserializer;
impl SearchStringDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct SearchStringSerializer;
impl SearchStringSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct ServicePrincipalDeserializer;
impl ServicePrincipalDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct StatisticDeserializer;
impl StatisticDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct StatusDeserializer;
impl StatusDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StatusReport {
pub checked_time: Option<String>,
pub status: Option<String>,
}
struct StatusReportDeserializer;
impl StatusReportDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<StatusReport, XmlParseError> {
deserialize_elements::<_, StatusReport, _>(tag_name, stack, |name, stack, obj| {
match name {
"CheckedTime" => {
obj.checked_time =
Some(TimeStampDeserializer::deserialize("CheckedTime", stack)?);
}
"Status" => {
obj.status = Some(StatusDeserializer::deserialize("Status", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
pub struct SubnetMaskSerializer;
impl SubnetMaskSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct TTLDeserializer;
impl TTLDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct TTLSerializer;
impl TTLSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &i64,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct Tag {
pub key: Option<String>,
pub value: Option<String>,
}
struct TagDeserializer;
impl TagDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<Tag, XmlParseError> {
deserialize_elements::<_, Tag, _>(tag_name, stack, |name, stack, obj| {
match name {
"Key" => {
obj.key = Some(TagKeyDeserializer::deserialize("Key", stack)?);
}
"Value" => {
obj.value = Some(TagValueDeserializer::deserialize("Value", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
pub struct TagSerializer;
impl TagSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &Tag,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
if let Some(ref value) = obj.key {
writer.write(xml::writer::XmlEvent::start_element("Key"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.value {
writer.write(xml::writer::XmlEvent::start_element("Value"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct TagKeyDeserializer;
impl TagKeyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct TagKeySerializer;
impl TagKeySerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
pub struct TagKeyListSerializer;
impl TagKeyListSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &Vec<String>,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
for element in obj {
TagKeySerializer::serialize(writer, "Key", element)?;
}
writer.write(xml::writer::XmlEvent::end_element())?;
Ok(())
}
}
struct TagListDeserializer;
impl TagListDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<Tag>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "Tag" {
obj.push(TagDeserializer::deserialize("Tag", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
pub struct TagListSerializer;
impl TagListSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &Vec<Tag>,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
for element in obj {
TagSerializer::serialize(writer, "Tag", element)?;
}
writer.write(xml::writer::XmlEvent::end_element())?;
Ok(())
}
}
struct TagResourceIdDeserializer;
impl TagResourceIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct TagResourceIdSerializer;
impl TagResourceIdSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
pub struct TagResourceIdListSerializer;
impl TagResourceIdListSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &Vec<String>,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
for element in obj {
TagResourceIdSerializer::serialize(writer, "ResourceId", element)?;
}
writer.write(xml::writer::XmlEvent::end_element())?;
Ok(())
}
}
struct TagResourceTypeDeserializer;
impl TagResourceTypeDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct TagResourceTypeSerializer;
impl TagResourceTypeSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct TagValueDeserializer;
impl TagValueDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct TagValueSerializer;
impl TagValueSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TestDNSAnswerRequest {
pub edns0_client_subnet_ip: Option<String>,
pub edns0_client_subnet_mask: Option<String>,
pub hosted_zone_id: String,
pub record_name: String,
pub record_type: String,
pub resolver_ip: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TestDNSAnswerResponse {
pub nameserver: String,
pub protocol: String,
pub record_data: Vec<String>,
pub record_name: String,
pub record_type: String,
pub response_code: String,
}
struct TestDNSAnswerResponseDeserializer;
impl TestDNSAnswerResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TestDNSAnswerResponse, XmlParseError> {
deserialize_elements::<_, TestDNSAnswerResponse, _>(tag_name, stack, |name, stack, obj| {
match name {
"Nameserver" => {
obj.nameserver = NameserverDeserializer::deserialize("Nameserver", stack)?;
}
"Protocol" => {
obj.protocol = TransportProtocolDeserializer::deserialize("Protocol", stack)?;
}
"RecordData" => {
obj.record_data
.extend(RecordDataDeserializer::deserialize("RecordData", stack)?);
}
"RecordName" => {
obj.record_name = DNSNameDeserializer::deserialize("RecordName", stack)?;
}
"RecordType" => {
obj.record_type = RRTypeDeserializer::deserialize("RecordType", stack)?;
}
"ResponseCode" => {
obj.response_code = DNSRCodeDeserializer::deserialize("ResponseCode", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct ThresholdDeserializer;
impl ThresholdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<f64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = f64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct TimeStampDeserializer;
impl TimeStampDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct TrafficPoliciesDeserializer;
impl TrafficPoliciesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<TrafficPolicy>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "TrafficPolicy" {
obj.push(TrafficPolicyDeserializer::deserialize(
"TrafficPolicy",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TrafficPolicy {
pub comment: Option<String>,
pub document: String,
pub id: String,
pub name: String,
pub type_: String,
pub version: i64,
}
struct TrafficPolicyDeserializer;
impl TrafficPolicyDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TrafficPolicy, XmlParseError> {
deserialize_elements::<_, TrafficPolicy, _>(tag_name, stack, |name, stack, obj| {
match name {
"Comment" => {
obj.comment = Some(TrafficPolicyCommentDeserializer::deserialize(
"Comment", stack,
)?);
}
"Document" => {
obj.document =
TrafficPolicyDocumentDeserializer::deserialize("Document", stack)?;
}
"Id" => {
obj.id = TrafficPolicyIdDeserializer::deserialize("Id", stack)?;
}
"Name" => {
obj.name = TrafficPolicyNameDeserializer::deserialize("Name", stack)?;
}
"Type" => {
obj.type_ = RRTypeDeserializer::deserialize("Type", stack)?;
}
"Version" => {
obj.version = TrafficPolicyVersionDeserializer::deserialize("Version", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TrafficPolicyCommentDeserializer;
impl TrafficPolicyCommentDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct TrafficPolicyCommentSerializer;
impl TrafficPolicyCommentSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct TrafficPolicyDocumentDeserializer;
impl TrafficPolicyDocumentDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct TrafficPolicyDocumentSerializer;
impl TrafficPolicyDocumentSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct TrafficPolicyIdDeserializer;
impl TrafficPolicyIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct TrafficPolicyIdSerializer;
impl TrafficPolicyIdSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TrafficPolicyInstance {
pub hosted_zone_id: String,
pub id: String,
pub message: String,
pub name: String,
pub state: String,
pub ttl: i64,
pub traffic_policy_id: String,
pub traffic_policy_type: String,
pub traffic_policy_version: i64,
}
struct TrafficPolicyInstanceDeserializer;
impl TrafficPolicyInstanceDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TrafficPolicyInstance, XmlParseError> {
deserialize_elements::<_, TrafficPolicyInstance, _>(tag_name, stack, |name, stack, obj| {
match name {
"HostedZoneId" => {
obj.hosted_zone_id =
ResourceIdDeserializer::deserialize("HostedZoneId", stack)?;
}
"Id" => {
obj.id = TrafficPolicyInstanceIdDeserializer::deserialize("Id", stack)?;
}
"Message" => {
obj.message = MessageDeserializer::deserialize("Message", stack)?;
}
"Name" => {
obj.name = DNSNameDeserializer::deserialize("Name", stack)?;
}
"State" => {
obj.state =
TrafficPolicyInstanceStateDeserializer::deserialize("State", stack)?;
}
"TTL" => {
obj.ttl = TTLDeserializer::deserialize("TTL", stack)?;
}
"TrafficPolicyId" => {
obj.traffic_policy_id =
TrafficPolicyIdDeserializer::deserialize("TrafficPolicyId", stack)?;
}
"TrafficPolicyType" => {
obj.traffic_policy_type =
RRTypeDeserializer::deserialize("TrafficPolicyType", stack)?;
}
"TrafficPolicyVersion" => {
obj.traffic_policy_version = TrafficPolicyVersionDeserializer::deserialize(
"TrafficPolicyVersion",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TrafficPolicyInstanceCountDeserializer;
impl TrafficPolicyInstanceCountDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct TrafficPolicyInstanceIdDeserializer;
impl TrafficPolicyInstanceIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct TrafficPolicyInstanceIdSerializer;
impl TrafficPolicyInstanceIdSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct TrafficPolicyInstanceStateDeserializer;
impl TrafficPolicyInstanceStateDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
struct TrafficPolicyInstancesDeserializer;
impl TrafficPolicyInstancesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<TrafficPolicyInstance>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "TrafficPolicyInstance" {
obj.push(TrafficPolicyInstanceDeserializer::deserialize(
"TrafficPolicyInstance",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
struct TrafficPolicyNameDeserializer;
impl TrafficPolicyNameDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct TrafficPolicyNameSerializer;
impl TrafficPolicyNameSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct TrafficPolicySummariesDeserializer;
impl TrafficPolicySummariesDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<TrafficPolicySummary>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "TrafficPolicySummary" {
obj.push(TrafficPolicySummaryDeserializer::deserialize(
"TrafficPolicySummary",
stack,
)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct TrafficPolicySummary {
pub id: String,
pub latest_version: i64,
pub name: String,
pub traffic_policy_count: i64,
pub type_: String,
}
struct TrafficPolicySummaryDeserializer;
impl TrafficPolicySummaryDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<TrafficPolicySummary, XmlParseError> {
deserialize_elements::<_, TrafficPolicySummary, _>(tag_name, stack, |name, stack, obj| {
match name {
"Id" => {
obj.id = TrafficPolicyIdDeserializer::deserialize("Id", stack)?;
}
"LatestVersion" => {
obj.latest_version =
TrafficPolicyVersionDeserializer::deserialize("LatestVersion", stack)?;
}
"Name" => {
obj.name = TrafficPolicyNameDeserializer::deserialize("Name", stack)?;
}
"TrafficPolicyCount" => {
obj.traffic_policy_count =
TrafficPolicyVersionDeserializer::deserialize("TrafficPolicyCount", stack)?;
}
"Type" => {
obj.type_ = RRTypeDeserializer::deserialize("Type", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
struct TrafficPolicyVersionDeserializer;
impl TrafficPolicyVersionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct TrafficPolicyVersionSerializer;
impl TrafficPolicyVersionSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &i64,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct TrafficPolicyVersionMarkerDeserializer;
impl TrafficPolicyVersionMarkerDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct TrafficPolicyVersionMarkerSerializer;
impl TrafficPolicyVersionMarkerSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct TransportProtocolDeserializer;
impl TransportProtocolDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateHealthCheckRequest {
pub alarm_identifier: Option<AlarmIdentifier>,
pub child_health_checks: Option<Vec<String>>,
pub disabled: Option<bool>,
pub enable_sni: Option<bool>,
pub failure_threshold: Option<i64>,
pub fully_qualified_domain_name: Option<String>,
pub health_check_id: String,
pub health_check_version: Option<i64>,
pub health_threshold: Option<i64>,
pub ip_address: Option<String>,
pub insufficient_data_health_status: Option<String>,
pub inverted: Option<bool>,
pub port: Option<i64>,
pub regions: Option<Vec<String>>,
pub reset_elements: Option<Vec<String>>,
pub resource_path: Option<String>,
pub search_string: Option<String>,
}
pub struct UpdateHealthCheckRequestSerializer;
impl UpdateHealthCheckRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &UpdateHealthCheckRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
if let Some(ref value) = obj.alarm_identifier {
&AlarmIdentifierSerializer::serialize(&mut writer, "AlarmIdentifier", value)?;
}
if let Some(ref value) = obj.child_health_checks {
&ChildHealthCheckListSerializer::serialize(&mut writer, "ChildHealthChecks", value)?;
}
if let Some(ref value) = obj.disabled {
&DisabledSerializer::serialize(&mut writer, "Disabled", value)?;
}
if let Some(ref value) = obj.enable_sni {
&EnableSNISerializer::serialize(&mut writer, "EnableSNI", value)?;
}
if let Some(ref value) = obj.failure_threshold {
&FailureThresholdSerializer::serialize(&mut writer, "FailureThreshold", value)?;
}
if let Some(ref value) = obj.fully_qualified_domain_name {
&FullyQualifiedDomainNameSerializer::serialize(
&mut writer,
"FullyQualifiedDomainName",
value,
)?;
}
if let Some(ref value) = obj.health_check_version {
&HealthCheckVersionSerializer::serialize(&mut writer, "HealthCheckVersion", value)?;
}
if let Some(ref value) = obj.health_threshold {
&HealthThresholdSerializer::serialize(&mut writer, "HealthThreshold", value)?;
}
if let Some(ref value) = obj.ip_address {
&IPAddressSerializer::serialize(&mut writer, "IPAddress", value)?;
}
if let Some(ref value) = obj.insufficient_data_health_status {
&InsufficientDataHealthStatusSerializer::serialize(
&mut writer,
"InsufficientDataHealthStatus",
value,
)?;
}
if let Some(ref value) = obj.inverted {
&InvertedSerializer::serialize(&mut writer, "Inverted", value)?;
}
if let Some(ref value) = obj.port {
&PortSerializer::serialize(&mut writer, "Port", value)?;
}
if let Some(ref value) = obj.regions {
&HealthCheckRegionListSerializer::serialize(&mut writer, "Regions", value)?;
}
if let Some(ref value) = obj.reset_elements {
&ResettableElementNameListSerializer::serialize(&mut writer, "ResetElements", value)?;
}
if let Some(ref value) = obj.resource_path {
&ResourcePathSerializer::serialize(&mut writer, "ResourcePath", value)?;
}
if let Some(ref value) = obj.search_string {
&SearchStringSerializer::serialize(&mut writer, "SearchString", value)?;
}
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateHealthCheckResponse {
pub health_check: HealthCheck,
}
struct UpdateHealthCheckResponseDeserializer;
impl UpdateHealthCheckResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateHealthCheckResponse, XmlParseError> {
deserialize_elements::<_, UpdateHealthCheckResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HealthCheck" => {
obj.health_check =
HealthCheckDeserializer::deserialize("HealthCheck", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateHostedZoneCommentRequest {
pub comment: Option<String>,
pub id: String,
}
pub struct UpdateHostedZoneCommentRequestSerializer;
impl UpdateHostedZoneCommentRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &UpdateHostedZoneCommentRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
if let Some(ref value) = obj.comment {
&ResourceDescriptionSerializer::serialize(&mut writer, "Comment", value)?;
}
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateHostedZoneCommentResponse {
pub hosted_zone: HostedZone,
}
struct UpdateHostedZoneCommentResponseDeserializer;
impl UpdateHostedZoneCommentResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateHostedZoneCommentResponse, XmlParseError> {
deserialize_elements::<_, UpdateHostedZoneCommentResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"HostedZone" => {
obj.hosted_zone = HostedZoneDeserializer::deserialize("HostedZone", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateTrafficPolicyCommentRequest {
pub comment: String,
pub id: String,
pub version: i64,
}
pub struct UpdateTrafficPolicyCommentRequestSerializer;
impl UpdateTrafficPolicyCommentRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &UpdateTrafficPolicyCommentRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
TrafficPolicyCommentSerializer::serialize(&mut writer, "Comment", &obj.comment)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateTrafficPolicyCommentResponse {
pub traffic_policy: TrafficPolicy,
}
struct UpdateTrafficPolicyCommentResponseDeserializer;
impl UpdateTrafficPolicyCommentResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateTrafficPolicyCommentResponse, XmlParseError> {
deserialize_elements::<_, UpdateTrafficPolicyCommentResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"TrafficPolicy" => {
obj.traffic_policy =
TrafficPolicyDeserializer::deserialize("TrafficPolicy", stack)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateTrafficPolicyInstanceRequest {
pub id: String,
pub ttl: i64,
pub traffic_policy_id: String,
pub traffic_policy_version: i64,
}
pub struct UpdateTrafficPolicyInstanceRequestSerializer;
impl UpdateTrafficPolicyInstanceRequestSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &UpdateTrafficPolicyInstanceRequest,
xmlns: &str,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name).default_ns(xmlns))?;
TTLSerializer::serialize(&mut writer, "TTL", &obj.ttl)?;
TrafficPolicyIdSerializer::serialize(
&mut writer,
"TrafficPolicyId",
&obj.traffic_policy_id,
)?;
TrafficPolicyVersionSerializer::serialize(
&mut writer,
"TrafficPolicyVersion",
&obj.traffic_policy_version,
)?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct UpdateTrafficPolicyInstanceResponse {
pub traffic_policy_instance: TrafficPolicyInstance,
}
struct UpdateTrafficPolicyInstanceResponseDeserializer;
impl UpdateTrafficPolicyInstanceResponseDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<UpdateTrafficPolicyInstanceResponse, XmlParseError> {
deserialize_elements::<_, UpdateTrafficPolicyInstanceResponse, _>(
tag_name,
stack,
|name, stack, obj| {
match name {
"TrafficPolicyInstance" => {
obj.traffic_policy_instance =
TrafficPolicyInstanceDeserializer::deserialize(
"TrafficPolicyInstance",
stack,
)?;
}
_ => skip_tree(stack),
}
Ok(())
},
)
}
}
struct UsageCountDeserializer;
impl UsageCountDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<i64, XmlParseError> {
start_element(tag_name, stack)?;
let obj = i64::from_str(characters(stack)?.as_ref()).unwrap();
end_element(tag_name, stack)?;
Ok(obj)
}
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct VPC {
pub vpc_id: Option<String>,
pub vpc_region: Option<String>,
}
struct VPCDeserializer;
impl VPCDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<VPC, XmlParseError> {
deserialize_elements::<_, VPC, _>(tag_name, stack, |name, stack, obj| {
match name {
"VPCId" => {
obj.vpc_id = Some(VPCIdDeserializer::deserialize("VPCId", stack)?);
}
"VPCRegion" => {
obj.vpc_region = Some(VPCRegionDeserializer::deserialize("VPCRegion", stack)?);
}
_ => skip_tree(stack),
}
Ok(())
})
}
}
pub struct VPCSerializer;
impl VPCSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &VPC,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
if let Some(ref value) = obj.vpc_id {
writer.write(xml::writer::XmlEvent::start_element("VPCId"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
if let Some(ref value) = obj.vpc_region {
writer.write(xml::writer::XmlEvent::start_element("VPCRegion"))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = value
)));
writer.write(xml::writer::XmlEvent::end_element())?;
}
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct VPCIdDeserializer;
impl VPCIdDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct VPCIdSerializer;
impl VPCIdSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct VPCRegionDeserializer;
impl VPCRegionDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(tag_name: &str, stack: &mut T) -> Result<String, XmlParseError> {
start_element(tag_name, stack)?;
let obj = characters(stack)?;
end_element(tag_name, stack)?;
Ok(obj)
}
}
pub struct VPCRegionSerializer;
impl VPCRegionSerializer {
#[allow(unused_variables, warnings)]
pub fn serialize<W>(
mut writer: &mut EventWriter<W>,
name: &str,
obj: &String,
) -> Result<(), xml::writer::Error>
where
W: Write,
{
writer.write(xml::writer::XmlEvent::start_element(name))?;
writer.write(xml::writer::XmlEvent::characters(&format!(
"{value}",
value = obj.to_string()
)))?;
writer.write(xml::writer::XmlEvent::end_element())
}
}
struct VPCsDeserializer;
impl VPCsDeserializer {
#[allow(unused_variables)]
fn deserialize<T: Peek + Next>(
tag_name: &str,
stack: &mut T,
) -> Result<Vec<VPC>, XmlParseError> {
deserialize_elements::<_, Vec<_>, _>(tag_name, stack, |name, stack, obj| {
if name == "VPC" {
obj.push(VPCDeserializer::deserialize("VPC", stack)?);
} else {
skip_tree(stack);
}
Ok(())
})
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateVPCWithHostedZoneError {
ConflictingDomainExists(String),
InvalidInput(String),
InvalidVPCId(String),
LimitsExceeded(String),
NoSuchHostedZone(String),
NotAuthorized(String),
PublicZoneVPCAssociation(String),
}
impl AssociateVPCWithHostedZoneError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AssociateVPCWithHostedZoneError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConflictingDomainExists" => {
return RusotoError::Service(
AssociateVPCWithHostedZoneError::ConflictingDomainExists(
parsed_error.message,
),
)
}
"InvalidInput" => {
return RusotoError::Service(AssociateVPCWithHostedZoneError::InvalidInput(
parsed_error.message,
))
}
"InvalidVPCId" => {
return RusotoError::Service(AssociateVPCWithHostedZoneError::InvalidVPCId(
parsed_error.message,
))
}
"LimitsExceeded" => {
return RusotoError::Service(
AssociateVPCWithHostedZoneError::LimitsExceeded(parsed_error.message),
)
}
"NoSuchHostedZone" => {
return RusotoError::Service(
AssociateVPCWithHostedZoneError::NoSuchHostedZone(parsed_error.message),
)
}
"NotAuthorizedException" => {
return RusotoError::Service(
AssociateVPCWithHostedZoneError::NotAuthorized(parsed_error.message),
)
}
"PublicZoneVPCAssociation" => {
return RusotoError::Service(
AssociateVPCWithHostedZoneError::PublicZoneVPCAssociation(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for AssociateVPCWithHostedZoneError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateVPCWithHostedZoneError {
fn description(&self) -> &str {
match *self {
AssociateVPCWithHostedZoneError::ConflictingDomainExists(ref cause) => cause,
AssociateVPCWithHostedZoneError::InvalidInput(ref cause) => cause,
AssociateVPCWithHostedZoneError::InvalidVPCId(ref cause) => cause,
AssociateVPCWithHostedZoneError::LimitsExceeded(ref cause) => cause,
AssociateVPCWithHostedZoneError::NoSuchHostedZone(ref cause) => cause,
AssociateVPCWithHostedZoneError::NotAuthorized(ref cause) => cause,
AssociateVPCWithHostedZoneError::PublicZoneVPCAssociation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ChangeResourceRecordSetsError {
InvalidChangeBatch(String),
InvalidInput(String),
NoSuchHealthCheck(String),
NoSuchHostedZone(String),
PriorRequestNotComplete(String),
}
impl ChangeResourceRecordSetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ChangeResourceRecordSetsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidChangeBatch" => {
return RusotoError::Service(
ChangeResourceRecordSetsError::InvalidChangeBatch(parsed_error.message),
)
}
"InvalidInput" => {
return RusotoError::Service(ChangeResourceRecordSetsError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHealthCheck" => {
return RusotoError::Service(
ChangeResourceRecordSetsError::NoSuchHealthCheck(parsed_error.message),
)
}
"NoSuchHostedZone" => {
return RusotoError::Service(
ChangeResourceRecordSetsError::NoSuchHostedZone(parsed_error.message),
)
}
"PriorRequestNotComplete" => {
return RusotoError::Service(
ChangeResourceRecordSetsError::PriorRequestNotComplete(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ChangeResourceRecordSetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ChangeResourceRecordSetsError {
fn description(&self) -> &str {
match *self {
ChangeResourceRecordSetsError::InvalidChangeBatch(ref cause) => cause,
ChangeResourceRecordSetsError::InvalidInput(ref cause) => cause,
ChangeResourceRecordSetsError::NoSuchHealthCheck(ref cause) => cause,
ChangeResourceRecordSetsError::NoSuchHostedZone(ref cause) => cause,
ChangeResourceRecordSetsError::PriorRequestNotComplete(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ChangeTagsForResourceError {
InvalidInput(String),
NoSuchHealthCheck(String),
NoSuchHostedZone(String),
PriorRequestNotComplete(String),
Throttling(String),
}
impl ChangeTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ChangeTagsForResourceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(ChangeTagsForResourceError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHealthCheck" => {
return RusotoError::Service(ChangeTagsForResourceError::NoSuchHealthCheck(
parsed_error.message,
))
}
"NoSuchHostedZone" => {
return RusotoError::Service(ChangeTagsForResourceError::NoSuchHostedZone(
parsed_error.message,
))
}
"PriorRequestNotComplete" => {
return RusotoError::Service(
ChangeTagsForResourceError::PriorRequestNotComplete(
parsed_error.message,
),
)
}
"ThrottlingException" => {
return RusotoError::Service(ChangeTagsForResourceError::Throttling(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ChangeTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ChangeTagsForResourceError {
fn description(&self) -> &str {
match *self {
ChangeTagsForResourceError::InvalidInput(ref cause) => cause,
ChangeTagsForResourceError::NoSuchHealthCheck(ref cause) => cause,
ChangeTagsForResourceError::NoSuchHostedZone(ref cause) => cause,
ChangeTagsForResourceError::PriorRequestNotComplete(ref cause) => cause,
ChangeTagsForResourceError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateHealthCheckError {
HealthCheckAlreadyExists(String),
InvalidInput(String),
TooManyHealthChecks(String),
}
impl CreateHealthCheckError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateHealthCheckError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"HealthCheckAlreadyExists" => {
return RusotoError::Service(
CreateHealthCheckError::HealthCheckAlreadyExists(parsed_error.message),
)
}
"InvalidInput" => {
return RusotoError::Service(CreateHealthCheckError::InvalidInput(
parsed_error.message,
))
}
"TooManyHealthChecks" => {
return RusotoError::Service(CreateHealthCheckError::TooManyHealthChecks(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateHealthCheckError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateHealthCheckError {
fn description(&self) -> &str {
match *self {
CreateHealthCheckError::HealthCheckAlreadyExists(ref cause) => cause,
CreateHealthCheckError::InvalidInput(ref cause) => cause,
CreateHealthCheckError::TooManyHealthChecks(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateHostedZoneError {
ConflictingDomainExists(String),
DelegationSetNotAvailable(String),
DelegationSetNotReusable(String),
HostedZoneAlreadyExists(String),
InvalidDomainName(String),
InvalidInput(String),
InvalidVPCId(String),
NoSuchDelegationSet(String),
TooManyHostedZones(String),
}
impl CreateHostedZoneError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateHostedZoneError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConflictingDomainExists" => {
return RusotoError::Service(
CreateHostedZoneError::ConflictingDomainExists(parsed_error.message),
)
}
"DelegationSetNotAvailable" => {
return RusotoError::Service(
CreateHostedZoneError::DelegationSetNotAvailable(parsed_error.message),
)
}
"DelegationSetNotReusable" => {
return RusotoError::Service(
CreateHostedZoneError::DelegationSetNotReusable(parsed_error.message),
)
}
"HostedZoneAlreadyExists" => {
return RusotoError::Service(
CreateHostedZoneError::HostedZoneAlreadyExists(parsed_error.message),
)
}
"InvalidDomainName" => {
return RusotoError::Service(CreateHostedZoneError::InvalidDomainName(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(CreateHostedZoneError::InvalidInput(
parsed_error.message,
))
}
"InvalidVPCId" => {
return RusotoError::Service(CreateHostedZoneError::InvalidVPCId(
parsed_error.message,
))
}
"NoSuchDelegationSet" => {
return RusotoError::Service(CreateHostedZoneError::NoSuchDelegationSet(
parsed_error.message,
))
}
"TooManyHostedZones" => {
return RusotoError::Service(CreateHostedZoneError::TooManyHostedZones(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateHostedZoneError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateHostedZoneError {
fn description(&self) -> &str {
match *self {
CreateHostedZoneError::ConflictingDomainExists(ref cause) => cause,
CreateHostedZoneError::DelegationSetNotAvailable(ref cause) => cause,
CreateHostedZoneError::DelegationSetNotReusable(ref cause) => cause,
CreateHostedZoneError::HostedZoneAlreadyExists(ref cause) => cause,
CreateHostedZoneError::InvalidDomainName(ref cause) => cause,
CreateHostedZoneError::InvalidInput(ref cause) => cause,
CreateHostedZoneError::InvalidVPCId(ref cause) => cause,
CreateHostedZoneError::NoSuchDelegationSet(ref cause) => cause,
CreateHostedZoneError::TooManyHostedZones(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateQueryLoggingConfigError {
ConcurrentModification(String),
InsufficientCloudWatchLogsResourcePolicy(String),
InvalidInput(String),
NoSuchCloudWatchLogsLogGroup(String),
NoSuchHostedZone(String),
QueryLoggingConfigAlreadyExists(String),
}
impl CreateQueryLoggingConfigError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateQueryLoggingConfigError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConcurrentModification" => {
return RusotoError::Service(
CreateQueryLoggingConfigError::ConcurrentModification(
parsed_error.message,
),
)
}
"InsufficientCloudWatchLogsResourcePolicy" => {
return RusotoError::Service(
CreateQueryLoggingConfigError::InsufficientCloudWatchLogsResourcePolicy(
parsed_error.message,
),
)
}
"InvalidInput" => {
return RusotoError::Service(CreateQueryLoggingConfigError::InvalidInput(
parsed_error.message,
))
}
"NoSuchCloudWatchLogsLogGroup" => {
return RusotoError::Service(
CreateQueryLoggingConfigError::NoSuchCloudWatchLogsLogGroup(
parsed_error.message,
),
)
}
"NoSuchHostedZone" => {
return RusotoError::Service(
CreateQueryLoggingConfigError::NoSuchHostedZone(parsed_error.message),
)
}
"QueryLoggingConfigAlreadyExists" => {
return RusotoError::Service(
CreateQueryLoggingConfigError::QueryLoggingConfigAlreadyExists(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateQueryLoggingConfigError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateQueryLoggingConfigError {
fn description(&self) -> &str {
match *self {
CreateQueryLoggingConfigError::ConcurrentModification(ref cause) => cause,
CreateQueryLoggingConfigError::InsufficientCloudWatchLogsResourcePolicy(ref cause) => {
cause
}
CreateQueryLoggingConfigError::InvalidInput(ref cause) => cause,
CreateQueryLoggingConfigError::NoSuchCloudWatchLogsLogGroup(ref cause) => cause,
CreateQueryLoggingConfigError::NoSuchHostedZone(ref cause) => cause,
CreateQueryLoggingConfigError::QueryLoggingConfigAlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateReusableDelegationSetError {
DelegationSetAlreadyCreated(String),
DelegationSetAlreadyReusable(String),
DelegationSetNotAvailable(String),
HostedZoneNotFound(String),
InvalidArgument(String),
InvalidInput(String),
LimitsExceeded(String),
}
impl CreateReusableDelegationSetError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateReusableDelegationSetError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DelegationSetAlreadyCreated" => {
return RusotoError::Service(
CreateReusableDelegationSetError::DelegationSetAlreadyCreated(
parsed_error.message,
),
)
}
"DelegationSetAlreadyReusable" => {
return RusotoError::Service(
CreateReusableDelegationSetError::DelegationSetAlreadyReusable(
parsed_error.message,
),
)
}
"DelegationSetNotAvailable" => {
return RusotoError::Service(
CreateReusableDelegationSetError::DelegationSetNotAvailable(
parsed_error.message,
),
)
}
"HostedZoneNotFound" => {
return RusotoError::Service(
CreateReusableDelegationSetError::HostedZoneNotFound(
parsed_error.message,
),
)
}
"InvalidArgument" => {
return RusotoError::Service(
CreateReusableDelegationSetError::InvalidArgument(parsed_error.message),
)
}
"InvalidInput" => {
return RusotoError::Service(
CreateReusableDelegationSetError::InvalidInput(parsed_error.message),
)
}
"LimitsExceeded" => {
return RusotoError::Service(
CreateReusableDelegationSetError::LimitsExceeded(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateReusableDelegationSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateReusableDelegationSetError {
fn description(&self) -> &str {
match *self {
CreateReusableDelegationSetError::DelegationSetAlreadyCreated(ref cause) => cause,
CreateReusableDelegationSetError::DelegationSetAlreadyReusable(ref cause) => cause,
CreateReusableDelegationSetError::DelegationSetNotAvailable(ref cause) => cause,
CreateReusableDelegationSetError::HostedZoneNotFound(ref cause) => cause,
CreateReusableDelegationSetError::InvalidArgument(ref cause) => cause,
CreateReusableDelegationSetError::InvalidInput(ref cause) => cause,
CreateReusableDelegationSetError::LimitsExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTrafficPolicyError {
InvalidInput(String),
InvalidTrafficPolicyDocument(String),
TooManyTrafficPolicies(String),
TrafficPolicyAlreadyExists(String),
}
impl CreateTrafficPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTrafficPolicyError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(CreateTrafficPolicyError::InvalidInput(
parsed_error.message,
))
}
"InvalidTrafficPolicyDocument" => {
return RusotoError::Service(
CreateTrafficPolicyError::InvalidTrafficPolicyDocument(
parsed_error.message,
),
)
}
"TooManyTrafficPolicies" => {
return RusotoError::Service(
CreateTrafficPolicyError::TooManyTrafficPolicies(parsed_error.message),
)
}
"TrafficPolicyAlreadyExists" => {
return RusotoError::Service(
CreateTrafficPolicyError::TrafficPolicyAlreadyExists(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateTrafficPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTrafficPolicyError {
fn description(&self) -> &str {
match *self {
CreateTrafficPolicyError::InvalidInput(ref cause) => cause,
CreateTrafficPolicyError::InvalidTrafficPolicyDocument(ref cause) => cause,
CreateTrafficPolicyError::TooManyTrafficPolicies(ref cause) => cause,
CreateTrafficPolicyError::TrafficPolicyAlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTrafficPolicyInstanceError {
InvalidInput(String),
NoSuchHostedZone(String),
NoSuchTrafficPolicy(String),
TooManyTrafficPolicyInstances(String),
TrafficPolicyInstanceAlreadyExists(String),
}
impl CreateTrafficPolicyInstanceError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateTrafficPolicyInstanceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(
CreateTrafficPolicyInstanceError::InvalidInput(parsed_error.message),
)
}
"NoSuchHostedZone" => {
return RusotoError::Service(
CreateTrafficPolicyInstanceError::NoSuchHostedZone(
parsed_error.message,
),
)
}
"NoSuchTrafficPolicy" => {
return RusotoError::Service(
CreateTrafficPolicyInstanceError::NoSuchTrafficPolicy(
parsed_error.message,
),
)
}
"TooManyTrafficPolicyInstances" => {
return RusotoError::Service(
CreateTrafficPolicyInstanceError::TooManyTrafficPolicyInstances(
parsed_error.message,
),
)
}
"TrafficPolicyInstanceAlreadyExists" => {
return RusotoError::Service(
CreateTrafficPolicyInstanceError::TrafficPolicyInstanceAlreadyExists(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateTrafficPolicyInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTrafficPolicyInstanceError {
fn description(&self) -> &str {
match *self {
CreateTrafficPolicyInstanceError::InvalidInput(ref cause) => cause,
CreateTrafficPolicyInstanceError::NoSuchHostedZone(ref cause) => cause,
CreateTrafficPolicyInstanceError::NoSuchTrafficPolicy(ref cause) => cause,
CreateTrafficPolicyInstanceError::TooManyTrafficPolicyInstances(ref cause) => cause,
CreateTrafficPolicyInstanceError::TrafficPolicyInstanceAlreadyExists(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTrafficPolicyVersionError {
ConcurrentModification(String),
InvalidInput(String),
InvalidTrafficPolicyDocument(String),
NoSuchTrafficPolicy(String),
TooManyTrafficPolicyVersionsForCurrentPolicy(String),
}
impl CreateTrafficPolicyVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateTrafficPolicyVersionError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConcurrentModification" => return RusotoError::Service(CreateTrafficPolicyVersionError::ConcurrentModification(parsed_error.message)),"InvalidInput" => return RusotoError::Service(CreateTrafficPolicyVersionError::InvalidInput(parsed_error.message)),"InvalidTrafficPolicyDocument" => return RusotoError::Service(CreateTrafficPolicyVersionError::InvalidTrafficPolicyDocument(parsed_error.message)),"NoSuchTrafficPolicy" => return RusotoError::Service(CreateTrafficPolicyVersionError::NoSuchTrafficPolicy(parsed_error.message)),"TooManyTrafficPolicyVersionsForCurrentPolicy" => return RusotoError::Service(CreateTrafficPolicyVersionError::TooManyTrafficPolicyVersionsForCurrentPolicy(parsed_error.message)),_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateTrafficPolicyVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTrafficPolicyVersionError {
fn description(&self) -> &str {
match *self {
CreateTrafficPolicyVersionError::ConcurrentModification(ref cause) => cause,
CreateTrafficPolicyVersionError::InvalidInput(ref cause) => cause,
CreateTrafficPolicyVersionError::InvalidTrafficPolicyDocument(ref cause) => cause,
CreateTrafficPolicyVersionError::NoSuchTrafficPolicy(ref cause) => cause,
CreateTrafficPolicyVersionError::TooManyTrafficPolicyVersionsForCurrentPolicy(
ref cause,
) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateVPCAssociationAuthorizationError {
ConcurrentModification(String),
InvalidInput(String),
InvalidVPCId(String),
NoSuchHostedZone(String),
TooManyVPCAssociationAuthorizations(String),
}
impl CreateVPCAssociationAuthorizationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateVPCAssociationAuthorizationError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConcurrentModification" => {
return RusotoError::Service(
CreateVPCAssociationAuthorizationError::ConcurrentModification(
parsed_error.message,
),
)
}
"InvalidInput" => {
return RusotoError::Service(
CreateVPCAssociationAuthorizationError::InvalidInput(
parsed_error.message,
),
)
}
"InvalidVPCId" => {
return RusotoError::Service(
CreateVPCAssociationAuthorizationError::InvalidVPCId(
parsed_error.message,
),
)
}
"NoSuchHostedZone" => {
return RusotoError::Service(
CreateVPCAssociationAuthorizationError::NoSuchHostedZone(
parsed_error.message,
),
)
}
"TooManyVPCAssociationAuthorizations" => return RusotoError::Service(
CreateVPCAssociationAuthorizationError::TooManyVPCAssociationAuthorizations(
parsed_error.message,
),
),
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for CreateVPCAssociationAuthorizationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateVPCAssociationAuthorizationError {
fn description(&self) -> &str {
match *self {
CreateVPCAssociationAuthorizationError::ConcurrentModification(ref cause) => cause,
CreateVPCAssociationAuthorizationError::InvalidInput(ref cause) => cause,
CreateVPCAssociationAuthorizationError::InvalidVPCId(ref cause) => cause,
CreateVPCAssociationAuthorizationError::NoSuchHostedZone(ref cause) => cause,
CreateVPCAssociationAuthorizationError::TooManyVPCAssociationAuthorizations(
ref cause,
) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteHealthCheckError {
HealthCheckInUse(String),
InvalidInput(String),
NoSuchHealthCheck(String),
}
impl DeleteHealthCheckError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteHealthCheckError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"HealthCheckInUse" => {
return RusotoError::Service(DeleteHealthCheckError::HealthCheckInUse(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(DeleteHealthCheckError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHealthCheck" => {
return RusotoError::Service(DeleteHealthCheckError::NoSuchHealthCheck(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteHealthCheckError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteHealthCheckError {
fn description(&self) -> &str {
match *self {
DeleteHealthCheckError::HealthCheckInUse(ref cause) => cause,
DeleteHealthCheckError::InvalidInput(ref cause) => cause,
DeleteHealthCheckError::NoSuchHealthCheck(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteHostedZoneError {
HostedZoneNotEmpty(String),
InvalidDomainName(String),
InvalidInput(String),
NoSuchHostedZone(String),
PriorRequestNotComplete(String),
}
impl DeleteHostedZoneError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteHostedZoneError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"HostedZoneNotEmpty" => {
return RusotoError::Service(DeleteHostedZoneError::HostedZoneNotEmpty(
parsed_error.message,
))
}
"InvalidDomainName" => {
return RusotoError::Service(DeleteHostedZoneError::InvalidDomainName(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(DeleteHostedZoneError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHostedZone" => {
return RusotoError::Service(DeleteHostedZoneError::NoSuchHostedZone(
parsed_error.message,
))
}
"PriorRequestNotComplete" => {
return RusotoError::Service(
DeleteHostedZoneError::PriorRequestNotComplete(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteHostedZoneError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteHostedZoneError {
fn description(&self) -> &str {
match *self {
DeleteHostedZoneError::HostedZoneNotEmpty(ref cause) => cause,
DeleteHostedZoneError::InvalidDomainName(ref cause) => cause,
DeleteHostedZoneError::InvalidInput(ref cause) => cause,
DeleteHostedZoneError::NoSuchHostedZone(ref cause) => cause,
DeleteHostedZoneError::PriorRequestNotComplete(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteQueryLoggingConfigError {
ConcurrentModification(String),
InvalidInput(String),
NoSuchQueryLoggingConfig(String),
}
impl DeleteQueryLoggingConfigError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteQueryLoggingConfigError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConcurrentModification" => {
return RusotoError::Service(
DeleteQueryLoggingConfigError::ConcurrentModification(
parsed_error.message,
),
)
}
"InvalidInput" => {
return RusotoError::Service(DeleteQueryLoggingConfigError::InvalidInput(
parsed_error.message,
))
}
"NoSuchQueryLoggingConfig" => {
return RusotoError::Service(
DeleteQueryLoggingConfigError::NoSuchQueryLoggingConfig(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteQueryLoggingConfigError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteQueryLoggingConfigError {
fn description(&self) -> &str {
match *self {
DeleteQueryLoggingConfigError::ConcurrentModification(ref cause) => cause,
DeleteQueryLoggingConfigError::InvalidInput(ref cause) => cause,
DeleteQueryLoggingConfigError::NoSuchQueryLoggingConfig(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteReusableDelegationSetError {
DelegationSetInUse(String),
DelegationSetNotReusable(String),
InvalidInput(String),
NoSuchDelegationSet(String),
}
impl DeleteReusableDelegationSetError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteReusableDelegationSetError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DelegationSetInUse" => {
return RusotoError::Service(
DeleteReusableDelegationSetError::DelegationSetInUse(
parsed_error.message,
),
)
}
"DelegationSetNotReusable" => {
return RusotoError::Service(
DeleteReusableDelegationSetError::DelegationSetNotReusable(
parsed_error.message,
),
)
}
"InvalidInput" => {
return RusotoError::Service(
DeleteReusableDelegationSetError::InvalidInput(parsed_error.message),
)
}
"NoSuchDelegationSet" => {
return RusotoError::Service(
DeleteReusableDelegationSetError::NoSuchDelegationSet(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteReusableDelegationSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteReusableDelegationSetError {
fn description(&self) -> &str {
match *self {
DeleteReusableDelegationSetError::DelegationSetInUse(ref cause) => cause,
DeleteReusableDelegationSetError::DelegationSetNotReusable(ref cause) => cause,
DeleteReusableDelegationSetError::InvalidInput(ref cause) => cause,
DeleteReusableDelegationSetError::NoSuchDelegationSet(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTrafficPolicyError {
ConcurrentModification(String),
InvalidInput(String),
NoSuchTrafficPolicy(String),
TrafficPolicyInUse(String),
}
impl DeleteTrafficPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTrafficPolicyError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConcurrentModification" => {
return RusotoError::Service(
DeleteTrafficPolicyError::ConcurrentModification(parsed_error.message),
)
}
"InvalidInput" => {
return RusotoError::Service(DeleteTrafficPolicyError::InvalidInput(
parsed_error.message,
))
}
"NoSuchTrafficPolicy" => {
return RusotoError::Service(DeleteTrafficPolicyError::NoSuchTrafficPolicy(
parsed_error.message,
))
}
"TrafficPolicyInUse" => {
return RusotoError::Service(DeleteTrafficPolicyError::TrafficPolicyInUse(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteTrafficPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTrafficPolicyError {
fn description(&self) -> &str {
match *self {
DeleteTrafficPolicyError::ConcurrentModification(ref cause) => cause,
DeleteTrafficPolicyError::InvalidInput(ref cause) => cause,
DeleteTrafficPolicyError::NoSuchTrafficPolicy(ref cause) => cause,
DeleteTrafficPolicyError::TrafficPolicyInUse(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTrafficPolicyInstanceError {
InvalidInput(String),
NoSuchTrafficPolicyInstance(String),
PriorRequestNotComplete(String),
}
impl DeleteTrafficPolicyInstanceError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteTrafficPolicyInstanceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(
DeleteTrafficPolicyInstanceError::InvalidInput(parsed_error.message),
)
}
"NoSuchTrafficPolicyInstance" => {
return RusotoError::Service(
DeleteTrafficPolicyInstanceError::NoSuchTrafficPolicyInstance(
parsed_error.message,
),
)
}
"PriorRequestNotComplete" => {
return RusotoError::Service(
DeleteTrafficPolicyInstanceError::PriorRequestNotComplete(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteTrafficPolicyInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTrafficPolicyInstanceError {
fn description(&self) -> &str {
match *self {
DeleteTrafficPolicyInstanceError::InvalidInput(ref cause) => cause,
DeleteTrafficPolicyInstanceError::NoSuchTrafficPolicyInstance(ref cause) => cause,
DeleteTrafficPolicyInstanceError::PriorRequestNotComplete(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteVPCAssociationAuthorizationError {
ConcurrentModification(String),
InvalidInput(String),
InvalidVPCId(String),
NoSuchHostedZone(String),
VPCAssociationAuthorizationNotFound(String),
}
impl DeleteVPCAssociationAuthorizationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteVPCAssociationAuthorizationError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConcurrentModification" => {
return RusotoError::Service(
DeleteVPCAssociationAuthorizationError::ConcurrentModification(
parsed_error.message,
),
)
}
"InvalidInput" => {
return RusotoError::Service(
DeleteVPCAssociationAuthorizationError::InvalidInput(
parsed_error.message,
),
)
}
"InvalidVPCId" => {
return RusotoError::Service(
DeleteVPCAssociationAuthorizationError::InvalidVPCId(
parsed_error.message,
),
)
}
"NoSuchHostedZone" => {
return RusotoError::Service(
DeleteVPCAssociationAuthorizationError::NoSuchHostedZone(
parsed_error.message,
),
)
}
"VPCAssociationAuthorizationNotFound" => return RusotoError::Service(
DeleteVPCAssociationAuthorizationError::VPCAssociationAuthorizationNotFound(
parsed_error.message,
),
),
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DeleteVPCAssociationAuthorizationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteVPCAssociationAuthorizationError {
fn description(&self) -> &str {
match *self {
DeleteVPCAssociationAuthorizationError::ConcurrentModification(ref cause) => cause,
DeleteVPCAssociationAuthorizationError::InvalidInput(ref cause) => cause,
DeleteVPCAssociationAuthorizationError::InvalidVPCId(ref cause) => cause,
DeleteVPCAssociationAuthorizationError::NoSuchHostedZone(ref cause) => cause,
DeleteVPCAssociationAuthorizationError::VPCAssociationAuthorizationNotFound(
ref cause,
) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateVPCFromHostedZoneError {
InvalidInput(String),
InvalidVPCId(String),
LastVPCAssociation(String),
NoSuchHostedZone(String),
VPCAssociationNotFound(String),
}
impl DisassociateVPCFromHostedZoneError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociateVPCFromHostedZoneError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(
DisassociateVPCFromHostedZoneError::InvalidInput(parsed_error.message),
)
}
"InvalidVPCId" => {
return RusotoError::Service(
DisassociateVPCFromHostedZoneError::InvalidVPCId(parsed_error.message),
)
}
"LastVPCAssociation" => {
return RusotoError::Service(
DisassociateVPCFromHostedZoneError::LastVPCAssociation(
parsed_error.message,
),
)
}
"NoSuchHostedZone" => {
return RusotoError::Service(
DisassociateVPCFromHostedZoneError::NoSuchHostedZone(
parsed_error.message,
),
)
}
"VPCAssociationNotFound" => {
return RusotoError::Service(
DisassociateVPCFromHostedZoneError::VPCAssociationNotFound(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for DisassociateVPCFromHostedZoneError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateVPCFromHostedZoneError {
fn description(&self) -> &str {
match *self {
DisassociateVPCFromHostedZoneError::InvalidInput(ref cause) => cause,
DisassociateVPCFromHostedZoneError::InvalidVPCId(ref cause) => cause,
DisassociateVPCFromHostedZoneError::LastVPCAssociation(ref cause) => cause,
DisassociateVPCFromHostedZoneError::NoSuchHostedZone(ref cause) => cause,
DisassociateVPCFromHostedZoneError::VPCAssociationNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAccountLimitError {
InvalidInput(String),
}
impl GetAccountLimitError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAccountLimitError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(GetAccountLimitError::InvalidInput(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetAccountLimitError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAccountLimitError {
fn description(&self) -> &str {
match *self {
GetAccountLimitError::InvalidInput(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetChangeError {
InvalidInput(String),
NoSuchChange(String),
}
impl GetChangeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetChangeError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(GetChangeError::InvalidInput(
parsed_error.message,
))
}
"NoSuchChange" => {
return RusotoError::Service(GetChangeError::NoSuchChange(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetChangeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetChangeError {
fn description(&self) -> &str {
match *self {
GetChangeError::InvalidInput(ref cause) => cause,
GetChangeError::NoSuchChange(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetCheckerIpRangesError {}
impl GetCheckerIpRangesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetCheckerIpRangesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetCheckerIpRangesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetCheckerIpRangesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum GetGeoLocationError {
InvalidInput(String),
NoSuchGeoLocation(String),
}
impl GetGeoLocationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetGeoLocationError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(GetGeoLocationError::InvalidInput(
parsed_error.message,
))
}
"NoSuchGeoLocation" => {
return RusotoError::Service(GetGeoLocationError::NoSuchGeoLocation(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetGeoLocationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetGeoLocationError {
fn description(&self) -> &str {
match *self {
GetGeoLocationError::InvalidInput(ref cause) => cause,
GetGeoLocationError::NoSuchGeoLocation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetHealthCheckError {
IncompatibleVersion(String),
InvalidInput(String),
NoSuchHealthCheck(String),
}
impl GetHealthCheckError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetHealthCheckError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"IncompatibleVersion" => {
return RusotoError::Service(GetHealthCheckError::IncompatibleVersion(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(GetHealthCheckError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHealthCheck" => {
return RusotoError::Service(GetHealthCheckError::NoSuchHealthCheck(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetHealthCheckError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetHealthCheckError {
fn description(&self) -> &str {
match *self {
GetHealthCheckError::IncompatibleVersion(ref cause) => cause,
GetHealthCheckError::InvalidInput(ref cause) => cause,
GetHealthCheckError::NoSuchHealthCheck(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetHealthCheckCountError {}
impl GetHealthCheckCountError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetHealthCheckCountError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetHealthCheckCountError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetHealthCheckCountError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum GetHealthCheckLastFailureReasonError {
InvalidInput(String),
NoSuchHealthCheck(String),
}
impl GetHealthCheckLastFailureReasonError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetHealthCheckLastFailureReasonError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(
GetHealthCheckLastFailureReasonError::InvalidInput(
parsed_error.message,
),
)
}
"NoSuchHealthCheck" => {
return RusotoError::Service(
GetHealthCheckLastFailureReasonError::NoSuchHealthCheck(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetHealthCheckLastFailureReasonError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetHealthCheckLastFailureReasonError {
fn description(&self) -> &str {
match *self {
GetHealthCheckLastFailureReasonError::InvalidInput(ref cause) => cause,
GetHealthCheckLastFailureReasonError::NoSuchHealthCheck(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetHealthCheckStatusError {
InvalidInput(String),
NoSuchHealthCheck(String),
}
impl GetHealthCheckStatusError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetHealthCheckStatusError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(GetHealthCheckStatusError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHealthCheck" => {
return RusotoError::Service(GetHealthCheckStatusError::NoSuchHealthCheck(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetHealthCheckStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetHealthCheckStatusError {
fn description(&self) -> &str {
match *self {
GetHealthCheckStatusError::InvalidInput(ref cause) => cause,
GetHealthCheckStatusError::NoSuchHealthCheck(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetHostedZoneError {
InvalidInput(String),
NoSuchHostedZone(String),
}
impl GetHostedZoneError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetHostedZoneError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(GetHostedZoneError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHostedZone" => {
return RusotoError::Service(GetHostedZoneError::NoSuchHostedZone(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetHostedZoneError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetHostedZoneError {
fn description(&self) -> &str {
match *self {
GetHostedZoneError::InvalidInput(ref cause) => cause,
GetHostedZoneError::NoSuchHostedZone(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetHostedZoneCountError {
InvalidInput(String),
}
impl GetHostedZoneCountError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetHostedZoneCountError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(GetHostedZoneCountError::InvalidInput(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetHostedZoneCountError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetHostedZoneCountError {
fn description(&self) -> &str {
match *self {
GetHostedZoneCountError::InvalidInput(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetHostedZoneLimitError {
HostedZoneNotPrivate(String),
InvalidInput(String),
NoSuchHostedZone(String),
}
impl GetHostedZoneLimitError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetHostedZoneLimitError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"HostedZoneNotPrivate" => {
return RusotoError::Service(GetHostedZoneLimitError::HostedZoneNotPrivate(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(GetHostedZoneLimitError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHostedZone" => {
return RusotoError::Service(GetHostedZoneLimitError::NoSuchHostedZone(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetHostedZoneLimitError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetHostedZoneLimitError {
fn description(&self) -> &str {
match *self {
GetHostedZoneLimitError::HostedZoneNotPrivate(ref cause) => cause,
GetHostedZoneLimitError::InvalidInput(ref cause) => cause,
GetHostedZoneLimitError::NoSuchHostedZone(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetQueryLoggingConfigError {
InvalidInput(String),
NoSuchQueryLoggingConfig(String),
}
impl GetQueryLoggingConfigError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetQueryLoggingConfigError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(GetQueryLoggingConfigError::InvalidInput(
parsed_error.message,
))
}
"NoSuchQueryLoggingConfig" => {
return RusotoError::Service(
GetQueryLoggingConfigError::NoSuchQueryLoggingConfig(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetQueryLoggingConfigError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetQueryLoggingConfigError {
fn description(&self) -> &str {
match *self {
GetQueryLoggingConfigError::InvalidInput(ref cause) => cause,
GetQueryLoggingConfigError::NoSuchQueryLoggingConfig(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetReusableDelegationSetError {
DelegationSetNotReusable(String),
InvalidInput(String),
NoSuchDelegationSet(String),
}
impl GetReusableDelegationSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetReusableDelegationSetError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DelegationSetNotReusable" => {
return RusotoError::Service(
GetReusableDelegationSetError::DelegationSetNotReusable(
parsed_error.message,
),
)
}
"InvalidInput" => {
return RusotoError::Service(GetReusableDelegationSetError::InvalidInput(
parsed_error.message,
))
}
"NoSuchDelegationSet" => {
return RusotoError::Service(
GetReusableDelegationSetError::NoSuchDelegationSet(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetReusableDelegationSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetReusableDelegationSetError {
fn description(&self) -> &str {
match *self {
GetReusableDelegationSetError::DelegationSetNotReusable(ref cause) => cause,
GetReusableDelegationSetError::InvalidInput(ref cause) => cause,
GetReusableDelegationSetError::NoSuchDelegationSet(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetReusableDelegationSetLimitError {
InvalidInput(String),
NoSuchDelegationSet(String),
}
impl GetReusableDelegationSetLimitError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetReusableDelegationSetLimitError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(
GetReusableDelegationSetLimitError::InvalidInput(parsed_error.message),
)
}
"NoSuchDelegationSet" => {
return RusotoError::Service(
GetReusableDelegationSetLimitError::NoSuchDelegationSet(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetReusableDelegationSetLimitError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetReusableDelegationSetLimitError {
fn description(&self) -> &str {
match *self {
GetReusableDelegationSetLimitError::InvalidInput(ref cause) => cause,
GetReusableDelegationSetLimitError::NoSuchDelegationSet(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetTrafficPolicyError {
InvalidInput(String),
NoSuchTrafficPolicy(String),
}
impl GetTrafficPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetTrafficPolicyError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(GetTrafficPolicyError::InvalidInput(
parsed_error.message,
))
}
"NoSuchTrafficPolicy" => {
return RusotoError::Service(GetTrafficPolicyError::NoSuchTrafficPolicy(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetTrafficPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetTrafficPolicyError {
fn description(&self) -> &str {
match *self {
GetTrafficPolicyError::InvalidInput(ref cause) => cause,
GetTrafficPolicyError::NoSuchTrafficPolicy(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetTrafficPolicyInstanceError {
InvalidInput(String),
NoSuchTrafficPolicyInstance(String),
}
impl GetTrafficPolicyInstanceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetTrafficPolicyInstanceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(GetTrafficPolicyInstanceError::InvalidInput(
parsed_error.message,
))
}
"NoSuchTrafficPolicyInstance" => {
return RusotoError::Service(
GetTrafficPolicyInstanceError::NoSuchTrafficPolicyInstance(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetTrafficPolicyInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetTrafficPolicyInstanceError {
fn description(&self) -> &str {
match *self {
GetTrafficPolicyInstanceError::InvalidInput(ref cause) => cause,
GetTrafficPolicyInstanceError::NoSuchTrafficPolicyInstance(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetTrafficPolicyInstanceCountError {}
impl GetTrafficPolicyInstanceCountError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetTrafficPolicyInstanceCountError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for GetTrafficPolicyInstanceCountError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetTrafficPolicyInstanceCountError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListGeoLocationsError {
InvalidInput(String),
}
impl ListGeoLocationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListGeoLocationsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(ListGeoLocationsError::InvalidInput(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListGeoLocationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListGeoLocationsError {
fn description(&self) -> &str {
match *self {
ListGeoLocationsError::InvalidInput(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListHealthChecksError {
IncompatibleVersion(String),
InvalidInput(String),
}
impl ListHealthChecksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListHealthChecksError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"IncompatibleVersion" => {
return RusotoError::Service(ListHealthChecksError::IncompatibleVersion(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(ListHealthChecksError::InvalidInput(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListHealthChecksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListHealthChecksError {
fn description(&self) -> &str {
match *self {
ListHealthChecksError::IncompatibleVersion(ref cause) => cause,
ListHealthChecksError::InvalidInput(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListHostedZonesError {
DelegationSetNotReusable(String),
InvalidInput(String),
NoSuchDelegationSet(String),
}
impl ListHostedZonesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListHostedZonesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"DelegationSetNotReusable" => {
return RusotoError::Service(
ListHostedZonesError::DelegationSetNotReusable(parsed_error.message),
)
}
"InvalidInput" => {
return RusotoError::Service(ListHostedZonesError::InvalidInput(
parsed_error.message,
))
}
"NoSuchDelegationSet" => {
return RusotoError::Service(ListHostedZonesError::NoSuchDelegationSet(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListHostedZonesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListHostedZonesError {
fn description(&self) -> &str {
match *self {
ListHostedZonesError::DelegationSetNotReusable(ref cause) => cause,
ListHostedZonesError::InvalidInput(ref cause) => cause,
ListHostedZonesError::NoSuchDelegationSet(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListHostedZonesByNameError {
InvalidDomainName(String),
InvalidInput(String),
}
impl ListHostedZonesByNameError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListHostedZonesByNameError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidDomainName" => {
return RusotoError::Service(ListHostedZonesByNameError::InvalidDomainName(
parsed_error.message,
))
}
"InvalidInput" => {
return RusotoError::Service(ListHostedZonesByNameError::InvalidInput(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListHostedZonesByNameError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListHostedZonesByNameError {
fn description(&self) -> &str {
match *self {
ListHostedZonesByNameError::InvalidDomainName(ref cause) => cause,
ListHostedZonesByNameError::InvalidInput(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListQueryLoggingConfigsError {
InvalidInput(String),
InvalidPaginationToken(String),
NoSuchHostedZone(String),
}
impl ListQueryLoggingConfigsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListQueryLoggingConfigsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(ListQueryLoggingConfigsError::InvalidInput(
parsed_error.message,
))
}
"InvalidPaginationToken" => {
return RusotoError::Service(
ListQueryLoggingConfigsError::InvalidPaginationToken(
parsed_error.message,
),
)
}
"NoSuchHostedZone" => {
return RusotoError::Service(
ListQueryLoggingConfigsError::NoSuchHostedZone(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListQueryLoggingConfigsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListQueryLoggingConfigsError {
fn description(&self) -> &str {
match *self {
ListQueryLoggingConfigsError::InvalidInput(ref cause) => cause,
ListQueryLoggingConfigsError::InvalidPaginationToken(ref cause) => cause,
ListQueryLoggingConfigsError::NoSuchHostedZone(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListResourceRecordSetsError {
InvalidInput(String),
NoSuchHostedZone(String),
}
impl ListResourceRecordSetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListResourceRecordSetsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(ListResourceRecordSetsError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHostedZone" => {
return RusotoError::Service(ListResourceRecordSetsError::NoSuchHostedZone(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListResourceRecordSetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListResourceRecordSetsError {
fn description(&self) -> &str {
match *self {
ListResourceRecordSetsError::InvalidInput(ref cause) => cause,
ListResourceRecordSetsError::NoSuchHostedZone(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListReusableDelegationSetsError {
InvalidInput(String),
}
impl ListReusableDelegationSetsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListReusableDelegationSetsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(ListReusableDelegationSetsError::InvalidInput(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListReusableDelegationSetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListReusableDelegationSetsError {
fn description(&self) -> &str {
match *self {
ListReusableDelegationSetsError::InvalidInput(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
InvalidInput(String),
NoSuchHealthCheck(String),
NoSuchHostedZone(String),
PriorRequestNotComplete(String),
Throttling(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(ListTagsForResourceError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHealthCheck" => {
return RusotoError::Service(ListTagsForResourceError::NoSuchHealthCheck(
parsed_error.message,
))
}
"NoSuchHostedZone" => {
return RusotoError::Service(ListTagsForResourceError::NoSuchHostedZone(
parsed_error.message,
))
}
"PriorRequestNotComplete" => {
return RusotoError::Service(
ListTagsForResourceError::PriorRequestNotComplete(parsed_error.message),
)
}
"ThrottlingException" => {
return RusotoError::Service(ListTagsForResourceError::Throttling(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForResourceError {
fn description(&self) -> &str {
match *self {
ListTagsForResourceError::InvalidInput(ref cause) => cause,
ListTagsForResourceError::NoSuchHealthCheck(ref cause) => cause,
ListTagsForResourceError::NoSuchHostedZone(ref cause) => cause,
ListTagsForResourceError::PriorRequestNotComplete(ref cause) => cause,
ListTagsForResourceError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourcesError {
InvalidInput(String),
NoSuchHealthCheck(String),
NoSuchHostedZone(String),
PriorRequestNotComplete(String),
Throttling(String),
}
impl ListTagsForResourcesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourcesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(ListTagsForResourcesError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHealthCheck" => {
return RusotoError::Service(ListTagsForResourcesError::NoSuchHealthCheck(
parsed_error.message,
))
}
"NoSuchHostedZone" => {
return RusotoError::Service(ListTagsForResourcesError::NoSuchHostedZone(
parsed_error.message,
))
}
"PriorRequestNotComplete" => {
return RusotoError::Service(
ListTagsForResourcesError::PriorRequestNotComplete(
parsed_error.message,
),
)
}
"ThrottlingException" => {
return RusotoError::Service(ListTagsForResourcesError::Throttling(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListTagsForResourcesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForResourcesError {
fn description(&self) -> &str {
match *self {
ListTagsForResourcesError::InvalidInput(ref cause) => cause,
ListTagsForResourcesError::NoSuchHealthCheck(ref cause) => cause,
ListTagsForResourcesError::NoSuchHostedZone(ref cause) => cause,
ListTagsForResourcesError::PriorRequestNotComplete(ref cause) => cause,
ListTagsForResourcesError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTrafficPoliciesError {
InvalidInput(String),
}
impl ListTrafficPoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTrafficPoliciesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(ListTrafficPoliciesError::InvalidInput(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListTrafficPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTrafficPoliciesError {
fn description(&self) -> &str {
match *self {
ListTrafficPoliciesError::InvalidInput(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTrafficPolicyInstancesError {
InvalidInput(String),
NoSuchTrafficPolicyInstance(String),
}
impl ListTrafficPolicyInstancesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListTrafficPolicyInstancesError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(ListTrafficPolicyInstancesError::InvalidInput(
parsed_error.message,
))
}
"NoSuchTrafficPolicyInstance" => {
return RusotoError::Service(
ListTrafficPolicyInstancesError::NoSuchTrafficPolicyInstance(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListTrafficPolicyInstancesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTrafficPolicyInstancesError {
fn description(&self) -> &str {
match *self {
ListTrafficPolicyInstancesError::InvalidInput(ref cause) => cause,
ListTrafficPolicyInstancesError::NoSuchTrafficPolicyInstance(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTrafficPolicyInstancesByHostedZoneError {
InvalidInput(String),
NoSuchHostedZone(String),
NoSuchTrafficPolicyInstance(String),
}
impl ListTrafficPolicyInstancesByHostedZoneError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListTrafficPolicyInstancesByHostedZoneError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(
ListTrafficPolicyInstancesByHostedZoneError::InvalidInput(
parsed_error.message,
),
)
}
"NoSuchHostedZone" => {
return RusotoError::Service(
ListTrafficPolicyInstancesByHostedZoneError::NoSuchHostedZone(
parsed_error.message,
),
)
}
"NoSuchTrafficPolicyInstance" => return RusotoError::Service(
ListTrafficPolicyInstancesByHostedZoneError::NoSuchTrafficPolicyInstance(
parsed_error.message,
),
),
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListTrafficPolicyInstancesByHostedZoneError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTrafficPolicyInstancesByHostedZoneError {
fn description(&self) -> &str {
match *self {
ListTrafficPolicyInstancesByHostedZoneError::InvalidInput(ref cause) => cause,
ListTrafficPolicyInstancesByHostedZoneError::NoSuchHostedZone(ref cause) => cause,
ListTrafficPolicyInstancesByHostedZoneError::NoSuchTrafficPolicyInstance(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTrafficPolicyInstancesByPolicyError {
InvalidInput(String),
NoSuchTrafficPolicy(String),
NoSuchTrafficPolicyInstance(String),
}
impl ListTrafficPolicyInstancesByPolicyError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListTrafficPolicyInstancesByPolicyError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(
ListTrafficPolicyInstancesByPolicyError::InvalidInput(
parsed_error.message,
),
)
}
"NoSuchTrafficPolicy" => {
return RusotoError::Service(
ListTrafficPolicyInstancesByPolicyError::NoSuchTrafficPolicy(
parsed_error.message,
),
)
}
"NoSuchTrafficPolicyInstance" => {
return RusotoError::Service(
ListTrafficPolicyInstancesByPolicyError::NoSuchTrafficPolicyInstance(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListTrafficPolicyInstancesByPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTrafficPolicyInstancesByPolicyError {
fn description(&self) -> &str {
match *self {
ListTrafficPolicyInstancesByPolicyError::InvalidInput(ref cause) => cause,
ListTrafficPolicyInstancesByPolicyError::NoSuchTrafficPolicy(ref cause) => cause,
ListTrafficPolicyInstancesByPolicyError::NoSuchTrafficPolicyInstance(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTrafficPolicyVersionsError {
InvalidInput(String),
NoSuchTrafficPolicy(String),
}
impl ListTrafficPolicyVersionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTrafficPolicyVersionsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(ListTrafficPolicyVersionsError::InvalidInput(
parsed_error.message,
))
}
"NoSuchTrafficPolicy" => {
return RusotoError::Service(
ListTrafficPolicyVersionsError::NoSuchTrafficPolicy(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListTrafficPolicyVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTrafficPolicyVersionsError {
fn description(&self) -> &str {
match *self {
ListTrafficPolicyVersionsError::InvalidInput(ref cause) => cause,
ListTrafficPolicyVersionsError::NoSuchTrafficPolicy(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListVPCAssociationAuthorizationsError {
InvalidInput(String),
InvalidPaginationToken(String),
NoSuchHostedZone(String),
}
impl ListVPCAssociationAuthorizationsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListVPCAssociationAuthorizationsError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(
ListVPCAssociationAuthorizationsError::InvalidInput(
parsed_error.message,
),
)
}
"InvalidPaginationToken" => {
return RusotoError::Service(
ListVPCAssociationAuthorizationsError::InvalidPaginationToken(
parsed_error.message,
),
)
}
"NoSuchHostedZone" => {
return RusotoError::Service(
ListVPCAssociationAuthorizationsError::NoSuchHostedZone(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for ListVPCAssociationAuthorizationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListVPCAssociationAuthorizationsError {
fn description(&self) -> &str {
match *self {
ListVPCAssociationAuthorizationsError::InvalidInput(ref cause) => cause,
ListVPCAssociationAuthorizationsError::InvalidPaginationToken(ref cause) => cause,
ListVPCAssociationAuthorizationsError::NoSuchHostedZone(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TestDNSAnswerError {
InvalidInput(String),
NoSuchHostedZone(String),
}
impl TestDNSAnswerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TestDNSAnswerError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(TestDNSAnswerError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHostedZone" => {
return RusotoError::Service(TestDNSAnswerError::NoSuchHostedZone(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for TestDNSAnswerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TestDNSAnswerError {
fn description(&self) -> &str {
match *self {
TestDNSAnswerError::InvalidInput(ref cause) => cause,
TestDNSAnswerError::NoSuchHostedZone(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateHealthCheckError {
HealthCheckVersionMismatch(String),
InvalidInput(String),
NoSuchHealthCheck(String),
}
impl UpdateHealthCheckError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateHealthCheckError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"HealthCheckVersionMismatch" => {
return RusotoError::Service(
UpdateHealthCheckError::HealthCheckVersionMismatch(
parsed_error.message,
),
)
}
"InvalidInput" => {
return RusotoError::Service(UpdateHealthCheckError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHealthCheck" => {
return RusotoError::Service(UpdateHealthCheckError::NoSuchHealthCheck(
parsed_error.message,
))
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateHealthCheckError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateHealthCheckError {
fn description(&self) -> &str {
match *self {
UpdateHealthCheckError::HealthCheckVersionMismatch(ref cause) => cause,
UpdateHealthCheckError::InvalidInput(ref cause) => cause,
UpdateHealthCheckError::NoSuchHealthCheck(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateHostedZoneCommentError {
InvalidInput(String),
NoSuchHostedZone(String),
}
impl UpdateHostedZoneCommentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateHostedZoneCommentError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"InvalidInput" => {
return RusotoError::Service(UpdateHostedZoneCommentError::InvalidInput(
parsed_error.message,
))
}
"NoSuchHostedZone" => {
return RusotoError::Service(
UpdateHostedZoneCommentError::NoSuchHostedZone(parsed_error.message),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateHostedZoneCommentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateHostedZoneCommentError {
fn description(&self) -> &str {
match *self {
UpdateHostedZoneCommentError::InvalidInput(ref cause) => cause,
UpdateHostedZoneCommentError::NoSuchHostedZone(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateTrafficPolicyCommentError {
ConcurrentModification(String),
InvalidInput(String),
NoSuchTrafficPolicy(String),
}
impl UpdateTrafficPolicyCommentError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateTrafficPolicyCommentError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConcurrentModification" => {
return RusotoError::Service(
UpdateTrafficPolicyCommentError::ConcurrentModification(
parsed_error.message,
),
)
}
"InvalidInput" => {
return RusotoError::Service(UpdateTrafficPolicyCommentError::InvalidInput(
parsed_error.message,
))
}
"NoSuchTrafficPolicy" => {
return RusotoError::Service(
UpdateTrafficPolicyCommentError::NoSuchTrafficPolicy(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateTrafficPolicyCommentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateTrafficPolicyCommentError {
fn description(&self) -> &str {
match *self {
UpdateTrafficPolicyCommentError::ConcurrentModification(ref cause) => cause,
UpdateTrafficPolicyCommentError::InvalidInput(ref cause) => cause,
UpdateTrafficPolicyCommentError::NoSuchTrafficPolicy(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateTrafficPolicyInstanceError {
ConflictingTypes(String),
InvalidInput(String),
NoSuchTrafficPolicy(String),
NoSuchTrafficPolicyInstance(String),
PriorRequestNotComplete(String),
}
impl UpdateTrafficPolicyInstanceError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateTrafficPolicyInstanceError> {
{
let reader = EventReader::new(res.body.as_ref());
let mut stack = XmlResponse::new(reader.into_iter().peekable());
find_start_element(&mut stack);
if let Ok(parsed_error) = Self::deserialize(&mut stack) {
match &parsed_error.code[..] {
"ConflictingTypes" => {
return RusotoError::Service(
UpdateTrafficPolicyInstanceError::ConflictingTypes(
parsed_error.message,
),
)
}
"InvalidInput" => {
return RusotoError::Service(
UpdateTrafficPolicyInstanceError::InvalidInput(parsed_error.message),
)
}
"NoSuchTrafficPolicy" => {
return RusotoError::Service(
UpdateTrafficPolicyInstanceError::NoSuchTrafficPolicy(
parsed_error.message,
),
)
}
"NoSuchTrafficPolicyInstance" => {
return RusotoError::Service(
UpdateTrafficPolicyInstanceError::NoSuchTrafficPolicyInstance(
parsed_error.message,
),
)
}
"PriorRequestNotComplete" => {
return RusotoError::Service(
UpdateTrafficPolicyInstanceError::PriorRequestNotComplete(
parsed_error.message,
),
)
}
_ => {}
}
}
}
RusotoError::Unknown(res)
}
fn deserialize<T>(stack: &mut T) -> Result<XmlError, XmlParseError>
where
T: Peek + Next,
{
start_element("ErrorResponse", stack)?;
XmlErrorDeserializer::deserialize("Error", stack)
}
}
impl fmt::Display for UpdateTrafficPolicyInstanceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateTrafficPolicyInstanceError {
fn description(&self) -> &str {
match *self {
UpdateTrafficPolicyInstanceError::ConflictingTypes(ref cause) => cause,
UpdateTrafficPolicyInstanceError::InvalidInput(ref cause) => cause,
UpdateTrafficPolicyInstanceError::NoSuchTrafficPolicy(ref cause) => cause,
UpdateTrafficPolicyInstanceError::NoSuchTrafficPolicyInstance(ref cause) => cause,
UpdateTrafficPolicyInstanceError::PriorRequestNotComplete(ref cause) => cause,
}
}
}
pub trait Route53 {
fn associate_vpc_with_hosted_zone(
&self,
input: AssociateVPCWithHostedZoneRequest,
) -> RusotoFuture<AssociateVPCWithHostedZoneResponse, AssociateVPCWithHostedZoneError>;
fn change_resource_record_sets(
&self,
input: ChangeResourceRecordSetsRequest,
) -> RusotoFuture<ChangeResourceRecordSetsResponse, ChangeResourceRecordSetsError>;
fn change_tags_for_resource(
&self,
input: ChangeTagsForResourceRequest,
) -> RusotoFuture<ChangeTagsForResourceResponse, ChangeTagsForResourceError>;
fn create_health_check(
&self,
input: CreateHealthCheckRequest,
) -> RusotoFuture<CreateHealthCheckResponse, CreateHealthCheckError>;
fn create_hosted_zone(
&self,
input: CreateHostedZoneRequest,
) -> RusotoFuture<CreateHostedZoneResponse, CreateHostedZoneError>;
fn create_query_logging_config(
&self,
input: CreateQueryLoggingConfigRequest,
) -> RusotoFuture<CreateQueryLoggingConfigResponse, CreateQueryLoggingConfigError>;
fn create_reusable_delegation_set(
&self,
input: CreateReusableDelegationSetRequest,
) -> RusotoFuture<CreateReusableDelegationSetResponse, CreateReusableDelegationSetError>;
fn create_traffic_policy(
&self,
input: CreateTrafficPolicyRequest,
) -> RusotoFuture<CreateTrafficPolicyResponse, CreateTrafficPolicyError>;
fn create_traffic_policy_instance(
&self,
input: CreateTrafficPolicyInstanceRequest,
) -> RusotoFuture<CreateTrafficPolicyInstanceResponse, CreateTrafficPolicyInstanceError>;
fn create_traffic_policy_version(
&self,
input: CreateTrafficPolicyVersionRequest,
) -> RusotoFuture<CreateTrafficPolicyVersionResponse, CreateTrafficPolicyVersionError>;
fn create_vpc_association_authorization(
&self,
input: CreateVPCAssociationAuthorizationRequest,
) -> RusotoFuture<
CreateVPCAssociationAuthorizationResponse,
CreateVPCAssociationAuthorizationError,
>;
fn delete_health_check(
&self,
input: DeleteHealthCheckRequest,
) -> RusotoFuture<DeleteHealthCheckResponse, DeleteHealthCheckError>;
fn delete_hosted_zone(
&self,
input: DeleteHostedZoneRequest,
) -> RusotoFuture<DeleteHostedZoneResponse, DeleteHostedZoneError>;
fn delete_query_logging_config(
&self,
input: DeleteQueryLoggingConfigRequest,
) -> RusotoFuture<DeleteQueryLoggingConfigResponse, DeleteQueryLoggingConfigError>;
fn delete_reusable_delegation_set(
&self,
input: DeleteReusableDelegationSetRequest,
) -> RusotoFuture<DeleteReusableDelegationSetResponse, DeleteReusableDelegationSetError>;
fn delete_traffic_policy(
&self,
input: DeleteTrafficPolicyRequest,
) -> RusotoFuture<DeleteTrafficPolicyResponse, DeleteTrafficPolicyError>;
fn delete_traffic_policy_instance(
&self,
input: DeleteTrafficPolicyInstanceRequest,
) -> RusotoFuture<DeleteTrafficPolicyInstanceResponse, DeleteTrafficPolicyInstanceError>;
fn delete_vpc_association_authorization(
&self,
input: DeleteVPCAssociationAuthorizationRequest,
) -> RusotoFuture<
DeleteVPCAssociationAuthorizationResponse,
DeleteVPCAssociationAuthorizationError,
>;
fn disassociate_vpc_from_hosted_zone(
&self,
input: DisassociateVPCFromHostedZoneRequest,
) -> RusotoFuture<DisassociateVPCFromHostedZoneResponse, DisassociateVPCFromHostedZoneError>;
fn get_account_limit(
&self,
input: GetAccountLimitRequest,
) -> RusotoFuture<GetAccountLimitResponse, GetAccountLimitError>;
fn get_change(
&self,
input: GetChangeRequest,
) -> RusotoFuture<GetChangeResponse, GetChangeError>;
fn get_checker_ip_ranges(
&self,
input: GetCheckerIpRangesRequest,
) -> RusotoFuture<GetCheckerIpRangesResponse, GetCheckerIpRangesError>;
fn get_geo_location(
&self,
input: GetGeoLocationRequest,
) -> RusotoFuture<GetGeoLocationResponse, GetGeoLocationError>;
fn get_health_check(
&self,
input: GetHealthCheckRequest,
) -> RusotoFuture<GetHealthCheckResponse, GetHealthCheckError>;
fn get_health_check_count(
&self,
input: GetHealthCheckCountRequest,
) -> RusotoFuture<GetHealthCheckCountResponse, GetHealthCheckCountError>;
fn get_health_check_last_failure_reason(
&self,
input: GetHealthCheckLastFailureReasonRequest,
) -> RusotoFuture<GetHealthCheckLastFailureReasonResponse, GetHealthCheckLastFailureReasonError>;
fn get_health_check_status(
&self,
input: GetHealthCheckStatusRequest,
) -> RusotoFuture<GetHealthCheckStatusResponse, GetHealthCheckStatusError>;
fn get_hosted_zone(
&self,
input: GetHostedZoneRequest,
) -> RusotoFuture<GetHostedZoneResponse, GetHostedZoneError>;
fn get_hosted_zone_count(
&self,
input: GetHostedZoneCountRequest,
) -> RusotoFuture<GetHostedZoneCountResponse, GetHostedZoneCountError>;
fn get_hosted_zone_limit(
&self,
input: GetHostedZoneLimitRequest,
) -> RusotoFuture<GetHostedZoneLimitResponse, GetHostedZoneLimitError>;
fn get_query_logging_config(
&self,
input: GetQueryLoggingConfigRequest,
) -> RusotoFuture<GetQueryLoggingConfigResponse, GetQueryLoggingConfigError>;
fn get_reusable_delegation_set(
&self,
input: GetReusableDelegationSetRequest,
) -> RusotoFuture<GetReusableDelegationSetResponse, GetReusableDelegationSetError>;
fn get_reusable_delegation_set_limit(
&self,
input: GetReusableDelegationSetLimitRequest,
) -> RusotoFuture<GetReusableDelegationSetLimitResponse, GetReusableDelegationSetLimitError>;
fn get_traffic_policy(
&self,
input: GetTrafficPolicyRequest,
) -> RusotoFuture<GetTrafficPolicyResponse, GetTrafficPolicyError>;
fn get_traffic_policy_instance(
&self,
input: GetTrafficPolicyInstanceRequest,
) -> RusotoFuture<GetTrafficPolicyInstanceResponse, GetTrafficPolicyInstanceError>;
fn get_traffic_policy_instance_count(
&self,
input: GetTrafficPolicyInstanceCountRequest,
) -> RusotoFuture<GetTrafficPolicyInstanceCountResponse, GetTrafficPolicyInstanceCountError>;
fn list_geo_locations(
&self,
input: ListGeoLocationsRequest,
) -> RusotoFuture<ListGeoLocationsResponse, ListGeoLocationsError>;
fn list_health_checks(
&self,
input: ListHealthChecksRequest,
) -> RusotoFuture<ListHealthChecksResponse, ListHealthChecksError>;
fn list_hosted_zones(
&self,
input: ListHostedZonesRequest,
) -> RusotoFuture<ListHostedZonesResponse, ListHostedZonesError>;
fn list_hosted_zones_by_name(
&self,
input: ListHostedZonesByNameRequest,
) -> RusotoFuture<ListHostedZonesByNameResponse, ListHostedZonesByNameError>;
fn list_query_logging_configs(
&self,
input: ListQueryLoggingConfigsRequest,
) -> RusotoFuture<ListQueryLoggingConfigsResponse, ListQueryLoggingConfigsError>;
fn list_resource_record_sets(
&self,
input: ListResourceRecordSetsRequest,
) -> RusotoFuture<ListResourceRecordSetsResponse, ListResourceRecordSetsError>;
fn list_reusable_delegation_sets(
&self,
input: ListReusableDelegationSetsRequest,
) -> RusotoFuture<ListReusableDelegationSetsResponse, ListReusableDelegationSetsError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError>;
fn list_tags_for_resources(
&self,
input: ListTagsForResourcesRequest,
) -> RusotoFuture<ListTagsForResourcesResponse, ListTagsForResourcesError>;
fn list_traffic_policies(
&self,
input: ListTrafficPoliciesRequest,
) -> RusotoFuture<ListTrafficPoliciesResponse, ListTrafficPoliciesError>;
fn list_traffic_policy_instances(
&self,
input: ListTrafficPolicyInstancesRequest,
) -> RusotoFuture<ListTrafficPolicyInstancesResponse, ListTrafficPolicyInstancesError>;
fn list_traffic_policy_instances_by_hosted_zone(
&self,
input: ListTrafficPolicyInstancesByHostedZoneRequest,
) -> RusotoFuture<
ListTrafficPolicyInstancesByHostedZoneResponse,
ListTrafficPolicyInstancesByHostedZoneError,
>;
fn list_traffic_policy_instances_by_policy(
&self,
input: ListTrafficPolicyInstancesByPolicyRequest,
) -> RusotoFuture<
ListTrafficPolicyInstancesByPolicyResponse,
ListTrafficPolicyInstancesByPolicyError,
>;
fn list_traffic_policy_versions(
&self,
input: ListTrafficPolicyVersionsRequest,
) -> RusotoFuture<ListTrafficPolicyVersionsResponse, ListTrafficPolicyVersionsError>;
fn list_vpc_association_authorizations(
&self,
input: ListVPCAssociationAuthorizationsRequest,
) -> RusotoFuture<ListVPCAssociationAuthorizationsResponse, ListVPCAssociationAuthorizationsError>;
fn test_dns_answer(
&self,
input: TestDNSAnswerRequest,
) -> RusotoFuture<TestDNSAnswerResponse, TestDNSAnswerError>;
fn update_health_check(
&self,
input: UpdateHealthCheckRequest,
) -> RusotoFuture<UpdateHealthCheckResponse, UpdateHealthCheckError>;
fn update_hosted_zone_comment(
&self,
input: UpdateHostedZoneCommentRequest,
) -> RusotoFuture<UpdateHostedZoneCommentResponse, UpdateHostedZoneCommentError>;
fn update_traffic_policy_comment(
&self,
input: UpdateTrafficPolicyCommentRequest,
) -> RusotoFuture<UpdateTrafficPolicyCommentResponse, UpdateTrafficPolicyCommentError>;
fn update_traffic_policy_instance(
&self,
input: UpdateTrafficPolicyInstanceRequest,
) -> RusotoFuture<UpdateTrafficPolicyInstanceResponse, UpdateTrafficPolicyInstanceError>;
}
#[derive(Clone)]
pub struct Route53Client {
client: Client,
region: region::Region,
}
impl Route53Client {
pub fn new(region: region::Region) -> Route53Client {
Route53Client {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> Route53Client
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
Route53Client {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl Route53 for Route53Client {
#[allow(unused_variables, warnings)]
fn associate_vpc_with_hosted_zone(
&self,
input: AssociateVPCWithHostedZoneRequest,
) -> RusotoFuture<AssociateVPCWithHostedZoneResponse, AssociateVPCWithHostedZoneError> {
let request_uri = format!(
"/2013-04-01/hostedzone/{id}/associatevpc",
id = input.hosted_zone_id
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
AssociateVPCWithHostedZoneRequestSerializer::serialize(
&mut writer,
"AssociateVPCWithHostedZoneRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateVPCWithHostedZoneError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = AssociateVPCWithHostedZoneResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = AssociateVPCWithHostedZoneResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn change_resource_record_sets(
&self,
input: ChangeResourceRecordSetsRequest,
) -> RusotoFuture<ChangeResourceRecordSetsResponse, ChangeResourceRecordSetsError> {
let request_uri = format!(
"/2013-04-01/hostedzone/{id}/rrset/",
id = input.hosted_zone_id
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
ChangeResourceRecordSetsRequestSerializer::serialize(
&mut writer,
"ChangeResourceRecordSetsRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ChangeResourceRecordSetsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ChangeResourceRecordSetsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ChangeResourceRecordSetsResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn change_tags_for_resource(
&self,
input: ChangeTagsForResourceRequest,
) -> RusotoFuture<ChangeTagsForResourceResponse, ChangeTagsForResourceError> {
let request_uri = format!(
"/2013-04-01/tags/{resource_type}/{resource_id}",
resource_id = input.resource_id,
resource_type = input.resource_type
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
ChangeTagsForResourceRequestSerializer::serialize(
&mut writer,
"ChangeTagsForResourceRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ChangeTagsForResourceError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ChangeTagsForResourceResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ChangeTagsForResourceResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn create_health_check(
&self,
input: CreateHealthCheckRequest,
) -> RusotoFuture<CreateHealthCheckResponse, CreateHealthCheckError> {
let request_uri = "/2013-04-01/healthcheck";
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
CreateHealthCheckRequestSerializer::serialize(
&mut writer,
"CreateHealthCheckRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateHealthCheckError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = CreateHealthCheckResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = CreateHealthCheckResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
let value = response.headers.get("Location").unwrap().to_owned();
result.location = value;
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn create_hosted_zone(
&self,
input: CreateHostedZoneRequest,
) -> RusotoFuture<CreateHostedZoneResponse, CreateHostedZoneError> {
let request_uri = "/2013-04-01/hostedzone";
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
CreateHostedZoneRequestSerializer::serialize(
&mut writer,
"CreateHostedZoneRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateHostedZoneError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = CreateHostedZoneResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = CreateHostedZoneResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
let value = response.headers.get("Location").unwrap().to_owned();
result.location = value;
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn create_query_logging_config(
&self,
input: CreateQueryLoggingConfigRequest,
) -> RusotoFuture<CreateQueryLoggingConfigResponse, CreateQueryLoggingConfigError> {
let request_uri = "/2013-04-01/queryloggingconfig";
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
CreateQueryLoggingConfigRequestSerializer::serialize(
&mut writer,
"CreateQueryLoggingConfigRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateQueryLoggingConfigError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = CreateQueryLoggingConfigResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = CreateQueryLoggingConfigResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
let value = response.headers.get("Location").unwrap().to_owned();
result.location = value;
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn create_reusable_delegation_set(
&self,
input: CreateReusableDelegationSetRequest,
) -> RusotoFuture<CreateReusableDelegationSetResponse, CreateReusableDelegationSetError> {
let request_uri = "/2013-04-01/delegationset";
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
CreateReusableDelegationSetRequestSerializer::serialize(
&mut writer,
"CreateReusableDelegationSetRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateReusableDelegationSetError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = CreateReusableDelegationSetResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = CreateReusableDelegationSetResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
let value = response.headers.get("Location").unwrap().to_owned();
result.location = value;
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn create_traffic_policy(
&self,
input: CreateTrafficPolicyRequest,
) -> RusotoFuture<CreateTrafficPolicyResponse, CreateTrafficPolicyError> {
let request_uri = "/2013-04-01/trafficpolicy";
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
CreateTrafficPolicyRequestSerializer::serialize(
&mut writer,
"CreateTrafficPolicyRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateTrafficPolicyError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = CreateTrafficPolicyResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = CreateTrafficPolicyResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
let value = response.headers.get("Location").unwrap().to_owned();
result.location = value;
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn create_traffic_policy_instance(
&self,
input: CreateTrafficPolicyInstanceRequest,
) -> RusotoFuture<CreateTrafficPolicyInstanceResponse, CreateTrafficPolicyInstanceError> {
let request_uri = "/2013-04-01/trafficpolicyinstance";
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
CreateTrafficPolicyInstanceRequestSerializer::serialize(
&mut writer,
"CreateTrafficPolicyInstanceRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateTrafficPolicyInstanceError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = CreateTrafficPolicyInstanceResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = CreateTrafficPolicyInstanceResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
let value = response.headers.get("Location").unwrap().to_owned();
result.location = value;
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn create_traffic_policy_version(
&self,
input: CreateTrafficPolicyVersionRequest,
) -> RusotoFuture<CreateTrafficPolicyVersionResponse, CreateTrafficPolicyVersionError> {
let request_uri = format!("/2013-04-01/trafficpolicy/{id}", id = input.id)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
CreateTrafficPolicyVersionRequestSerializer::serialize(
&mut writer,
"CreateTrafficPolicyVersionRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateTrafficPolicyVersionError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = CreateTrafficPolicyVersionResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = CreateTrafficPolicyVersionResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
let value = response.headers.get("Location").unwrap().to_owned();
result.location = value;
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn create_vpc_association_authorization(
&self,
input: CreateVPCAssociationAuthorizationRequest,
) -> RusotoFuture<
CreateVPCAssociationAuthorizationResponse,
CreateVPCAssociationAuthorizationError,
> {
let request_uri = format!(
"/2013-04-01/hostedzone/{id}/authorizevpcassociation",
id = input.hosted_zone_id
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
CreateVPCAssociationAuthorizationRequestSerializer::serialize(
&mut writer,
"CreateVPCAssociationAuthorizationRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateVPCAssociationAuthorizationError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = CreateVPCAssociationAuthorizationResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = CreateVPCAssociationAuthorizationResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn delete_health_check(
&self,
input: DeleteHealthCheckRequest,
) -> RusotoFuture<DeleteHealthCheckResponse, DeleteHealthCheckError> {
let request_uri = format!(
"/2013-04-01/healthcheck/{health_check_id}",
health_check_id = input.health_check_id
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("DELETE", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteHealthCheckError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = DeleteHealthCheckResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = DeleteHealthCheckResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn delete_hosted_zone(
&self,
input: DeleteHostedZoneRequest,
) -> RusotoFuture<DeleteHostedZoneResponse, DeleteHostedZoneError> {
let request_uri = format!("/2013-04-01/hostedzone/{id}", id = input.id)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("DELETE", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteHostedZoneError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = DeleteHostedZoneResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = DeleteHostedZoneResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn delete_query_logging_config(
&self,
input: DeleteQueryLoggingConfigRequest,
) -> RusotoFuture<DeleteQueryLoggingConfigResponse, DeleteQueryLoggingConfigError> {
let request_uri = format!("/2013-04-01/queryloggingconfig/{id}", id = input.id)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("DELETE", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteQueryLoggingConfigError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = DeleteQueryLoggingConfigResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = DeleteQueryLoggingConfigResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn delete_reusable_delegation_set(
&self,
input: DeleteReusableDelegationSetRequest,
) -> RusotoFuture<DeleteReusableDelegationSetResponse, DeleteReusableDelegationSetError> {
let request_uri = format!("/2013-04-01/delegationset/{id}", id = input.id)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("DELETE", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteReusableDelegationSetError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = DeleteReusableDelegationSetResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = DeleteReusableDelegationSetResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn delete_traffic_policy(
&self,
input: DeleteTrafficPolicyRequest,
) -> RusotoFuture<DeleteTrafficPolicyResponse, DeleteTrafficPolicyError> {
let request_uri = format!(
"/2013-04-01/trafficpolicy/{id}/{version}",
id = input.id,
version = input.version
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("DELETE", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteTrafficPolicyError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = DeleteTrafficPolicyResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = DeleteTrafficPolicyResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn delete_traffic_policy_instance(
&self,
input: DeleteTrafficPolicyInstanceRequest,
) -> RusotoFuture<DeleteTrafficPolicyInstanceResponse, DeleteTrafficPolicyInstanceError> {
let request_uri = format!("/2013-04-01/trafficpolicyinstance/{id}", id = input.id)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("DELETE", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteTrafficPolicyInstanceError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = DeleteTrafficPolicyInstanceResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = DeleteTrafficPolicyInstanceResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn delete_vpc_association_authorization(
&self,
input: DeleteVPCAssociationAuthorizationRequest,
) -> RusotoFuture<
DeleteVPCAssociationAuthorizationResponse,
DeleteVPCAssociationAuthorizationError,
> {
let request_uri = format!(
"/2013-04-01/hostedzone/{id}/deauthorizevpcassociation",
id = input.hosted_zone_id
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
DeleteVPCAssociationAuthorizationRequestSerializer::serialize(
&mut writer,
"DeleteVPCAssociationAuthorizationRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteVPCAssociationAuthorizationError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = DeleteVPCAssociationAuthorizationResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = DeleteVPCAssociationAuthorizationResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn disassociate_vpc_from_hosted_zone(
&self,
input: DisassociateVPCFromHostedZoneRequest,
) -> RusotoFuture<DisassociateVPCFromHostedZoneResponse, DisassociateVPCFromHostedZoneError>
{
let request_uri = format!(
"/2013-04-01/hostedzone/{id}/disassociatevpc",
id = input.hosted_zone_id
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
DisassociateVPCFromHostedZoneRequestSerializer::serialize(
&mut writer,
"DisassociateVPCFromHostedZoneRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(DisassociateVPCFromHostedZoneError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = DisassociateVPCFromHostedZoneResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = DisassociateVPCFromHostedZoneResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_account_limit(
&self,
input: GetAccountLimitRequest,
) -> RusotoFuture<GetAccountLimitResponse, GetAccountLimitError> {
let request_uri = format!("/2013-04-01/accountlimit/{type}", type = input.type_)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetAccountLimitError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetAccountLimitResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetAccountLimitResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_change(
&self,
input: GetChangeRequest,
) -> RusotoFuture<GetChangeResponse, GetChangeError> {
let request_uri = format!("/2013-04-01/change/{id}", id = input.id)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetChangeError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetChangeResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result =
GetChangeResponseDeserializer::deserialize(&actual_tag_name, &mut stack)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_checker_ip_ranges(
&self,
input: GetCheckerIpRangesRequest,
) -> RusotoFuture<GetCheckerIpRangesResponse, GetCheckerIpRangesError> {
let request_uri = "/2013-04-01/checkeripranges";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetCheckerIpRangesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetCheckerIpRangesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetCheckerIpRangesResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_geo_location(
&self,
input: GetGeoLocationRequest,
) -> RusotoFuture<GetGeoLocationResponse, GetGeoLocationError> {
let request_uri = "/2013-04-01/geolocation";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.continent_code {
params.put("continentcode", x);
}
if let Some(ref x) = input.country_code {
params.put("countrycode", x);
}
if let Some(ref x) = input.subdivision_code {
params.put("subdivisioncode", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetGeoLocationError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetGeoLocationResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetGeoLocationResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_health_check(
&self,
input: GetHealthCheckRequest,
) -> RusotoFuture<GetHealthCheckResponse, GetHealthCheckError> {
let request_uri = format!(
"/2013-04-01/healthcheck/{health_check_id}",
health_check_id = input.health_check_id
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetHealthCheckError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetHealthCheckResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetHealthCheckResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_health_check_count(
&self,
input: GetHealthCheckCountRequest,
) -> RusotoFuture<GetHealthCheckCountResponse, GetHealthCheckCountError> {
let request_uri = "/2013-04-01/healthcheckcount";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetHealthCheckCountError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetHealthCheckCountResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetHealthCheckCountResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_health_check_last_failure_reason(
&self,
input: GetHealthCheckLastFailureReasonRequest,
) -> RusotoFuture<GetHealthCheckLastFailureReasonResponse, GetHealthCheckLastFailureReasonError>
{
let request_uri = format!(
"/2013-04-01/healthcheck/{health_check_id}/lastfailurereason",
health_check_id = input.health_check_id
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(GetHealthCheckLastFailureReasonError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetHealthCheckLastFailureReasonResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetHealthCheckLastFailureReasonResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_health_check_status(
&self,
input: GetHealthCheckStatusRequest,
) -> RusotoFuture<GetHealthCheckStatusResponse, GetHealthCheckStatusError> {
let request_uri = format!(
"/2013-04-01/healthcheck/{health_check_id}/status",
health_check_id = input.health_check_id
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetHealthCheckStatusError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetHealthCheckStatusResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetHealthCheckStatusResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_hosted_zone(
&self,
input: GetHostedZoneRequest,
) -> RusotoFuture<GetHostedZoneResponse, GetHostedZoneError> {
let request_uri = format!("/2013-04-01/hostedzone/{id}", id = input.id)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetHostedZoneError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetHostedZoneResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetHostedZoneResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_hosted_zone_count(
&self,
input: GetHostedZoneCountRequest,
) -> RusotoFuture<GetHostedZoneCountResponse, GetHostedZoneCountError> {
let request_uri = "/2013-04-01/hostedzonecount";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetHostedZoneCountError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetHostedZoneCountResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetHostedZoneCountResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_hosted_zone_limit(
&self,
input: GetHostedZoneLimitRequest,
) -> RusotoFuture<GetHostedZoneLimitResponse, GetHostedZoneLimitError> {
let request_uri = format!("/2013-04-01/hostedzonelimit/{id}/{type}", id = input.hosted_zone_id, type = input.type_).replace("/hostedzone/hostedzone/", "/hostedzone/").replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetHostedZoneLimitError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetHostedZoneLimitResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetHostedZoneLimitResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_query_logging_config(
&self,
input: GetQueryLoggingConfigRequest,
) -> RusotoFuture<GetQueryLoggingConfigResponse, GetQueryLoggingConfigError> {
let request_uri = format!("/2013-04-01/queryloggingconfig/{id}", id = input.id)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(GetQueryLoggingConfigError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetQueryLoggingConfigResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetQueryLoggingConfigResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_reusable_delegation_set(
&self,
input: GetReusableDelegationSetRequest,
) -> RusotoFuture<GetReusableDelegationSetResponse, GetReusableDelegationSetError> {
let request_uri = format!("/2013-04-01/delegationset/{id}", id = input.id)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(GetReusableDelegationSetError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetReusableDelegationSetResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetReusableDelegationSetResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_reusable_delegation_set_limit(
&self,
input: GetReusableDelegationSetLimitRequest,
) -> RusotoFuture<GetReusableDelegationSetLimitResponse, GetReusableDelegationSetLimitError>
{
let request_uri = format!("/2013-04-01/reusabledelegationsetlimit/{id}/{type}", id = input.delegation_set_id, type = input.type_).replace("/hostedzone/hostedzone/", "/hostedzone/").replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(GetReusableDelegationSetLimitError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetReusableDelegationSetLimitResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetReusableDelegationSetLimitResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_traffic_policy(
&self,
input: GetTrafficPolicyRequest,
) -> RusotoFuture<GetTrafficPolicyResponse, GetTrafficPolicyError> {
let request_uri = format!(
"/2013-04-01/trafficpolicy/{id}/{version}",
id = input.id,
version = input.version
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetTrafficPolicyError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetTrafficPolicyResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetTrafficPolicyResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_traffic_policy_instance(
&self,
input: GetTrafficPolicyInstanceRequest,
) -> RusotoFuture<GetTrafficPolicyInstanceResponse, GetTrafficPolicyInstanceError> {
let request_uri = format!("/2013-04-01/trafficpolicyinstance/{id}", id = input.id)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(GetTrafficPolicyInstanceError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetTrafficPolicyInstanceResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetTrafficPolicyInstanceResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn get_traffic_policy_instance_count(
&self,
input: GetTrafficPolicyInstanceCountRequest,
) -> RusotoFuture<GetTrafficPolicyInstanceCountResponse, GetTrafficPolicyInstanceCountError>
{
let request_uri = "/2013-04-01/trafficpolicyinstancecount";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(GetTrafficPolicyInstanceCountError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = GetTrafficPolicyInstanceCountResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = GetTrafficPolicyInstanceCountResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_geo_locations(
&self,
input: ListGeoLocationsRequest,
) -> RusotoFuture<ListGeoLocationsResponse, ListGeoLocationsError> {
let request_uri = "/2013-04-01/geolocations";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.max_items {
params.put("maxitems", x);
}
if let Some(ref x) = input.start_continent_code {
params.put("startcontinentcode", x);
}
if let Some(ref x) = input.start_country_code {
params.put("startcountrycode", x);
}
if let Some(ref x) = input.start_subdivision_code {
params.put("startsubdivisioncode", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListGeoLocationsError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListGeoLocationsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListGeoLocationsResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_health_checks(
&self,
input: ListHealthChecksRequest,
) -> RusotoFuture<ListHealthChecksResponse, ListHealthChecksError> {
let request_uri = "/2013-04-01/healthcheck";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.max_items {
params.put("maxitems", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListHealthChecksError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListHealthChecksResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListHealthChecksResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_hosted_zones(
&self,
input: ListHostedZonesRequest,
) -> RusotoFuture<ListHostedZonesResponse, ListHostedZonesError> {
let request_uri = "/2013-04-01/hostedzone";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.delegation_set_id {
params.put("delegationsetid", x);
}
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.max_items {
params.put("maxitems", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListHostedZonesError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListHostedZonesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListHostedZonesResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_hosted_zones_by_name(
&self,
input: ListHostedZonesByNameRequest,
) -> RusotoFuture<ListHostedZonesByNameResponse, ListHostedZonesByNameError> {
let request_uri = "/2013-04-01/hostedzonesbyname";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.dns_name {
params.put("dnsname", x);
}
if let Some(ref x) = input.hosted_zone_id {
params.put("hostedzoneid", x);
}
if let Some(ref x) = input.max_items {
params.put("maxitems", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ListHostedZonesByNameError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListHostedZonesByNameResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListHostedZonesByNameResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_query_logging_configs(
&self,
input: ListQueryLoggingConfigsRequest,
) -> RusotoFuture<ListQueryLoggingConfigsResponse, ListQueryLoggingConfigsError> {
let request_uri = "/2013-04-01/queryloggingconfig";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.hosted_zone_id {
params.put("hostedzoneid", x);
}
if let Some(ref x) = input.max_results {
params.put("maxresults", x);
}
if let Some(ref x) = input.next_token {
params.put("nexttoken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ListQueryLoggingConfigsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListQueryLoggingConfigsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListQueryLoggingConfigsResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_resource_record_sets(
&self,
input: ListResourceRecordSetsRequest,
) -> RusotoFuture<ListResourceRecordSetsResponse, ListResourceRecordSetsError> {
let request_uri = format!(
"/2013-04-01/hostedzone/{id}/rrset",
id = input.hosted_zone_id
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.max_items {
params.put("maxitems", x);
}
if let Some(ref x) = input.start_record_identifier {
params.put("identifier", x);
}
if let Some(ref x) = input.start_record_name {
params.put("name", x);
}
if let Some(ref x) = input.start_record_type {
params.put("type", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ListResourceRecordSetsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListResourceRecordSetsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListResourceRecordSetsResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_reusable_delegation_sets(
&self,
input: ListReusableDelegationSetsRequest,
) -> RusotoFuture<ListReusableDelegationSetsResponse, ListReusableDelegationSetsError> {
let request_uri = "/2013-04-01/delegationset";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.max_items {
params.put("maxitems", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ListReusableDelegationSetsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListReusableDelegationSetsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListReusableDelegationSetsResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError> {
let request_uri = format!(
"/2013-04-01/tags/{resource_type}/{resource_id}",
resource_id = input.resource_id,
resource_type = input.resource_type
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTagsForResourceError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListTagsForResourceResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListTagsForResourceResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_tags_for_resources(
&self,
input: ListTagsForResourcesRequest,
) -> RusotoFuture<ListTagsForResourcesResponse, ListTagsForResourcesError> {
let request_uri = format!(
"/2013-04-01/tags/{resource_type}",
resource_type = input.resource_type
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
ListTagsForResourcesRequestSerializer::serialize(
&mut writer,
"ListTagsForResourcesRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTagsForResourcesError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListTagsForResourcesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListTagsForResourcesResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_traffic_policies(
&self,
input: ListTrafficPoliciesRequest,
) -> RusotoFuture<ListTrafficPoliciesResponse, ListTrafficPoliciesError> {
let request_uri = "/2013-04-01/trafficpolicies";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.max_items {
params.put("maxitems", x);
}
if let Some(ref x) = input.traffic_policy_id_marker {
params.put("trafficpolicyid", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTrafficPoliciesError::from_response(response))
}),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListTrafficPoliciesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListTrafficPoliciesResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_traffic_policy_instances(
&self,
input: ListTrafficPolicyInstancesRequest,
) -> RusotoFuture<ListTrafficPolicyInstancesResponse, ListTrafficPolicyInstancesError> {
let request_uri = "/2013-04-01/trafficpolicyinstances";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.hosted_zone_id_marker {
params.put("hostedzoneid", x);
}
if let Some(ref x) = input.max_items {
params.put("maxitems", x);
}
if let Some(ref x) = input.traffic_policy_instance_name_marker {
params.put("trafficpolicyinstancename", x);
}
if let Some(ref x) = input.traffic_policy_instance_type_marker {
params.put("trafficpolicyinstancetype", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ListTrafficPolicyInstancesError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListTrafficPolicyInstancesResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListTrafficPolicyInstancesResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_traffic_policy_instances_by_hosted_zone(
&self,
input: ListTrafficPolicyInstancesByHostedZoneRequest,
) -> RusotoFuture<
ListTrafficPolicyInstancesByHostedZoneResponse,
ListTrafficPolicyInstancesByHostedZoneError,
> {
let request_uri = "/2013-04-01/trafficpolicyinstances/hostedzone";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
params.put("id", &input.hosted_zone_id);
if let Some(ref x) = input.max_items {
params.put("maxitems", x);
}
if let Some(ref x) = input.traffic_policy_instance_name_marker {
params.put("trafficpolicyinstancename", x);
}
if let Some(ref x) = input.traffic_policy_instance_type_marker {
params.put("trafficpolicyinstancetype", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ListTrafficPolicyInstancesByHostedZoneError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListTrafficPolicyInstancesByHostedZoneResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result =
ListTrafficPolicyInstancesByHostedZoneResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_traffic_policy_instances_by_policy(
&self,
input: ListTrafficPolicyInstancesByPolicyRequest,
) -> RusotoFuture<
ListTrafficPolicyInstancesByPolicyResponse,
ListTrafficPolicyInstancesByPolicyError,
> {
let request_uri = "/2013-04-01/trafficpolicyinstances/trafficpolicy";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.hosted_zone_id_marker {
params.put("hostedzoneid", x);
}
if let Some(ref x) = input.max_items {
params.put("maxitems", x);
}
params.put("id", &input.traffic_policy_id);
if let Some(ref x) = input.traffic_policy_instance_name_marker {
params.put("trafficpolicyinstancename", x);
}
if let Some(ref x) = input.traffic_policy_instance_type_marker {
params.put("trafficpolicyinstancetype", x);
}
params.put("version", &input.traffic_policy_version);
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ListTrafficPolicyInstancesByPolicyError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListTrafficPolicyInstancesByPolicyResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListTrafficPolicyInstancesByPolicyResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_traffic_policy_versions(
&self,
input: ListTrafficPolicyVersionsRequest,
) -> RusotoFuture<ListTrafficPolicyVersionsResponse, ListTrafficPolicyVersionsError> {
let request_uri = format!("/2013-04-01/trafficpolicies/{id}/versions", id = input.id)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.max_items {
params.put("maxitems", x);
}
if let Some(ref x) = input.traffic_policy_version_marker {
params.put("trafficpolicyversion", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ListTrafficPolicyVersionsError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListTrafficPolicyVersionsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListTrafficPolicyVersionsResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn list_vpc_association_authorizations(
&self,
input: ListVPCAssociationAuthorizationsRequest,
) -> RusotoFuture<ListVPCAssociationAuthorizationsResponse, ListVPCAssociationAuthorizationsError>
{
let request_uri = format!(
"/2013-04-01/hostedzone/{id}/authorizevpcassociation",
id = input.hosted_zone_id
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxresults", x);
}
if let Some(ref x) = input.next_token {
params.put("nexttoken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(ListVPCAssociationAuthorizationsError::from_response(
response,
))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = ListVPCAssociationAuthorizationsResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = ListVPCAssociationAuthorizationsResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn test_dns_answer(
&self,
input: TestDNSAnswerRequest,
) -> RusotoFuture<TestDNSAnswerResponse, TestDNSAnswerError> {
let request_uri = "/2013-04-01/testdnsanswer";
let mut request = SignedRequest::new("GET", "route53", &self.region, &request_uri);
let mut params = Params::new();
if let Some(ref x) = input.edns0_client_subnet_ip {
params.put("edns0clientsubnetip", x);
}
if let Some(ref x) = input.edns0_client_subnet_mask {
params.put("edns0clientsubnetmask", x);
}
params.put("hostedzoneid", &input.hosted_zone_id);
params.put("recordname", &input.record_name);
params.put("recordtype", &input.record_type);
if let Some(ref x) = input.resolver_ip {
params.put("resolverip", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TestDNSAnswerError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = TestDNSAnswerResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = TestDNSAnswerResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn update_health_check(
&self,
input: UpdateHealthCheckRequest,
) -> RusotoFuture<UpdateHealthCheckResponse, UpdateHealthCheckError> {
let request_uri = format!(
"/2013-04-01/healthcheck/{health_check_id}",
health_check_id = input.health_check_id
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
UpdateHealthCheckRequestSerializer::serialize(
&mut writer,
"UpdateHealthCheckRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateHealthCheckError::from_response(response))),
);
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = UpdateHealthCheckResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = UpdateHealthCheckResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn update_hosted_zone_comment(
&self,
input: UpdateHostedZoneCommentRequest,
) -> RusotoFuture<UpdateHostedZoneCommentResponse, UpdateHostedZoneCommentError> {
let request_uri = format!("/2013-04-01/hostedzone/{id}", id = input.id)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
UpdateHostedZoneCommentRequestSerializer::serialize(
&mut writer,
"UpdateHostedZoneCommentRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateHostedZoneCommentError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = UpdateHostedZoneCommentResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = UpdateHostedZoneCommentResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn update_traffic_policy_comment(
&self,
input: UpdateTrafficPolicyCommentRequest,
) -> RusotoFuture<UpdateTrafficPolicyCommentResponse, UpdateTrafficPolicyCommentError> {
let request_uri = format!(
"/2013-04-01/trafficpolicy/{id}/{version}",
id = input.id,
version = input.version
)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
UpdateTrafficPolicyCommentRequestSerializer::serialize(
&mut writer,
"UpdateTrafficPolicyCommentRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateTrafficPolicyCommentError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = UpdateTrafficPolicyCommentResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = UpdateTrafficPolicyCommentResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
#[allow(unused_variables, warnings)]
fn update_traffic_policy_instance(
&self,
input: UpdateTrafficPolicyInstanceRequest,
) -> RusotoFuture<UpdateTrafficPolicyInstanceResponse, UpdateTrafficPolicyInstanceError> {
let request_uri = format!("/2013-04-01/trafficpolicyinstance/{id}", id = input.id)
.replace("/hostedzone/hostedzone/", "/hostedzone/")
.replace("/change/change/", "/change/");
let mut request = SignedRequest::new("POST", "route53", &self.region, &request_uri);
let mut writer = EventWriter::new(Vec::new());
UpdateTrafficPolicyInstanceRequestSerializer::serialize(
&mut writer,
"UpdateTrafficPolicyInstanceRequest",
&input,
"https://route53.amazonaws.com/doc/2013-04-01/",
);
request.set_payload(Some(writer.into_inner()));
self.client.sign_and_dispatch(request, |response| {
if !response.status.is_success() {
return Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateTrafficPolicyInstanceError::from_response(response))
}));
}
Box::new(response.buffer().from_err().and_then(move |response| {
let mut result;
if response.body.is_empty() {
result = UpdateTrafficPolicyInstanceResponse::default();
} else {
let reader = EventReader::new_with_config(
response.body.as_ref(),
ParserConfig::new().trim_whitespace(true),
);
let mut stack = XmlResponse::new(reader.into_iter().peekable());
let _start_document = stack.next();
let actual_tag_name = peek_at_name(&mut stack)?;
result = UpdateTrafficPolicyInstanceResponseDeserializer::deserialize(
&actual_tag_name,
&mut stack,
)?;
}
Ok(result)
}))
})
}
}
#[cfg(test)]
mod protocol_tests {
extern crate rusoto_mock;
use self::rusoto_mock::*;
use super::*;
use rusoto_core::Region as rusoto_region;
#[test]
fn test_parse_error_route_53_get_hosted_zone() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/error",
"route53-get-hosted-zone.xml",
);
let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
let client = Route53Client::new_with(mock, MockCredentialsProvider, rusoto_region::UsEast1);
let request = GetHostedZoneRequest::default();
let result = client.get_hosted_zone(request).sync();
assert!(!result.is_ok(), "parse error: {:?}", result);
}
}